durusmail: durus-users: Does durus support rollbacks?
Does durus support rollbacks?
2007-04-27
2007-04-27
2007-04-27
2007-04-28
2007-04-28
2007-04-28
Does durus support rollbacks?
Terry Hancock
2007-04-27
Hi,

I'm evaluating durus for use as a persistent object storage in Python
Universe Builder (http://py-universe.sf.net), an interactive fiction
engine written in Python.

So far, it seems like the right solution: simplified relative to ZODB,
doesn't strictly require C compilation, etc.  PUB's previous solution
was to pickle a whole module as the game state -- but I'm planning to
scale up to rather larger game state files, and the whole
module-pickling approach seems like a bit of a kludge to me.

I like the transactional database concept, and from ZODB, I expected
there would be the ability to rollback to previous transactions. This
would be an extremely compact way to save games (just save the
transaction number and roll back to it). In fact this is one of the
benefits I promoted about using an ODB.

But I don't actually see a rollback method on the connection object.
Just the abort() which only rolls back to the beginning of the current
transaction.

Of course, I could just copy the whole thing to a save file, but it
seems a bit wasteful, given that one has a transactional ODB to work with.

If it can't do it, how hard would it be to add, do you think? Is it
something I could bolt on by sub-classing connection? Does the storage
model support the kind of rollback I'm talking about?

Any comments appreciated,
Terry

--
Terry Hancock (hancock@AnansiSpaceworks.com)
Anansi Spaceworks http://www.AnansiSpaceworks.com

reply