Persistent Python

Contact     Jobs    G+    follow me @ZODB4 ZODB4
ZODB / More ZODB Addons / Pickled Trees

Pickled Trees

Zopache Pickled trees look like a branch of the ZODB greph, but they are treated by the ZODB as a single object.  The root of a pickled tree is a Persistent Container.  (grok.container) The other nodes are pickled containers, and pickled objects or their subclasses.  In the ZMI a pickled tree looks like a tree.  To the developer a pickled tree looks ike a tree of python objects, but the ZODB pickles the tree in with the pickled tree root.  The ZODB reads and writes the whole tree at one time, and also treats the whooe tree as a single object for caching purposes.

Caveats: A pickled tree can refer to other ZODB objects.  Other objects cannot directly refer to the contents of a pickled tree because they do not have a permanent object id.   A pickled container cannot contain persistent ZODB objects, because thei  persistent object's parent references would keep around old versions of the pickced tree. 

A pickled tree is a great example of it is possible for the average developer to create new data distribution models on top of the ZODB. 


I invite you to Register and then link to your own blog postings and software packages..

Powered by Zopache, Grok, Zope and ZODB

Robots Crawl This