Summary on CORBA Event System

Fang Cheng

June 16, 2000


There is no absolutely correct or unique way to handle events for any application system. Depending on its need and characteristic, each system can have its own implementation of the event system. Even in a particular area such as application systems built using CORBA, we could have different flavors. In this essay, I will summarize the event types and models we have encountered from the list of papers we read on CORBA and CORBA application systems. (Refer to the paper list on my progress reports.)

Types of events:

1. Synchronous (coupled)

Two sides, usually a client and a server. The client makes a request with the server, then blocks itself until it receives a response or an exception from the server.

This model is widely used in many application systems.

Drawback:

Advantage:

 

2. Asynchronous

Two sides. One side makes a request without blocking itself for response. One side provides the response. To receive response, the system uses

    1. Callbacks from the other side, once or periodically.
    2. Pulling, once or periodically.

Callback once from the other side and polling are two mostly seen model.

These decoupled approaches are more complicated than synchronized ones. At least one side needs to maintain the connection information, provides register and un-register interface. In order to survive from application re-starts, events and connection information should be kept in a reliable storage for persistency (system dependent). Error and exception handling tends to be more complicated as well.

In addition, the characteristics of a particular system might put some cases more complicated. For example, in order to un-register, the application needs to locate the right connection and cancel it. Some matching function needs to be used. However in CORBA, if we just use the object reference in returning and matching for simplicity, the is_equivalent function does not guarantee the right answer when comparing two object references. It could return no for situations that it could not be decided. As an alternative, the actual object needs to be returned when one side registers itself.

The decoupled system could be more flexible and more intellectual in implementation. For example, when thousands of requesting sides register for the same event notification, in synchronous case, thousands of objects on the requested side must be generated. However, in asynchronous case, the same request may be combined, and the requested side could just launch one object and send the reply to all of the requesting side.

In any systems, reliability is always versus the complexity. Since requests are decoupled and could be answered much later. Problems raise as how to handle when error situation happens, how to inform exceptions to the other side, how to handle some bad behavior of the other side, how to avoid itself getting into the hang state, etc. The solutions are purely dependent on the implementation of each system. However, reliability of a system is always in exchange of the system complexity.

Scalability varies by systems. Overall, asynchronous is better than synchronous and discontinued system pulling or callbacks is better than continuous implementation. Asynchronous is better than synchronous on that it is likely that there are less concurrent connections at a particular time, However operating system handle ability might block us for more connections because overwhelming volume of connecting request at a particular time(in polling case). Also in a poor implemented server, if it does not handle a situation correctly when the other side does not co-operate, accidentally unclosed connections will have dramatic bad effect on scalability.

Decoupled systems tend to be more breakable than coupled system. Fortunately, in CORBA, type-safe extraction of event data from the IDL any type helps one side to filter out unwanted event. However there is no way to control the request volume that one side polls or callbacks to the other side. Potentially, one side could be flooded by the other sides.

 

2.1. Callbacks

The requested side sends reply back to the sender when requests being processed or notification condition is satisfied.

.

Drawback:

Advantage:

 

Pulling:

The requesting side re-connects the requested side, and checks if the result is available.

Drawbacks:

Advantage:

 

3. OMG Event Service

Three parties, an event supplier, and event consumer, and a ‘mediator’ (event channel) in between of the two. The event channel provides delivery of event data from event supplier to event consumers without requiring consumer and supplier to know each other.

There are four models of component collaboration, Canonical push, canonical pull, hybrid push/pull, and hybrid push/pull. (see Douglas column 9, figure 4). Any application system that uses the Event Channel needs to choose one from these models.

The event service specification is rather general. It lacks detailed semantics or protocol specification. The intention behind is to avoid over-constraining for all system implementations and to allow developers only implement features that are necessary. As a result, how event channel will behave and how its features (filtering, transactions, implement of persistence, realization of correlation, etc) are designed could vary from vendor to vendor. An example Douglas has given is that in OrbixTalk, the events are distributed via IP multicast which is different to the HP ORB Plus Events Service. Its distribution is based on IIOP that sequentially deliver event data to consumers.

Event channel usually has to provide the interface so that consumer and supplier can connect with the event channel. (Not necessary persistent connection). In addition, it needs to maintain supplier and consumer connection information as well as some administrative duties.

Advantage:

Drawback:

 

3.1 Reliability with Event Service

(http://lsewww.epfl.ch/~rachid/papers/ftdcs97.ps.gz)

In order to solve the event channel as the single point of failure, several ways are suggested to de-centralize the event service.

Firstly, event channels can be replicated. With event service push model, a replication copy of the event data could be produced when the event channel pushes event data to all consumers. The replicated server only needs to register itself with the event channel as a regular consumer. Not too much extra work is needed if we only require one replica server. However, group communication is needed to keep replicated event channel objects consistent if more than one replica copies are needed.

Another approach is to split one event channel to several ones based on 'duties'. For example, one event channel could be divided into two event channels, one sits close to the event consumer and one close to the event supplier, and depends on whether it handles response or request, the event channel could be further divided into more event channels.

 

3.2 Filtering

Since CORBA Event Service does not require the event channel to do filtering, and event data could be pushed from all suppliers to all consumers. As a result, consumer could get unwanted event data and it is up to them to take only those that are useful. This is bad as it wastes the network bandwidth. If we just let consumers figure out its own event by checking whether casting IDL any to its event data successful or not, it might be inefficient for high-performance applications. Besides, it will cause a potential security leak.

One solution is to attach the filter in the event channel so that consumers only receive events that they are interested in. TAO, a real time event service developed at the University of Washington uses this model. Even though this does not require any changes in the Event Channel Specification, it does require an extra interface to be written so that filters can be installed within the event channel. In this solution, how the filter is to be implemented is totally left with each system. A suggestion has been proposed to standardize the filtering by extending the CORBA Event Service Specification to explicitly support event filtering.

The drawback of putting the filters on the event channel is that it increases the complexity of the event channel, slows down the process, while the event channel is the single point of failure of the system.

Filters can also be put at the event supplier side. The advantage is that overall, it does not send out unwanted event data, and it does not cause the single point failure. However, it can not solve the case when multiple consumers have different filtering requests. Event data will be sent out as long as one consumer requests it, to all the consumers. In addition, in this model, event supplier has to maintain all the consumer information, which is not suitable for some types of the systems. E.g. channeled (grouped) music broadcasting. The consumers might not want to identify themselves, or there are potentially large number of consumers. For the supplier, even though all it cares is just the consumer’s group identifiers instead of their own identifiers, ids must be kept in order to decide which group the consumer belongs to. This design also increases the complexity of the supplier. It has to provide interface for the consumers to ‘subscribe’ to. However, this design has been quite attractive and being adopted by event systems such as CORBA Event Architecture (CORBEA) developed at Cambridge. TAO, besides its filtering in its event channel, also defines event subscription, which eventually provides supplier-based filtering.

One general design principle about filtering is that it is important to keep filters as simple as possible at the event system support layer. (CORBA event service does not have any requirement for filtering even though some people have suggested that CORBA event service should be extended towards that direction.) Application layer is the preferred layer to apply more sophisticated filtering. Also depend on a particular event system, the tradeoff between the event traffic and the complexity of the filter implementation should be carefully considered.