[Zope-ZEO] How do ZODB transactions work?

Shane Hathaway shane@digicool.com
Thu, 28 Sep 2000 11:26:10 -0400


Greg Ward wrote:
> The context is this: we (currently) have a single-threaded web
> application server with a single connection to a single database.  Most
> of the data in that database is our domain objects, which *should* get
> committed only after explicit user action and careful validation to
> ensure consistency.  However, we also put session data in the database,
> because we want it to persist across server restarts and this is a
> convenient way to do so.  Also, most session objects keep a reference to
> domain objects -- eg. if someone has logged in on a session, that
> session keeps a ref to the corresponding User object.  So if we put the
> sessions in the same ZODB as the domain objects, it Just Works.

We've been thinking of achieving sessions using something similar to
mountable databases instead.  There is no need to retain undo
information for sessions, so we plan to use a non-undo/non-versioning
storage for the sessions.  Initially this would mean MappingStorage
(uses RAM only), while sites that make use of sessions extensively would
want to move to something like DBM storage.  Note that either method is
fast and fully compatible with ZEO.

Shane