Core Architecture  «Prev  Next»
Lesson 5 The CORBA server
Objective Learn more about how CORBA servers are constructed and used.

CORBA Server Construction

At the most basic level, a CORBA server provides services to CORBA clients, often many simultaneously. The CORBA server development process is similar to CORBA client development.
server development process
Server development process: 1) IDL file, 2) IDL pre-processor, 3) Skeleton, 4) CORBA Server/Implementation

As a result of running the interface definition through an IDL precompiler, Skeleton and other support files are produced. The server or Implementation developer then writes the interface implementation code. The server-side Skeleton plays a role that is similar to a client-side Stub.
Server skeleton
Server skeleton

Skeleton accepts CORBA Requests
The Skeleton accepts CORBA requests, performs any tasks related to data marshalling, and forwards the request to the associated CORBA server. The Skeleton performs in reverse order to handle any CORBA replies from the server. You may have noticed in the above image an Object Adapter. The Object Adapter (which most vendors have implemented as the Basic Object Adapter, or BOA) is an ambassador between the ORB and the server. The CORBA specification has also added a section describing a new Portable Object Adapter (POA).

Portable Object Adapter

The OMG, after realizing that this diverging of the BOA was becoming a problem, requested proposals for either enhancing the BOA or devising a new type of Object Adapter that would correct the problems encountered using the BOA. The result of that request is the new Portable Object Adapter (POA), which has been adopted as the Object Adapter in the CORBA specification. The POA actually deprecates the BOA and is intended to completely replace the BOA in time, but vendors are free to maintain support for the BOA, so that existing applications remain functional. The POA adds quite a bit of control and portability over and above the BOA, but because the BOA was generally easy to use programmatically, the POA may also be used in very simple ways. This avoids making the POA uselessly complex for applications that only require simple Object Adapter services.
The enhancements added by the POA include:
  1. A more object-centric set of activation policies, which allow finer grained control of how CORBA objects may be activated to satisfy client requests
  2. Explicit control over the threading policy to be used. When using the BOA, CORBA vendors were free to make whatever threading configuration they wished available. This is specified more strictly for the POA
  3. Objects registered with a POA may be given default lifespan attributes as a group
  4. A high degree of control over how CORBA requests are routed to objects, allowing sophisticated default and optimized routing models
  5. The introduction of a root Object Adapter concept, RootPOA, that provides an interface for creation of nested POAs.
Many of the vendors have begun to include POA support into product releases and full POA support should be available in the near future. The resultant CORBA server code will enjoy much greater control over how it interacts with the Object Adapter and the ORB, as well as a higher level of interoperability.
  1. There are different types of CORBA object adapters.
  2. The Portable Object Adapter, or POA, is a particular type of object adapter that is defined by the CORBA specification
  3. An object adapter that is a POA allows an object implementation to function with different ORBs.

Object Adapter

The Object Adapter helps CORBA servers by:
  1. Assisting servers as they register their services to the ORB
  2. Generating a unique ID called CORBA Object Reference for the server
  3. Enabling client requests to correctly find their way to the server
  4. Activating or deactivating the server, as required
At this point, you should have a good foundation of understanding regarding CORBA clients and CORBA servers. In the following lesson, we will take a different point of view on these topics and look at things as they relate to the ORB.
The following section discusses the CORBA server development process.

Corba Server Development Process

Here is the proper order for the CORBA development process:
The following order for the CORBA development process is generally correct.
Here's a breakdown of the typical steps involved:
  1. Write the IDL that Describes the Interfaces
    • Interface Definition Language (IDL) is used to describe the interfaces that CORBA objects will expose. This is the first step, as the IDL defines the contract between the client and the server.
  2. Run the IDL Pre-Processor
    • After writing the IDL, it must be compiled using an IDL compiler (also called an IDL pre-processor) to generate the necessary stubs and skeletons for the client and server. These are the code artifacts that both sides will use to communicate.
  3. Develop the CORBA Server and the CORBA Client
    • Once the stubs and skeletons are generated from the IDL, you can start developing the server and client.
    • Server: Implements the interface defined in the IDL.
    • Client: Uses the interface defined in the IDL to communicate with the server.
  4. Compile and Run the CORBA Server
    • After the server has been developed, compile the server code along with the skeletons generated by the IDL pre-processor. The server must be up and running to handle requests from clients.
  5. Compile and Run the CORBA Client
    • After the client is developed, compile the client code with the stubs generated by the IDL pre-processor. Once the client is compiled, it can be executed to interact with the server.

Summary of the Correct Process:
  1. Write the IDL that describes the interfaces
  2. Run the IDL pre-processor
  3. Develop the CORBA server and the CORBA client
  4. Compile and run the CORBA server
  5. Compile and run the CORBA client

This sequence represents the typical steps for developing CORBA applications. Let me know if you'd like more details on any of the steps!


SEMrush Software