[Zope] ZODB or xySQL?

Tony McDonald tony.mcdonald@ncl.ac.uk
Wed, 15 Mar 2000 10:03:13 +0000


At 9:01 am +0100 15/3/00, Ragnar Beer wrote:
>Hello Zopistas out there!
>
>I just stumbled about the threadsafety of different SQL-DAs. I'm 
>coming from mod_perl + MySQL so it seemed a natural choice for me to 
>also run Zope with MySQL in the background. I'm doing research (= 
>low budget) in clinical psychology and have people fill in all kinds 
>of questionnaires regularly which I have to store somewhere later. 
>Looking at some past messages it seems to me that free and speedy 
>MySQL is awfully bottlenecked by MySQLdb and 
>financially-out-of-range Oracle rules. But how big is the 
>difference? Does anybody know?

I could be talking out of a hole in the top of my head here, but here goes:

If you get Andy Dustmans' MySQLdb Module 
(http://www.zope.org/Members/adustman/MySQLdb). It's designed to be 
thread-safe. I've always taken that to mean that if a Zope request 
does a ZSQL query that uses this module, then if another ZSQL query 
comes along (in a different Zope thread) then it is *not* blocked 
until the first query is finished, but runs alongside the first query.

If I'm wrong on this I would *really* appreciate a correction here.

The Digital Creations people aren't overly keen on MySQL because it 
doesn't support transactions, which the Zope system uses extensively 
(I only use it for 'Undo'). For the sort of queries I have (many many 
SELECTs, few INSERTs, that isn't a major problem to me).

>It also came to my mind that I might be missing an important feature 
>of Zope: ZODB. For some reason (lack of marketing?) I just didn't 
>realize that there is a database behind Zope that I could use to 
>store my stuff. Last night I read some documentation but I have some 
>questions left open:
>
>Can I access ZODB via TCP/IP socket to retrieve data for statistical 
>calculations?

I'd reckon so. Look into XML-RPC as an example. Of course you can 
just construct URLs that obtain the data you need (eg have a folder 
with lots of properties of the form prop_n and get the values as 
http://server/path/to/folder/prop_125) and perhaps use something like 
urllib (Python library) to do some machinations at the client end).


>What about performance?

People seem to reckon ZODB is fast enough. I think it's Python 
limited (but again, I could be wrong here). That's possibly where the 
pystone benchmark comes in; check these out;

180MHz 603e (Linux) = 850 (my home Zope system)
300MHz UltraSparc (Solaris) = 2800 (our production machine! :(
266MHz G3 (MacOS) = 4600
500MHz PIII (SUSE Linux) = 5400
700MHz PIII (Win32) = 10150!! (this is really annoying, this box cost 
1100 quid - the same as the yearly maintenance on our Sun iron :(

I have no idea why those last two numbers are so disparate for the 
want of 200MHz. We'll be putting Linux onto the 700MHz box to see 
what happens there...

hth
tone
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2