Where to store images for a Zope e-commerce Website

Kapil Thangavelu kvthan at wm.edu
Sat Jan 13 05:44:38 EST 2001


Remi Delon wrote:

> Hi,
> 
> I'm developing an e-commerce website in Zope. This website will handle
> tens of thousands of items. I'm using a MySql database to store all
> alphanumeric data about the items.
> I'm wondering what's the best place to store the images for those items.
> I see 3 options:


> - Either in a Zope folder (in this case, it's easy to serve those
> images from Zope. But I'm concern that ZODB might have problems to
> handle so many images in a Folder. Also, I'm limited with operations I
> can do on those images (how do I Delete ? Add ? Update ? Create
> thumbnails ?)

a regular zope folder will have problems esp. if you're doing processing on 
these records with thousands of objects. if you're just accessing them via 
an id you can scale it up but you're probably better off using the 
BTreeFolder, if you want to go this route. delete, add, and update via
dtml methods, thumbnails through PIL.

> - Either in the local filesystem. (Then it's easy to perform operations
> on those images, but less easy to serve them with Zope)

LocalFS handles this method nicely. 

> - Either in the database itself, but I don't know if the connection
> between MySql and Zope works well for raw data.

why? unless you want transaction integrity over your binary data,
which mysql doesn't support, the only thing you gain my sticking it
in the db is loss of performance and headaches.

> Anybody has any experience with this ?

the best solution would probably be to have your front end webserver
(apache, roxen, iis), which i assume you have for ssl serve up the images
directly. zope's meant to serve up dynamic content. one of these servers
will blow past it in terms of speed on purely static content like an image.

you've got another problem, you're using mysql for ecommerce.
 
i'm biased but mysql has a poor concept of both transaction support and
concurrency, two things that should be high up in the priority list for
an ecommerce site.  try another db like postgresql:)

kapil thangavelu



More information about the Python-list mailing list