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

Steve Alexander steve@cat-box.net
Fri, 25 Apr 2003 19:20:47 +0200


Gary Poster wrote:
> 
> Shane Hathaway wrote:
> 
>> Another possible benefit I've been pondering is the ability for the 
>> application to restore context when reacting to ZODB-initiated events. 
>> For example, ZODB might tell the application that some object was 
>> modified.  The application looks at the object's hubId and uses the 
>> object hub to get the path to that object.  Then it traverses that 
>> path and invokes some adapter in that context, sending the event to 
>> the adapter.  (Batching events might make it fast.)
> 
> The only fly in that ointment I know of is that objects are usually not 
> aware of their own hubIds.

I would say that the problem is that we can't get the path to traverse 
to get to an object if we know only its oid.

Objects in general do not know their own path or their own hubId. If 
they knew one, they could discover the other.

An object may exist at more than one location (that is, you can traverse 
to it via more than one path). For that reason, an object may have more 
than one hubId, as the ObjectHub's mapping is hubId<-->path.

--
Steve Alexander