[Zope-dev] DA connection pooling thoughts

Brad Clements bkc@murkworks.com
Wed, 12 Dec 2001 09:14:03 -0500


Sorry if this is FAQ..

I've been reading the petrilli's DA how-to, and thinking about Thunked_TM.

For Interbase, I'm thinking of trying a DB connection pool that threads can "checkout".

That is, each DB connection is serialized to be used by one thread only, but there can 
be multiple DB connections in a Zope process. We'd maintain a pool of connections 
from 1 to n.. and each thread making a DA request checks out a DB connection from 
the pool (if available) and uses it..

I'm trying to figure out of Zope already does this, that is, has one DB connection per 
thread if I took out Thunked_TM from the DB itself.

Or is it that there are multiple DA's, and the DA uses on internal DB for all the DA's ?

If Zope will re-entrantly call a DA and it's corresponding DB without Thunked_TM in-
place, then having a connection pool (up to one for each thread) might be worthwhile.. I 
remember seeing something on the list about per-thread state information being 
available somewhere.. an oid jar or something?

Anyone have pointers?

Thanks


Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements