[Zope3-dev] ObjectHub notes: adding objects

Gary Poster gary@zope.com
16 Oct 2002 15:09:32 -0400


[I've been working on an implementation of a local ObjectHub as well as
some other tricks.  I'm going to send out a few emails and wiki pages on
some thoughts and approaches so I can get some feedback before checking
anything in.  Here's the first one. :-) ]

The current ObjectHub implementation and interface disagree on the
meaning and behavior of two events: IObjectAddedHubEvent and
IObjectRemovedHubEvent.  They are described in the interfaces as
subclasses of IObjectRegisteredHubEvent and IObjectUnregisteredHubEvent,
respectively; however, their behavior in the current implementation is
different.  I'd like to bring this to light, discuss it briefly, and
resolve it quickly.  To some (perhaps large) degree, this is a rehash of
some things discussed before with Jim and Steve and Casey, but I want to
make sure that I'm on the right track with my changes.

In the current check-out's implementation, a (standard, non-ObjectHub)
IObjectAdded event that makes its way to the ObjectHub is transferred
unmodified to interested subscribers.  A subscriber may then request the
ObjectHub to register the added object, generating an
IObjectRegisteredHubEvent.  Then the ObjectHub finishes processing the
original IObjectAdded event and so, seeing that the added object is now
part of the ObjectHub registry, sends out a parallel
IObjectAddedHubEvent.

PROPOSAL 1: Let's just get rid of the IObjectAddedHubEvent.  I don't see
any compelling use cases.  I think this was a conclusion to which Jim
had already come, but just want to make sure, because I don't see this
decision written down anywhere.

If folks do want it, I'll describe our options then...

Stay tuned for another exciting OBJECTHUB email, coming to your inbox
soon!

(Sorry, I'm a little tired ;-) )