On Mon, 7 Feb 2000 12:46:33 -0500 "Kevin Dangoor" <kid@kendermedia.com> wrote:
----- Original Message ----- From: "Diego Dainese" <xdsi@xddainese.unive.it> To: <zope@zope.org> Sent: Monday, February 07, 2000 8:51 AM Subject: [Zope] Is e-commerce feasible with Zope?
The script will add the product to a shopping basket; later the customer can proceed to the checkout. Here she/he will be able to create an account on our site for later shopping.
What I need is:
- A means to implement the basket; with Apache+PHP I would use a simple file containing a list of product codes, or an SQL table.
- A means to set a cookie on the client browser and to associate the it with a basket; with Apache+PHP I would use a SQL relation cookie->basket, or I would put in relation the basket filename with the cookie.
I have implemented something like this for byproducts.com. I'm storing the carts in the ZODB. This is not desirable if your site is very busy, though, because there can be issues if you have lots of concurrent writes going on. (Note that, from what I've read in previous threads, I would have to have 5 people create new shopping carts at the same instant in order for one of them to run into an error. That's a lot. When I said that the site would have to be very busy, I meant *very*.)
But are the Digital Creations guys aware of this problem, and thinking to a solution? In the short term I don't foresee a lot of traffic on my site, and I hope that in the long term the problem with ZODB will be fixed. However there's another thing that concern me on the ZODB based solution; from on the ZODB vs SQL HOWTO: "If the data is going to be frequently changing, then it's not a good idea to put it in the ZODB. Every time the data changes, a new record will be appended to the Data.fs file - this could become a problem very quickly." Is this still true?
There are two Zope products, FSSession and SQLSession which should handle these things quite easily for you.
OK, I'm sure one of these will solve the problem.
- A means to store the products database; with Apache+PHP I would use a simple SQL DBMS.
You could store the products database in the ZODB or in a SQL DB. Which one you use will probably depend on what you want to do with it, and how updates are made to it. For example, if you were going to be doing something like reloading the entire DB every hour (not likely, but just in case you were), you would not want to use the ZODB with the FileSystem storage, because your Data.fs file will grow quickly and need frequent packing.
Zope makes it easy to go either way on this one.
I don't think the data will change so often; probably ZODB is the right solution for this.
- A means to store customer informations on the site; with Apache+PHP I would use another SQL table, with a relation one to many to store the (possibly) many customer's addresses.
Again, you can use SQL if you want. There's a whole bunch of work going on right now to create new User objects in Zope. These will make it possible to attach all sorts of things to users and will be a really nice abstraction.
I'm very interested in these new user objects: where can I find more info on this subject?
Personally, I prefer to work with the ZODB wherever possible. I just generally prefer objects to the relational model.
I prefer it too when possible. Another concern with ZODB is the max DB size: on Linux based system with the ext2 file-system and the kernel patch, the max file size is 4 GB; since the Zope DB is stored into a single file (right?), this mean that the max DB size is 4 GB. The solution I had in mind to store customer's account is a folder containing one instance of a custom ZClass to store general user information and one ore more instances of another custom ZClass to store address informations (do you known better solutions?). But a quick test has revealed me that with this system, a user account will take about 2 kByte; with a max DB size of 4 GB this lead to max 2.000.000 users; this is for sure a big number, but if you consider the probable big number of dummy registrations, I think it's not unreachable. Is this analysis correct?
- I would let the site to be accessed both via https and http.
There was recently a ZServer version announced with support for SSL. Otherwise, I think people are just using Apache with fastcgi.
Glad to hear this!
- The site must be easily internationalized, thus I must be able to replace all the text in the pages with a translated version; with Apache+PHP I would use an include file where to store the text messages as PHP constants.
There is a Zope Internationalization Project (ZIP), though I think that has focused on adding more internationalization to Zope's core. For your own apps, I would think there are a number of ways to implement this. Acquisition is your friend. You'll probably use acqusition to make life easy for you.
OK; the solution I have in mind is to store the page's text into the folder's proprieties, but I am wondering if there is a coolest solution. Thank you for the reply, bye -- Diego | To reply remove the `x' and swap the | Sorry for my Dainese | words around the `@' in the address. | bad English.