[Zope3-dev] Re: principal events for the event hub

Steve Alexander steve@cat-box.net
Thu, 08 May 2003 15:16:13 +0200


Ronald L Chichester wrote:
> I may be out of step here, but...

...maybe not :-)


> Would it be better to have two categories of events?  The first category 
> would be those events that are undertaken immediately.  The second 
> category would be those events that are undertaken periodically (ala 
> cron.hourly, cron.daily, cron.weekly, etc.).  You could then write a 
> specific thread for the periodic events and allocate (more/less) 
> resources accordingly at that specific time. That might take some of the 
> sting out of the scalability issue. 
> Many of the events that I envision for my applications fall into the 
> periodic category.  Something akin to a cron job would be welcome.  I 
> suspect the same is true for other users.

This kind of thing was part of the original requirements for the Event 
service.

Rather than have two categories of events, we have different kinds of 
subscriber. For example, I might subscribe a CronHourly event channel to 
the event service. This will receive certain kinds of events and send 
them on to its subscribers every hour.

An event channel is a component that subscribes to receive events, and 
also has its own subscribers that it notifies.

One of the challenges of writing such an event channel is how to handle 
sending the events periodically. In a given system, you only want one 
thread sending such periodic events. In a stand-alone Zope, there should 
be a thread responsible for this. In a ZEO cluster, there should be one 
single-threaded ZEO client responsible for this. We should consider some 
zconfig directives for this kind of thing.

I think Ulrick Eck has been working on a scheduling service. I wonder 
how that is going?

--
Steve Alexander