Information Technology Reference
In-Depth Information
interface Vehicle {
};
interface Car:Vehicle{
};
Figure 2.6.
An example of the CORBA IDL's support for inher-
itance.
Servers that implement derived interfaces, however, are considered an im-
plementation of the basic interface, which gives a notion of polymorphism as the
server is treated as though it were of both the base type and the derived type
within the CORBA architecture [122].
2.4.1
CORBA Event Service
Standard CORBA requests are synchronous in nature. A request is sent from a
client to a server via the ORB and the client suspends awaiting a response from
the server. In this scenario, both client and server must be available.
The CORBA event service [76] decouples communication between clients and
servers using either the push model or the pull model .
The push model allows the supplier of events to initiate the transfer of event
data to consumers, while the pull model reverses this by allowing the event con-
sumer to request event data from the producer.
The CORBA event architecture uses an event channel , an intervening ob-
ject that allows producers and consumers to communicate asynchronously. This
architecture is illustrated in Figure 2.7.
2.4.2
CORBA Example IDL
In order to implement our simple date application, we are firstly required to define
the CORBA interface in an IDL file 4 . Figure 2.8 illustrates the IDL implementa-
tion for our simple example.
Our IDL defines a simple interface with two operations, getDate() ,our
method to return the server's date and shutdown() , a method used to shut down
the ORB.
Once we have defined the IDL we run the IDL through the idlj compiler
to generate CORBA helper files that are necessary to implement the client and
server code. Once run, the idlj compiler generates the following files:
4 This example is derived from [101].
 
Search WWH ::




Custom Search