[Zope-dev] multiple ZODB files?

Tres Seaver tseaver@palladion.com
Fri, 07 Jan 2000 09:51:44 -0600


Jim Fulton wrote:
> Michel Pelletier wrote:
> >
> > > -----Original Message-----
> > > From: Anthony Baxter [mailto:anthony@interlink.com.au]
> > > Sent: Thursday, January 06, 2000 2:27 AM
> > > To: zope-dev@zope.org
> > > Subject: [Zope-dev] multiple ZODB files?
> > >
> > >
> > > Is it possible to set up a site such that as well as the single
> > > Data.fs file, a seperate folder (say, /foo) is loaded from a different
> > > ZODB file? In particular, changes to stuff inside /foo should
> > > be written
> > > to the foo ZODB file.
> >
> > Not yet, we have not fully thought about this problem of multiple
> > databases,
> 
> I'll add that we have thought quite a bit about it, just
> not enough.  It's harder than one might at first expect.
> 
> > but ZODB was architected to be multi-DB aware.
> 
> Unfortunately, I suspect more architectural work
> will be needed too. :(
> 
> Some issues:
> 
>   - How to handle references accross databases.
>     At a basic level, this is not too hard, but...

Do it like soft-links across filesystems (i.e., "weak references").

> 
>   - How to handle garbage collection in a multi-db environment.
>     Oops.  Storages are currently responsible for GC.  This won't
>     account for references from other databases.

Soft-links in a filesystem don't bump the link count on the target, so the link
can be stale:  this may be mitigated by the fact that a developer is likely to
split the ZODB along "coupling and cohesion" lines, so the number of cross-ZODB
links is likely to be small.

> 
>   - How do databases get connected, from a UI point of view.
>     Do you get to specify a database when you add an object?
>     Any object?  Where do databases get defined?
> 
>     One idea I just thought of would be to have a databases
>     area of the control panel where one could add database
>     objects that modeled root database objects. Then, perhaps
>     one would do the moral equivalent of a link from an object in
>     one db to another.....
> 
>   - .... There are probably other issues I haven't thought of.
> 
> If anyone wants to work on this, I'd be willing to set up a mailing
> list and provide advice.
> 

-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com