[ZODB-Dev] Partitioning a container

Shane Hathaway shane@zope.com
Tue, 04 Mar 2003 18:02:17 -0500


Adrian van den Dries wrote:
> Here's my idea:
> 
> I've seen a couple of places with a storage pattern of "no deletes":
> ie, when you've finished with an object, you "retire" it and it moves
> into an archive.  This means your storage will grow indefinitely, so
> it would be good to be able to partition your container into different
> storages: current and archive, and tune either to the needs of the
> application (temp storage for current, Oracle for archive, etc.)
> 
> Here's the catch: the object's path mustn't change: that is, the
> container transparently decides the storage from which to pull the
> object.  This would satisfy the content management ideal of
> "persistent URLs".  For example:
> 
>   /news/1999/blah.html -> /news/_archive/1999/blah.html
>   /news/2005/foo.html ->  /news/_current/2005/foo.html

Well, perhaps "news" is an object which, when traversed, visits either 
the archive or the current news area depending on the year requested. 
Or perhaps it looks in the current news area first, and if it doesn't 
find it, it visits the archive.  Zope can do this if you write Python 
code (though Zope 3 will do it differently than Zope 2).

You could do this at the ZODB level using AS (you'd use a gateway that 
synthesizes the contents of two sources), but the advantage isn't clear 
to me.

Shane