RE: [Zope-dev] multiple ZODB files?
-----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, but ZODB was architected to be multi-DB aware. -Michel
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... - 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. - 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. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (888) 344-4332 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
At 07:23 PM 1/6/00 +0000, Jim Fulton wrote:
If anyone wants to work on this, I'd be willing to set up a mailing list and provide advice.
Please do. :)
Some issues:
- How to handle references accross databases. At a basic level, this is not too hard, but...
- 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.
- 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.
The work Ty and I are doing (and which we'll be talking about at the conference) is asking all the same questions. However, we're not really interested in making it all automagic by the system, we're more concerned with establishing a pattern framework for making storage issues like these transparent to code at the problem-domain level. Specifically, we want to be able to write ZClasses whose instances neither know nor care what databases (relational, LDAP, or ZODB) they or the objects they relate to are stored in. We do this by delegation in a standardized framework, where certain objects have responsibility for creating, finding, or storing instances that meet an abstract interface. These "Implementor" objects are environmentally acquired, and thus what database a thing should be stored in (not to mention what class actually is instantiated) is seperated from an object's specification of what kind of thing it wants to relate to. We haven't yet given much thought into how this could be made fundamental to the existing Zope framework; we've been more treating it as a layer of practices for applications built on Zope. But it might be interesting to re-examine such scenarios as "folder adds an object" under our model as an instance of the scenario, "instance asks an Implementor (of abstract type ManageableZopeObject, let's say) to create an owned instance of an object and return a storable reference." (Note, by the way, that we are not yet treating abstract types as being quite so concrete as the fascinating Interface system you've implemented. We are viewing them more as loosely defined plug-in points within a framework, where Implementors provide a spot for someone integrating different products to add the necessary glue.)
participants (3)
-
Jim Fulton -
Michel Pelletier -
Phillip J. Eby