[Zope-dev] Multi-homed objects?
Is there any reason why an object cannot be contained in more than one Folder in the ZODB? Apparently what I'm talking about is very similar to hard linking in UNIX... I can't think of any reasons why this would be bad but I can't think how to implement an 'Add hard link to this object' function... Ideas/comments? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Multi-homed objects?
On Mon, 17 Jul 2000, Chris Withers wrote: Is there any reason why an object cannot be contained in more than one Folder in the ZODB? Apparently what I'm talking about is very similar to hard linking in UNIX... Hardlinks are prohibited on directories; and 5 minutes ago you said all objects are foldersih :) Hardlinks are prohibited on directories because it'd cause infinite loops on traversing. Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Multi-homed objects?
Oleg Broytmann wrote: Hardlinks are prohibited on directories; and 5 minutes ago you said all objects are foldersih :) I'm not sure if my statement applies in this situation... ;-) Hardlinks are prohibited on directories because it'd cause infinite loops on traversing. Hmm, would Python catch those already? Obviously care would need to be taken and it might be possible to build a loop checker into whatever creates the hard links... cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Multi-homed objects?
Chris Withers wrote: Oleg Broytmann wrote: Hardlinks are prohibited on directories; and 5 minutes ago you said all objects are foldersih :) I'm not sure if my statement applies in this situation... ;-) Hardlinks are prohibited on directories because it'd cause infinite loops on traversing. Hmm, would Python catch those already? Obviously care would need to be taken and it might be possible to build a loop checker into whatever creates the hard links... This could be part of a "visitor" interface I've been pondering in the back of my mind. It would be capable of traversing, performing an arbitrary function, and never falling into a recursive trap. class ObjectManager: ... def visit(self, func, visited=()): func(self) for id in self.objectIds(): ob = self._getOb(id) if hasattr(ob, 'visit') and ob not in visited: ob.visit(func, (ob,) + visited) Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Multi-homed objects?
On Mon, 17 Jul 2000, Chris Withers wrote: How does it work in Unix? (that seems to be a good baseline :-) On UNIX symlink is not a link - it is a text file, that contains a name of resource. The name could points to nowhere, or to resource, even to other symlink... Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Multi-homed objects?
Terry Kerr wrote: Where would the object aquire its attributes from? Would it try one of its folders, then the other? Which order would it choose? Now that's a very good question ;-) Probably from the folder you referenced it from and then normal acquisition from then on... cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )