Forum OpenACS Development: Re: Toughts on an Event Engine

Collapse
Posted by Claudio Pasolini on
Hi Antonio,

the canonical way for inter package communication should be acs-service-contract. Personally I find it too complicated and think that using callbacks is way more simple.

Regarding the websockets Wolfgang Winkler made a Tcl implementation.

Collapse
Posted by Antonio Pisano on
The use case I had in mind is slightly different from what it can already be achieved by callbacks. Let me explain:

I want the server to notify connected clients about events happened. This means that wherever something noteful happens, the server should be able to push this information to the clients listening to such events.

I don't think it can be done with callbacks, because we cannot contact clients from the server directly. We need them to connect to a special webservice which remains silent until the event happens, then spits out some information.

In the meantime I created a package in which I implemented my idea of event handler: it allows the throwing of arbitrary events with a simple api. You can then define a webpage which will listen for any of this events to fire, each time reacting with a user-defined piece of code.

I will soon submit my code to the public to be commented.