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?
David Binger
2007-04-27
On Apr 26, 2007, at 10:46 PM, Terry Hancock wrote:

> 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.

I think you are talking about the ZODB feature called versioning,
which I understand to be deprecated and faulty (but nevertheless
cool to see working in a Zope application).

You are correct that Durus does not support rolling back to an
arbitrary transaction.  Durus does have a HistoryConnection
implementation that is intended as a diagnostic tool for peeking
into earlier transactions.  You might find that interesting.

> 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?

That would be a difficult path to take, but not impossible.
Durus does not maintain transaction timestamps or version
numbers, so one challenge would be to determine which
transaction you really want.

I think the best solution for this in Durus (and in ZODB) is for the
application level itself to provide time-travel.  Just keep old versions
explicitly in your database, with your timestamps, or version numbers
to sort them out.






reply