struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Haynes <>
Subject Re: Example code for blobs
Date Tue, 06 Sep 2005 02:36:22 GMT wrote:

>On Mon, 2005-09-05 at 22:09 -0400, Frank W. Zammetti wrote:
>>Murray Collingwood wrote:
>>>Hello again
>>>I'm on the hunt for some sample code that will show me how to use my SQL Blob
>>>to store images or documents.
>>Here's something on the Wiki to get you started:
>>The sample app posted there includes serving an image from a database.
>That said, I'd advise you to consider this again - serving images from
>the database may slow down your application A LOT (e.g. one of our
>clients reported a 2-times speedup when they moved their images from
>database to file system).
Just a general caveat to that. If you have multiple front-end web 
servers connecting to a back-end database, you will have an issue if the 
images are *not* served from the back-end  - synchronization of the 
image files on the front-ends and the amount of disk consumed with 
duplicate image storage - so serving the images from the back-end 
usually makes more sense. However, if you do this, you will either have 
to teach the front-ends to access the back-end file systems or you will 
have to have some form of mounted file system image from the back-end on 
every front-end. Depending on how protected your back-end is (i.e. 
firewalls, etc.) accessing the file system may become an issue.

Of course, this only really applies if your application is big enough to 
require the separation of the front-ends from the back-ends and you are 
concerned about the potential for malicious access to the database 
and/or database system. If you plan to shove the whole thing on a single 
server in the DMZ, then serving an image from a file becomes an easy 
thing to do.

Having said that, if you can avoid BLOB storage of images, I would 
recommend that you do so when performance is an issue.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message