Aida Event Handling

Efficient asynchronous event handling is the sina qua non of a control system. Callbacks implemented using the CORBA oneway can be utilized for this purpose but they have some disadvantages. All error handling and recovery must be handled by the application. The callback approach also does not scale well as the number of events increases.  For additional problems associated with oneway callbacks see [1] Chapter 20. For those reasons we've decided to use the CORBA Event Service and later the Notify Service for event handling in Aida. Since we don't want any client or sever polling, we use the Push Consumer and Push Supplier delivery models. The figure below gives a simple picture of event handling using the Event or Notify Service. References [2] and [3] are the current Orbacus documents covering the Event and Notify services respectively. 

Orbacus distributions include a number of useful code snippets and we used the PushServer and PushConsumer_impl  examples in the event demo files as the basis for our implementation. The clients & servers each obtain a reference to the Event Service and interact with a proxy interface that makes it appear that suppliers and consumers are interacting directly with each other. The server simply pushes the event in the form of a CORBA Any to the proxy consumer. The consumer must implement a PushConsumer class that has within it a "push" method that receives a CORBA Any type. 

While the Event Service is better than simple oneway callbacks, it also has serious limitations, some of which are addressed by the Notify Service. Lack of structured events, event connection persistence, event filtering or quality of service are some of the problems with the existing Event Service. Again see [1] Chapter 20 for more details of these limitations. We think that the Notify Service combined with the CORBA Message Service (not yet implemented) will provide a robust and extensible set of services around which to build higher level applications for a Control System. 

[1] Advanced CORBA Programming with C++ / Michi Henning, Steve Vinoski, Addison-Wesley.
[2] Orbacus 4.x includes Event Service.
[3] Orbacus Notify Service.

[Aida Home Page][SLAC Controls Software Group][ SLAC Home Page]

Author:  Robert C Sass, 23-Oct-2001
Modified by: