[Zope3-dev] event service and channel

Steve Alexander steve@cat-box.net
Thu, 18 Apr 2002 18:14:29 +0100


Gary Poster wrote:
> 
> 3. (Event channels)
> 
> This is less pressing, but...
> 
> While some objects, like the Object Hub, are specialized event channels, 
> Tres' design also includes named event channels, which seem like a great 
> idea.  If a certain event type will be subscribed to by many objects, make 
> that event have its own channel, and subscribe to it.  Careful channel design 
> could significantly reduce the churn of processing a given event publication.
> 
> How should these named event channels be accessible?  Where should they live? 
>  What, in terms of Component Architecture, are they, even?

I've always liked the model of classifying events into topics, as used 
in ObjectSpace Voyager.

Basically, events are classified by a string made up of name segments. 
For example:

   sports.football.news

for an event related to news about football. (btw, that's "soccer" for 
americans :-) )

Imagine many other such classifications in your event system:

   daily.news.football
   daily.news.weather
   recreation.arts.crochet

There's an event publishing system that allows you multicast an event to 
a range of categories given by imprecise criteria. So, if you want to 
send to all the daily news, you send to the channel:

   daily.news<

That would multicast to all subcategories and subsubcategories of 
daily.news.

To get anything daily about football:

   daily.*.football

That would pick up:

   daily.scores.football
   daily.news.football
   daily.fatalities.football


Here's an overview of Voyager:

http://www.objectspace.com/pressRoom/javareport-dec99.asp

Here's the API specification for topical events:

http://nibbler.tk.informatik.tu-darmstadt.de/LectureNotes/software/voyager/doc/api/com/objectspace/voyager/space/publishing/Subscriber.html

(all on one line)

--
Steve Alexander