[Twisted-Python] questions about twisted usage

Ilja Livenson ilja.livenson at gmail.com
Thu Mar 22 06:18:53 MDT 2012


Hi, Uri

> So what I didn't mention earlier because I wanted to keep my questions
> simple, is we're already using sqlalchemy and its ORM so I don't think
> I can use adbapi.  The way things have been working (and it's not so
> scalable) is every request that does any kind of modification grabs a
> global exclusive write lock, and any request the reads grabs a
> non-exclusive read lock (multiple readers can hold the lock, but only
> one writer can, and while a writer is holding it, no reading is
> allowed).  This seems to be the crux of my difficulties...

we have been stumbling on the same problems when using ZODB. The
current solution is to defer db operations to a threadpool. We also
have rdonly and rw transaction decorators, which can be used for
speeding up processing/custom logic. If you are interested, the code
is open: https://github.com/opennode/opennode-management/blob/master/opennode/oms/zodb/db.py

cheers,
Ilja

>
> In any case thanks for the responses!
> --
>   Uri
>
> Please consider the environment before printing this message.
> http://wwf.panda.org/savepaper/
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list