[Zope] ZODB or xySQL?

Ragnar Beer rbeer@uni-goettingen.de
Wed, 15 Mar 2000 18:44:11 +0100


>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 Python DB API spec 2.0 talks about different levels of thread 
safety. MySQLdb has threadsafety level 1 (= threads my share the 
module but not connections), the ORACLE db has threadsafety level 3 
(= threads may share the module, connections and cursors). I wonder 
what that means in % performance gain in high traffic situations. I 
have no idea where the different levels of threadsafety kick in. Any 
experienced users?

>>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).

I was rather thinking of connecting directly to ZODB (in a kind of 
server mode) via TCP/IP - not via Zope. But I guess that's an 
aberrant thought that would rather be applicable to connecting to 
ZEO. Still I feel like I'm only beginning to understand but in about 
two weeks the new production site must be ready running zope ;)

Ragnar