In publish/subscribe applications, objects involved in the communication could be arbitrary. There are two types of objects in publish/subscribe communication; the event suppliers (providers and publishers) and event consumers (observers and subscribers). Also, there are two event transfer models; the event pushing and event pulling. Objects involved in the publish/subscribe communication are de-coupled from each other by the message middleware. These objects are not dependent on the existence and status of other objects in order to work properly. Event suppliers transfer events to the channel regardless the existence of consumers.
In single directional event distribution, events flow from upstream into downstream. Specifically, events flow from suppliers to channels and subsequently flow from channel into subscribed consumers. Event transfer is
asynchronous and buffered. Suppliers can get acknowledgment from the message middleware, not from the consumers. This means event transfer routing through a message middleware could have much higher throughput than synchronous method invocation without routing.
The main concept in OMG Event/Notification is the channel. Events are sent into an event channel and replicated to their recipients. Multiple independent channels can be created and used by a given application. Events are either pushed or pulled into an event channel from the supplier. The events flow inside the channel in a downstream direction. Events in the downstream end are buffered in proxy suppliers and are pushed to or pulled by consumers. Application level event suppliers or consumers are connected with proxy objects to transfer events into/from the channel.
In the downstream end of a channel (consumer end):
In the upstream end of a channel (supplier end):
The OMG Event/Notification Service defines four types of notification channels; the untyped,
structured,
sequence, and
typed. The event interfaces of the first three channels are pre-defined by OMG Event/Notification specification and are referred to as “pre-defined” channels. The event interfaces for typed channels are not pre-defined by OMG but by user applications and are referred to as “user-defined” typed channels. VisiNotify supports all four types of channels with the exception of the sequence pulling.
With the untyped channel, events are represented as CORBA Anys. Events are sent by invoking
push() operation with
CORBA::Any as an input parameter using untyped consumer or proxy untyped consumer objects. With structured and sequence channels, events are represented as
StructuredEvent IDL structures or sequence. Events are sent by invoking
push_structured_event() or
push_structured_events() on the respective consumer or proxy consumer. With a typed channel, there is no predefined event interface. Event interfaces are defined by user applications as OMG IDL interfaces. Events are sent by invoking non-pseudo operations on consumers’ or proxy consumers’ typed interfaces.
Since VisiNotify does not rely on the IR when filter is not used, the key parameters used in calling obtain_typed_..._consumer/supplier() are not necessarily to be the event interface repository id. Therefore, applications can choose the proxy keys as an alternative filtering strategy. Applications can use proxy keys to divide a given typed channel into multiple logical channels. This approach is more efficient and flexible than the constraint language parsing based filtering.
The second scenario involves using the structured event channel. In this scenario, all suppliers are CORBA applications sending CosNotification::StructuredEvent to the structured event channel. In the downstream end, some consumer applications can be a CORBA application connected as structured consumers while others are consumers that can be structured event EJB beans. A structured event EJB bean is no different from a normal session or entity bean. A structured event bean and its remote interface implements and declares a
push_structured_event() operation with
org.omg.CosNotification.StructuredEvent as input parameter. VisiNotify provides a utility,
subtool, to connect a structured event bean's remote interface to a given VisiNotify structure event channel.