[Twisted-Python] long-lived database transaction

Dave Peticolas dave at krondo.com
Sun Dec 14 11:48:29 EST 2003

On Sat, 2003-12-13 at 13:50, Federico Di Gregorio wrote:
> Il sab, 2003-12-13 alle 21:55, Christopher Armstrong ha scritto:
> > Federico Di Gregorio wrote:
> > > Hi *,
> > > 
> > > attached to this mail there are two files that implement long-lived
> > > database transactions for twisted (xdbapi.py, to be dropped in
> > > twisted.enterprise) and the necessary unit tests (test_xdbapi.py). 
> > 
> > This looks like a gigantic rape'n'paste of adbapi.py. Isn't there a way 
> > you can integrate with/refactor adbapi such that you don't duplicate all 
> > that code?
> the original code was very different from adbapi, but i wanted to
> provide a similar interface. that's why i rape'n'pasted. :)
> unfortunately the adbapi code is based on a *thread* pool and the
> connection pool is just a side-effect of using one connection per thread
> (this is completely wrong, imho, see my comments of about one year ago
> about adbapi on this very list.) anyway, this obviously makes impossible
> to have long-lived transactions. 

Evidently not impossible, as Bill Gribble has a patch adding
this support to the existing adbapi.py. But it still may be
simpler to support an extended transaction api by going away
from a thread pool. In either case, we should not have two
separate modules.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20031214/ac9f2119/attachment.pgp 

More information about the Twisted-Python mailing list