[Twisted-Python] twisted.persisted.journal: a prevayler-inspired persistence system
Itamar Shtull-Trauring
twisted at itamarst.org
Sun Oct 13 00:44:05 MDT 2002
On Sun, 13 Oct 2002 01:26:52 -0500 (CDT)
Glyph Lefkowitz <glyph at twistedmatrix.com> wrote:
> Seems like it would be pretty easy to create persistently-loggable
> objects for non-deterministic events (like the "time", and "random"
> modules) in Python. In order to do that you'd need to modify your
> implementation to provide a default"Command" base class so that
> non-deterministic events could be logged automatically as sub-events.
> Any reason that you wouldn't want to do that?(If you don't want to
> pollute client code with inheritance, the default implementation could
> just have a reference to a delegate ICommmand implementor.)
Prevayler has something like that where you have Clock passed to
commands, IIRC. I probably should add some code so commands can get a
"fake" time, i.e. the time they were supposed to have been run. Not sure
that randomness is worth doing - if you are using it presumably any
outcome is equally valid, or alternatively if that's not that case you
can't really use journal anyway.
--
Itamar Shtull-Trauring http://itamarst.org/
Available for Python, Twisted, Zope and Java consulting
More information about the Twisted-Python
mailing list