[Zope3-dev] discussion about ObjectHub, EventService etc. (was event-meta.zcml...)

Steve Alexander s.alexander@lancaster.ac.uk
Wed, 18 Dec 2002 11:37:12 +0000


> when gary and i discussed the current implementation of the 
> hubid-subscriber we agreed, that it'll be expensive to traverse to
> the objecthub to get the location of the subscriber and then traverse
> to the component to deliver the published event.

It is fairly expensive now. Traversal is very common in Zope 3. 
Traversal will be optimised later. We should concentrate on doing things 
right for now.


> are there any security related reasons, why an objecthub should not
> be referenced directly ? .. no security-related information is stored
> in it.

Object hubs and the Event Service are event channels. There may also be 
other event channels to filter events and batch-up events.

Whan an event channel notifies a subscriber, that subscriber may do 
things in response to the event. We need to notify the subscriber in the 
subscriber's context so that we can get the appropriate security grants 
for that context. The security grants will influence whether or not the 
subscriber is allowed to do things in response to the event.

So, an ObjectHub should not be referenced directly. It needs to have a 
context so that it can notify its subscribers in context.

The only things that can subscribe by reference are "leaf" subscribers 
that don't themselves have further subscribers, and event channels where 
all of the subscribers to that event channel subscribe by reference.


> another thing: i haven't yet seen any usage for the 
> global-event-service. who will subscribe to it, what event's do the
> subscribers get and how well does all this play with clustered sites
> using zeo ??? (events are not published across clustered instances
> afaik)

The global event service is subscribed to by subscribers that implement 
global invariants. These include a dependency checker in
lib/python/Zope/App/OFS/Container/configure.zcml that ensures you don't 
remove from a container an object that has dependencies, and the 
mechanism for storing dublin core annotations for creation and 
modification times.
See lib/python/Zope/App/DublinCore/configure.zcml.

--
Steve Alexander