[Zope3-dev] Re: IKeyReference for files

Christian Theune ct at gocept.com
Wed Mar 28 19:20:46 EDT 2007


Hi,

Am Mittwoch, den 28.03.2007, 18:05 +0200 schrieb Martijn Faassen:
> Hey Christian,
> 
> Christian Theune wrote:
> 
> > Am Mittwoch, den 28.03.2007, 01:12 +0200 schrieb Martijn Faassen:
> [snip]
> 
> > 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.
> > 
> > Voila.
> > 
> > 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.

Right. I'm not sure whether I missed anything, but I don't quite have
your whole use case on my radar.

Blobs have the advantage that they can assume to be the only source of
changes to the physical storage location.

Having changes to a (cached) data structure from the outside is always
troublesome.

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070329/11e69f93/attachment.bin


More information about the Zope3-dev mailing list