[Zope-dev] session concurrency

Dieter Maurer dieter at handshake.de
Tue Nov 25 16:04:46 EST 2003


Santi Camps wrote at 2003-11-24 23:14 +0100:
 > I've a product, http://zetadb.sourceforge.net, that uses SESSION
 > extensively.   I've just discover, unhappiness, that there are some
 > problems when SESSION object is changed at the same time in two diferent
 > python scripts (using frames).  The two frames are changing diferent
 > keys of the SESSION object, but at the end the whole SESSION object is
 > saved, I think, so one of the two objects losses its SESSION data

It should *NOT* loose its session data but get a "ConflictError"
and automatically retry the request.

That's normal ZODB behaviour.

Search for "Application specific conflict resolution" for a
(complex, in your case) way to work around this.

A partial workaround may be to put your various keys into
persistent subobjects.

-- 
Dieter



More information about the Zope-Dev mailing list