• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Advice on dynamic graphics with WO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice on dynamic graphics with WO


  • Subject: Re: Advice on dynamic graphics with WO
  • From: Michael Halliday <email@hidden>
  • Date: Thu, 1 Jan 2004 00:43:15 -0500
  • Resent-date: Thu, 1 Jan 2004 00:48:40 -0500
  • Resent-date: Thu, 01 Jan 2004 00:51:37 -0500
  • Resent-from: Michael Halliday <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: WebObjects Dev <email@hidden>

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.

  • Prev by Date: Re: can I use fetch spec to filter an array?
  • Previous by thread: Re: Advice on dynamic graphics with WO
  • Next by thread: Re: can I use fetch spec to filter an array?
  • Index(es):
    • Date
    • Thread