zodb troubles - seeking advice for app design

Duncan Grisby duncan-news at grisby.org
Fri May 7 05:52:00 EDT 2004


In article <2fuolnF2h9qbU1 at uni-berlin.de>,
 Diez B. Roggisch <deetsNOSPAM at web.de> wrote:

>Everything works fine - in a single threaded app. But under load, the
>omniorb will dispatch the incoming calls on several worker threads. zodb
>requires that for each thread a separate connection has to be used. I'm not
>sure how bad sharing the connection would be, but can imagine that this
>isn't the best idea....
>
>Now my problem is that the data object instances are separate for each
>connection. So changes made in one thread aren't reflected in the instances
>of other threads.

If you want to stick with zodb, one option is to use a POA with the
main thread model threading policy. That will dispatch all calls with
the main thread, so your access to zodb will be single threaded. Of
course, that will kill the performance gain you would have had from
the threads.

If you're not set on zodb, another option is to use Berkeley DB. That
works very nicely in a multi-threaded environment with omniORB.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the Python-list mailing list