� � � � � � � � �
� � � � � � � � � ��
� � � � � � � � � ��
� � � � � � � � � ��
502 DISTRIBUTED OBJECT-BASED SYSTEMS CHAP . 9
����������������������������������������������������������������������������� �����������������������������������������������������������������������������
Request type Failure semantics Description
Synchronous |
At-most-once |
Caller blocks until a response is returned or an exception is raised |
One-way |
Best effort delivery |
Caller continues immediately without waiting |
|
|
for any response from the server |
Deferred |
At-most-once |
Caller continues immediately and can later |
synchronous |
|
block until response is delivered |
����������������������������������������������������������������������������� ����������������������������������������������������������������������������� �������������������������������������������������������������������������������
Event and Notification Services
Figure 9-4 . Invocation models supported in CORBA .
Although the invocation models offered by CORBA should normally cover most of the communication requirements in an object-based distributed system , it was felt that having only method invocations was not enough . In particular , there was a need to provide a service that could simply signal the occurrence of an event . Clients amenable to that event could take appropriate action .
The result is the definition of an event service . The basic model for events in CORBA is quite simple . Each event is associated with a single data item , generally represented by means of an object reference , or otherwise an applicationspecific value . An event is produced by a supplier and received by a consumer . Events are delivered through an event channel , which is logically placed between suppliers and consumers , as shown in Fig . 9-5 .
Push event to consumers
Consumer Consumer
Event channel
Supplier Supplier Supplier
Figure 9-5 . The logical organization of suppliers and consumers of events , following the push-style model .
Fig . 9-5 shows what is referred to as the push model . In this model , whenever an event occurs , the supplier produces the event and pushes it through the event channel , which then passes the event on to its consumers . The push model comes closest to the asynchronous behavior that most people associate with events . In effect , consumers passively wait for event propagation , and expect to be interrupted one way or the other when an event happens .
An alternative model , also supported by CORBA , is the pull model shown in Fig . 9-6 . In this model , consumers poll the event channel to check whether an event has happened . The event channel , in turn , polls the various suppliers .
Although the event service provides a simple and straightforward way for