[mod_python] bsddb3 magic?

John Mudd mudd at vex.net
Sun Mar 28 05:32:04 EST 2004


I've been looking at bsddb3 lately.  I don't think it's quite magic,
unfortunately.  It does support concurrent updates but you can still run
into deadlocks (multi-user interference).  And when you do all but one
of the competing processes/threads loose.  And, I think, that's only if
you have the bsddb3 deadlock deamon running in the background to act as
a traffic cop.  Without the deamon I guess the processes are frozen.  Of
course, with a deamon, it's no longer very lightweight.

The same is true for a commercial product that I've used, C-Tree Plus by
Faircom.  One difference is that C-Tree doesn't require a deamon process
to resolve conflicts.  

The remedy for processes that get bumped due to deadlock is to simply
try the update again until it succeeds.

I think the mod_python developers are aware of the (rare) potential for
deadlock with anydbm.  They use the apache global lock when manipulating
the session dbm.

John


Ben ben at medianstrip.net wrote:
> sleepycat / bsddb3 handles locking automatically.  after setting 
> the environment, you can use it like a dictionary and it works
> like magic.



More information about the Mod_python mailing list