Re: Advice on dynamic graphics with WO
Re: Advice on dynamic graphics with WO
- Subject: Re: Advice on dynamic graphics with WO
- From: Geoff Hopson <email@hidden>
- Date: Thu, 1 Jan 2004 10:22:37 +0000
Quick comment as it's New Years Day...
On the Fortnum & Mason online store (http://www.fortnumandmason.com),
the product catalog is pretty image-heavy. Also, they (F&M) change the
catalog and the associated images at least twice a year. So I wrote a
tool that allows their product images to be uploaded into the database,
simply for the purpose of having everything in a single place for
backup reasons. When a new catalog is ready to be deployed, the images
are extracted from the database and placed under the webserver (since,
as everyone notes, webservers are particularly good at vending images).
The main F&M web application then gets all it's images from the
webserver, as opposed to cached in the webobjects application after a
fetch from the database.
However, in development, we used the images from the database directly.
Command line switch toggles whether the images are read from the
webserver or the database.
Doing all this means that the memory footprint is lower, since the
application is not caching images, and it also means that we can do
clever things with the webserver to spread the load a little.
Chuck Hill wrote something on the pros and cons of using the webserver
yesterday - http://lists.apple.com/mhonarc/webobjects-dev/msg05564.html
(use 'archives', 'archives' as the username/password).
Off to start those resolutions...
Geoff
On 1 Jan 2004, at 05:43, Michael Halliday wrote:
> I haven't had any problems storing images in our database (OpenBase).
> We have developed many "community" based sites with photo albums as
> well as an online dating service, both use the same methods that
> Robert talked about in his message.
>
> I have to say that we have had no performance issues, and to me this
> is the most elegant, scalable solution for several reasons:
>
> (1) You have all of the database clustering options available to you
> for data redundancy & data backup.
>
> (2) If your site was to grow substantially in size and you required
> multiple HTTP Servers (along with your multiple application servers),
> if your images were served by apache from the local filesystem you
> would run into issues with having to somehow replicate your image
> directories across the multiple Apache servers. I'm not saying this
> couldn't be done...it would just require the proper planning. Using
> the database for an image store would solve all of these issues.
>
> (3) Using the database method, WebObjects would cache your images so
> you wouldn't actually have to go to the database each time.
>
> (4) If you need to "associate" images with other objects I'd hate my
> images to be stored in the file system. You would eventually most
> likely run into broken links etc...this would get rather messy. Plus
> if you need to control access to images (I.E. Only logged on users can
> view product images) you would need to rely on filesystem/apache
> security which adds yet another layer of complexity to your
> application.
>
> Again, I know many people will probably disagree with this approach.
> But, it is working perfectly for us and for dynamic images (or images
> that the user can change/upload) I think it's the most effective
> approach. That being said, we do use apache to serve up our static
> images.
>
> I'd be interested to hear from others and there experiences with
> storing images in databases. You hear a lot of people saying "Don't
> do it, it won't perform well."...but have these people actually tried
> it? Or have they just been told not to do it. I have been very
> interested in this topic for a while now and I have done extensive
> searching but never come up with any "correct" answer. I think it
> also depends on which database you use and how exactly the database
> itself stores images. I know that some are much better than others
> and personally this is where you'd most likely run into the
> performance hit (if any).
>
> Michael.
>
> PS -- Happy New Year!!!
> PPS -- I'm working on New Years Eve...how sad is that?!
>
> On 31-Dec-03, at 8:25 PM, Michael Engelhart wrote:
>
>> On Dec 31, 2003, at 7:46 PM, Robert Walker wrote:
>>
>>> It's probable that many on this list will disagree with me on this
>>> issue, but I have had good success, for my purposes, with this design
>>> pattern.
>>
>> I'm curious if this is in a very high traffic site or not? I can't
>> imagine that pulling image data out of database for every page view
>> is going to scale. That's my underlying reason for saying it's a
>> bad idea. But then again I could be wrong. :-)
>>
>> I'm also curious as to whether or not a caching proxy server (say
>> Squid for example) can cache a copy of an image that isn't file
>> based? This may or may not be an issue though depending on the
>> application.
>>
>> Mike
>> _______________________________________________
>> 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.
> _______________________________________________
> 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.
>
>
--
Geoff Hopson
Objectology Ltd.
http://www.objectology.co.uk/
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.