[Twisted-Python] Twisted.Persisted ~ ZODB

Jp Calderone exarkun at divmod.com
Thu Jul 1 15:41:21 MDT 2004


Eugene Coetzee wrote:
> Hi,
> 
> Being new to both Twisted and ZODB and not finding too much info on 
> Twisted.Persisted by googling I have decided to post this question.
> 
> I have also noticed a few projects running Twisted "on top of"  ZODB as 
> it were.
> 
> I get the impression that Twisted.Persisted is more of an utility 
> add-on  to Twisted whereas ZODB is a full fledged object database.

   That is true.  Nothing in twisted.persisted is usable by itself as a 
persistence mechanism for a non-trivial application.

   AOT and Marmalade are graph serialization formats.  Neither supports 
new-style objects very well, IIRC.  Even if they do, neither is 
particularly quick, nor provides anything beyond simple storage of a 
complete object graph, hardly the only requirement for a database.

   dirdbm is a cute toy, but not again really useful as a non-trivial 
data store.  It's slow and fragile, and doesn't provide any 
functionality beyond what the bsddb module in Python 2.3 provides.

   sob is a handy front-end to AOT, Marmalade, pickle, and tac files.

   crefutil is helper code for aot and jelly and perhaps some other 
serialization modules.

   The styles module has all the cool code.  It lets you pickle 
otherwise unpickleable types and provides the Versioned class, which 
lets you deal with mixing old data with new code.

> 
> Still - I  would very much like to  use Twisted.Persisted for trancient 
> data/metadata in a new project I'm tackling cause it is always good to 
> minimize dependencies and I know I can use postgreSQL with Twisted for 
> heavy duty stuff - which I still believe a better option than OODB.

   Unless you have very little data, and you don't care _terribly_ if 
you lose it, twisted.persisted probably isn't going to do it for you.

> 
> How does Twisted.Persisted  compare to ZODB - if such a comparison can 
> be made? Any other OODB's to be considered for use with Twisted?

   You might look at Atop.  It's somewhat lighter weight than ZODB. 
http://www.divmod.org/ has some docs, but it needs more.  It also isn't 
distributed separately from Quotient yet (but is easily separable once 
you download it).

> 
> I would also very much appreciate some links to on-line docs/examples 
> regarding Twisted.Persisted if they exist.
> kind regards,
> 

   I wish I could point you at something, but I hope the above has been 
an adequate substitute.

   Jp




More information about the Twisted-Python mailing list