[Zope3-dev] ObjectHub: Kill the plugins!

Gary Poster gary@modernsongs.com
17 Oct 2002 20:00:00 -0400


[the fifth in a series of emails about the ObjectHub]

I have been prototyping a client of the ObjectHub (the RelationManager
discussed elsewhere) and have come to the conclusion that I don't like
the idea of ObjectHub plugins at all. :-)  

The ObjectHub was supposed to hold plugins that did stuff like indexing
and relating and so on.  They were merely subscribers to the ObjectHub
that were conveniently placed.  In part this was because of the concept
that we might have multiple ObjectHubs operating as different services. 
We have since simplified that concept so that now there is one ObjectHub
service named, amazingly, "ObjectHub".

As such, there is no longer any use for yet another piece of
infrastructure--that is, making the ObjectHub a folder and specifying
that only ObjectHub plugins can go in there and so on--when we can
simply say "getService(context, 'ObjectHub')" and take advantage of the
infrastructure we already have.  Things we thought of as plug-ins are
merely subscribing clients: as such, they can be services themselves, or
utilities, or whatever is appropriate.  With the elimination of the
responsibility on a plug-in to handle translating removal of objects to
unregistration in the ObjectHub that Chris, Steve, and I agreed upon
today, the last reason I had for plugins disappeared.

PROPOSAL: Eliminate the concept of ObjectHub plugins.  The ObjectHub has
a simple contract: keep track of integer-to-path mapping, act as a
transparent event channel, and generate hub events for its subscribers. 
That's it.  Any clients doing other tasks live elsewhere, using the
ComponentArchitecture infrastructure, and have their own interfaces.