I've written a proposal for adding a feature to ZODB to make it easier for applications to use multiple databases together: http://zope.org/Wikis/ZODB/MultiDatabases This is needed in the short term to fix the current breakage of Zope mounts in a sane way. In the long term, this will allow is to *finally* support cross database references. Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
(reply-to set to zodb-dev)
In the long term, this will allow is to *finally* support cross database references.
Your proposal describes an unfamiliar kind of reference. In unix filesystem terms, it mixes characteristics of hard links and symbolic links. Like hard links it directly references the inode/oid. The reference doent need to have a filename/object reference from the root of the referenced filesystem/database. Like symbolic links it does not prevent garbage collection from freeing the inode/oid. So there does need to BE a filename/object reference from the root of the referenced filesystem/database.... it needs to exist, but the reference doesnt need to have it. (by 'object reference' above I mean a chain of normal object references like we have in normal python and zodb today) Right now I cant think of a use case for this new type of reference (either in a filesystem or zodb database). Can you give some examples? -- Toby Dickenson
Toby Dickenson wrote:
(reply-to set to zodb-dev)
In the long term, this will allow is to *finally* support cross database references.
Your proposal describes an unfamiliar kind of reference. In unix filesystem terms, it mixes characteristics of hard links and symbolic links.
That's right, it's not like a file-system hard link or a soft link. ...
Right now I cant think of a use case for this new type of reference (either in a filesystem or zodb database). Can you give some examples?
Yes. I want to create a reference from one object to another in Python code. (It's much easier to do that in Zope 3, for various reasons I won't go into here.) At the Python level, I don't want to have to worry about whether the objects are in separate databases. Now, the fact that the reference is weak is a definate disadvantage. I'd rather have a strong reference, but that makes the problem much harder to solve. There are applications where weak references are a step forward. An alternative model is to require that the reference isn't direct but has weak references (as in Python weak reference) semantics). That is, rather than saying: self.x = foo requiring: self.x = persistent.wref.ref(foo) Anyway, you ask a reasonably question. Let's continue this discussion after I write a proposal for cross-database references. Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
participants (2)
-
Jim Fulton -
Toby Dickenson