Re: Advice on dynamic graphics with WO
Re: Advice on dynamic graphics with WO
- Subject: Re: Advice on dynamic graphics with WO
- From: Karl <email@hidden>
- Date: Mon, 05 Jan 2004 14:10:59 -0500
The key to this is caching. Yes, there is a minute delay when the data
is first accessed from the database but then it gets cached.
Generally, we run our appserver in Direct Connect mode bypassing the
WebServer (this is how we are configuring JBoss and how we had our
other app servers configured).
So the path is client -> appserver -> database (if not cached) ->
appserver -> cleint. The database server is a seperate box (4 CPU Sun
E450 4Gb RAM) running Oracle 8i and serving 2xSun E250 / 2 CPU / 2Gb
RAM. They have a private 100M Full Duplex LAN. It would be faster if
the DB and App Server were on the same box.
We don't use WOImage. We use a simple servlet which deals with the
caching and streams directly from memory. A custom WO component
returns a URL reference to the image or file. This makes it very easy
to do things like massaging the URL so that a cache manager can cache
the content.
I think that part of the issue would be the size of the file. If it is
a 100Mb file then I am sure that serving this from a file system would
be faster. If, however, we are dealing with typical web image files in
the 1Mb size range (for detailed images) and 100kb (for thumbnails)
then performance shouldn't be an issue. With _HUGE_ file sizes I would
still keep them in the database but come up with a nifty way to
transfer them to the file system for the web-server to serve up on
demand.....using the file system as a cache.
Karl
On Jan 5, 2004, at 1:55 PM, Alexander Spohr wrote:
hi discutants :)
what i don't understand is that so many people here state that it
makes no difference if you let the webserver or the db serve the
images.
karl,
Even under heavy loads, neither the app server nor the database
represent a bottleneck.
what is heavy load? could you give some numbers? served by what kind
of machine?
the webserver (having images on the local filesystem) can open the
file and stream it without delay. so you have a trip from
client -> webserver -> filesystem -> webserver -> client.
i consider this fast.
if you go through the woapp and a database, you have
client -> webserver -> woapp -> db -> filesystem -> woapp -> webserver
-> client.
this _is_ slower. please add network-traffic needed for huge image
data between web/app/db - depending on the level of machine
seperation, so your milage may vary.
so IMHO the conclusion is:
- if you need speed, copy the files to each webserver and let it do
the delivery, to avoid the transfer of image data _between_ your
machines (web,app,db).
- if speed is not a problem, put your image into the database for all
the pro's mentioned by the others earlier.
regards,
atze
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.