[Zope3-dev] EventService, references, and subscription semantics
Steve Alexander
steve@cat-box.net
Mon, 25 Feb 2002 18:38:12 +0000
Casey Duncan wrote:
>
>
>>Then, we still have the issue of what to use for references.
>>We can use object references provided we're happy to only allow
>>persistent objects to be passed to subscribe().
>>
>
> This is the problem I tried to work on in my ExplicitObjectReferences
> proposal. The problem with using regular object references is that the
> subscriber looses its original context and the reference makes the object
> persist even if it is deleted from its original location.
>
> So unless these two things aren't an issue, I don't think object references
> will work for this. I will definitely not mind being wrong, however.
I thinnk you're wrong :-)
The object references are only used in the EventService to keep a
collection of subscribers.
A separate issue is of ObjectEvents, which are passed around by a
traversable location.
The ObjectEvents get converted into RuidObjectEvents in the ObjectHub.
The ObjectHub keeps track of an ruid<->location mapping. So, if you have
an ruid, you can ask the ObjectHub to resolve it into a location (which
lets you get an object with appropriate context).
--
Steve Alexander