[Zope3-dev] zwiki: performance of findChildren()

Gary Poster gary@modernsongs.com
Fri, 25 Apr 2003 12:52:45 -0400


Guido van Rossum wrote:
>>In Zope (both Zope 2 and Zope 3), we want to be able to refer to objects 
>>in context.  As you know, the OID doesn't tell you enough to do that. 
>>You usually don't want to use paths to refer to objects in context 
>>either, since the path can change.  You don't want to make a registry of 
>>OID to path, since OIDs should not have any meaning to the application.
>>
>>So the ObjectHub solution is to assign a new arbitrary ID to objects--a 
>>"hubId"--and keep a registry of hubId to path.  That way an object can:
>>
>>- Make "weak" references to other objects
>>
>>- Refer to an object even if it moves or gets exported/imported
>>
>>- Avoid depending on OIDs
>>
>>So, that's my understanding of the core of object hub.  Correct me if 
>>I'm wrong, anyone.
> 
> 
> Sounds right according to my own feeble understanding.

Yup.

> Which leads to a suggestion (mayby Gary can refute it): why not use
> OIDs as hubids?  Is this because OIDs are fairly long (e.g. 8-byte
> strings)?  Or is it because you don't know a new object's OID until
> after the transaction that creates it is committed?

I believe that the primary concern was that a given Zope instance might 
have multiple mounted databases.

Gary