[ZODB-Dev] DBTab + ZEO

Shane Hathaway shane@zope.com
Wed, 09 Apr 2003 15:28:00 -0400


Florent Guillaume wrote:
> Question regarding DBTab with ZEO.
> 
> I have a setup with two databases, one mounted at / and one at /foo.
> I want to serve those two databases, mounted like that, to several ZEO 
> clients.
> 
> If I understand the DBTab doc correctly, the way to do it is to have
> - one ZEO server serving a Data.fs for / on :9001
> - one ZEO server serving a Data.fs for /foo on :9002
> - and for each ZEO client, a dbtab.conf that describes the two ZEO 
> server to contact and where to mount each.
> 
> I was wondering why it's not possible to have a single ZEO server that 
> somehow uses DBTab to mount the two databases, and serves them to simple 
> ZEO clients configured only to know about the single ZEO server. It 
> would simplify deployment a lot as all the knowledge of mounted 
> databases would then be in the server. Can I do that? How?

DBTab mounts are a lot like NFS mounts.  The client does all the work, 
implements all the security, and has all the knowledge of what's mounted 
where.  The ZEO server remains a simple database of strings that happen 
to be pickles.

To mount databases on the server, we'd need some way for the server to 
figure out which storage an object should come from / go to.  One crazy 
idea is to steal the first byte of 8-byte OIDs and use it as a storage 
number, allowing up to 256 storages to coexist as a single database. 
Generating these 1+7 OIDs for new objects would require clients to get 
just a little smarter about generating OIDs.

Alternatively, Ape has a provision for unlimited databases acting as a 
single database.  It is designed to work with ZEO, but the combination 
has never been tested.

All things considered, it's just easier to use NFS excuses for now. :-)

Shane