[Zope-Coders] Re: [Zope-dev] Speaking of 2.6...

Mario Valente mvalente@ruido-visual.pt
Wed, 10 Apr 2002 16:05:28 +0100


At 15:43 09-04-2002 -0400, Shane Hathaway wrote:
>>   As in Unix, a hard link has different semantics from a soft link. I'm
>>  thinking of the "hard link" semantics. 
>
>Object links and references might not be realistic for Zope 2, unless 
>you can solve the ID problem.  The ID of an object is currently stored 
>in two objects--the container and the object.  If they do not match, bad 
>things will happen.  ZMI, getPhysicalPath(), restrictedTraverse(), etc. 
>will get confused.
>
>When you make a hard link or symlink, the ID then has to match in 
>several places.  If you rename a link, does that change the name of the 
>original object?  It shouldn't, but unless it renames the original 
>object also, you're in trouble.
>
>Maybe we could say that objects that are linked must never be renamed. 
>But then we'd lose one of the main benefits of links.
>

  Hard links in Unix can be renamed. They rename the original object.

  Thats what my first hack does: the object is *actually* the same object,
 but with different "points of presence" on the Zope tree (like Myroslav said)

  Actually, if you look at the code, what Zope does right now is that an
 object on the Zope tree is a hard link to an object on the ZODB. Zope just
 doesnt allow multiple references to the object in the ZODB thus prohibiting
 more than one hard link :-)

  C U!

  -- MV