Hey Christian,

Christian Theune wrote:

Am Mittwoch, den 28.03.2007, 01:12 +0200 schrieb Martijn Faassen:

Quick shot on integrating the suggestion from Uwe:

- Reserve an OID from the ZODB storage, maybe create a 'shadow' object
in the ZODB.
- Use a directory that maintains a hard link to the real file with the
oid as its name.


Btw: This is a good bit like blob support works in ZODB. ;)

This is an interesting idea; I hadn't considered looking at the blob support.

This would allow one to use the PersistentKeyReference, right?

This hard-link directory, is that portable? I guess the blob support does it, so that should be possible.

I guess there is another approach if you go for ZODB shadow objects anyway, though - you could simply store the path in the shadow object (or the filename or directory name, along with a reference to its parent). If an object changes place, the key reference would still work, and only the internal path would need to be changed. No need for a directory with hard-links.

I have been taking the approach where no shadow objects are created so far, as this makes it easier to browse a filesystem that may be changing. I will have to consider how a shadow structure in the ZODB affects this.

Then of course there is the 'svn up' situation. I imagine the changes triggered by an SVN up can be translated into various added, moved and deleted events, but that is going to be tricky in the face of moved directories and the like.



Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to