Re: Servlet uplad with Multipart and LO

From: Toby Doig <binky(at)flirble(dot)org>
To: Dror Matalon <dror(at)zapatec(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Servlet uplad with Multipart and LO
Date: 2002-07-03 09:59:47
Message-ID: 20020703105658.X71766-100000@plum.flirble.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> 3. Save the uploaded file in a LO (Large Object).
> Pros: Much faster than bytea,
> Cons: Limited permissions. Anyone that has access to the database can
> get to the LO. Slower than file storage.

this is the approach I use because it has the added bonus of backing up
your data using replication. if you store everything in the database then
backing up the db backs up everything. also, if you give all your
webserver nodes access to teh db then there's no mucking about with files
etc. i understand there's a performance hit involved but the
administrative benefits are superb.

by the way, if performance is a real issue then you could store the file
in the db and cache a local copy of each web node. check the file mod date
before serving and then serve up the local copy. to introduce a new web
node just dump it in the cluster and it'll build up its own cache. when
disk space gets low just clear the cache. simple.

t

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Toby Doig 2002-07-03 12:12:12 switching db's on the fly
Previous Message Aslak Hellesoy 2002-07-02 23:19:39 Re: [Middlegen-user] Try other one of Postgresql JDBC Driver (no NPE)