12.01.2014 Views

Corba Services and Facilities

Corba Services and Facilities

Corba Services and Facilities

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CORBA Server Features<br />

The Object Implementation Side<br />

An object implementation provides the semantics of the object, usually by defining data for the object<br />

instance <strong>and</strong> code for the object's methods. Often the implementation will use other objects or<br />

additional software to implement the behavior of the object.<br />

Generally, object implementations do not depend on the ORB or how the client invokes the object.<br />

Object implementations may select interfaces to ORB-dependent services by the choice of Object<br />

Adapter.<br />

1. Object Implementation Side Components<br />

The Object Adapter provides interfaces between ORB <strong>and</strong> object, allowing the ORB to prepare the<br />

object to receive a request, <strong>and</strong> allowing objects to notify the ORB that they are ready (or not ready) to<br />

process requests.<br />

Static IDL skeletons are the server-side equivalent of client stubs, created by the IDL compiler to<br />

bridge between the ORB <strong>and</strong> the object implementation. There will be a skeleton for each object type<br />

bound to the ORB.<br />

The ORB uses the Dynamic Skeleton Interface to create a proxy skeleton for objects, typically remote,<br />

whose static skeletons are not bound to it. ORBs will create a dynamic skeleton to pass the invocation<br />

to the remote object via its own ORB.<br />

Finally, there is the ORB interface itself, which provides operations on object references, plus access<br />

to the Interface <strong>and</strong> Implementation Repositories. The object reference can take two forms: one is<br />

directly useable in an invocation as either target or parameter; the other is the stringified object<br />

reference since it is actually a text string.<br />

2. Object Implementation Structure<br />

An object implementation provides the actual state <strong>and</strong> behavior of an object. The client's view of the<br />

object implementation is of an object instance that is always running, active, <strong>and</strong> ready to respond to<br />

any operation in its IDL interface definition. There is no OMA operation to activate an object instance<br />

(although there is an operation to create the instance, by invoking a factory object); the client just<br />

sends an invocation.<br />

The object implementation, the ORB, <strong>and</strong> CORBAservices work together to activate object instances<br />

when needed, <strong>and</strong> then allow them to store their state <strong>and</strong> deactivate during periods<br />

of nonuse. The object implementation interacts with the ORB in a variety of ways to establish its<br />

identity, to create new objects, <strong>and</strong> to obtain ORB-dependent services. It primarily does this via<br />

access to an Object Adapter, which provides an interface to ORB services that is convenient for a<br />

particular style of object implementation.<br />

When an invocation occurs, the ORB Core, object adapter, <strong>and</strong> skeleton arrange that a call is made to<br />

the appropriate method of the implementation. A parameter to that method specifies the object being<br />

invoked, which the method can use to locate the data for the object. Additional parameters are<br />

supplied according to the skeleton definition. When the method is complete, it returns, causing output<br />

parameters or exception results to be transmitted back to the client.<br />

When a new object is created, the ORB may be notified so that it knows where to find the<br />

implementation for that object. Usually, the implementation also registers itself as implementing<br />

objects of a particular interface, <strong>and</strong> specifies how to start up the implementation if it is not already<br />

running.


3. Object Adapters<br />

An object adapter is the primary way that an object implementation accesses services provided by the<br />

ORB. There are expected to be a few object adapters that will be widely available, with interfaces that<br />

are appropriate for specific kinds of objects.<br />

Object Adapters are responsible for the following functions:<br />

• Generation <strong>and</strong> interpretation of object references<br />

• Method invocation<br />

• Security of interactions<br />

• Object <strong>and</strong> implementation activation <strong>and</strong> deactivation<br />

• Mapping object references to their corresponding implementations<br />

• Registration of implementations.<br />

The object adapter has three different interfaces:<br />

• A private interface to the IDL skeleton<br />

• A private interface to the ORB Core<br />

CORBA - Object Adaptor<br />

Object Implementation<br />

15<br />

1<br />

Register<br />

new Class<br />

Up-call to method<br />

Interface<br />

A Stub<br />

Interface<br />

B Stub<br />

13 Object References<br />

2<br />

Instantiate new<br />

Object<br />

Implement.<br />

Repository<br />

Object Adapter<br />

14<br />

H<strong>and</strong>le incomming<br />

client Requests


• A public interface for use by the object implementations<br />

4. The Basic Object Adapter (BOA)<br />

An object adapter is an object that adapts the interface of another object to the interface expected by<br />

the caller. In other words, it is an interposed object that uses delegation to allow a caller to invoke<br />

requests on an object even though the caller does not know that object's true interface. The OMG<br />

prefers not to see a proliferation of object adapters, so CORBA specifies a st<strong>and</strong>ard adapter called the<br />

Basic Object Adapter (BOA). The BOA is supplied by every ORB <strong>and</strong> can be used for most CORBA<br />

objects. The BOA includes interfaces for generating object references, registering implementations,<br />

activating implementations, <strong>and</strong> some security related requests (e.g. authentication). It is designed<br />

primarily for servers that reside in their own processes separate from their clients <strong>and</strong> the ORB.<br />

The BOA can h<strong>and</strong>le either a program per method, per object, or a shared program for multiple<br />

instances of an object type. The BOA provides a small amount of persistent storage for each object,<br />

typically used for storing a key to persistent storage.<br />

5. The Static IDL Skeletons<br />

This is the server side counterpart of the IDL stub interface. They connect to the server via the<br />

mapping for its programming language, <strong>and</strong> to the Object Adapter via a proprietary interface.<br />

Invocations pass through the skeletons from the Object Adapter to the implementation; requests return<br />

by the corresponding return route.<br />

Where object implementations coreside in the same process as their ORB <strong>and</strong> Object Adapter,<br />

skeletons create virtually no noticeable load on the invocation. However, where the server<br />

resides in its own process, the skeleton will have to manage IPC communications typically using either<br />

shared memory or network communications.<br />

6. The Dynamic Skeleton Interface<br />

An interface is available which allows dynamic h<strong>and</strong>ling of object invocations. That is, rather than<br />

being accessed through a skeleton that is specific to a particular operation, an object's implementation<br />

is reached through an interface that provides access to the operation name <strong>and</strong><br />

parameters in a manner analogous to the client side's Dynamic Invocation Interface. Purely static<br />

knowledge of those parameters may be used, or dynamic knowledge (perhaps determined through an<br />

Interface Repository) may be also used, to determine parameters.<br />

The Dynamic Skeleton Interface provides run time binding mechanism for servers to deliver request<br />

from an ORB to an object implementation that does not have compile time knowledge of the type of<br />

the object. The dynamic skeleton inspects the parameters of an incoming request to determine a<br />

target object <strong>and</strong> method. The Dynamic Skeleton Interface entered the CORBA architecture along with<br />

interoperability. However, the Dynamic Skeleton Interface specification is considered part of the<br />

CORBA Core <strong>and</strong> not CORBA Interoperability. The Dynamic Skeleton Interface is implemented via a<br />

Dynamic Implementation Routine. This mechanism is very h<strong>and</strong>y for building bridges between ORBs.<br />

When a client on one ORB calls a server on another ORB, the Dynamic Invocation Interface transmits<br />

the request to the target ORB, <strong>and</strong> then the bridge uses the Dynamic Invocation Interface to invoke<br />

the target object on that ORB. The target object is specified via the language binding, <strong>and</strong> the<br />

operation is specified as a parameter. Without the Dynamic Skeleton Interface, this would be possible<br />

only if the invoking ORB had linked a skeleton for the target object.<br />

Dynamic Skeletons may be invoked both through client stubs <strong>and</strong> through the dynamic invocation<br />

interface; either style of client request construction interface provides identical results. Dynamic<br />

Skeleton Interface invocations do not enter the target via the same language-mapping constructs as<br />

the static skeleton; instead, the object implementation is required to support the Dynamic<br />

Implementation Routine.


7. The Implementation Repository<br />

The Implementation Repository contains information that allows the ORB to locate <strong>and</strong> activate<br />

implementations of objects.<br />

The installation of implementations <strong>and</strong> control of policies related to the activation <strong>and</strong> execution of<br />

object implementations is done through operations on the Implementation Repository.<br />

In addition to its role in the functioning of the ORB, the Implementation Repository is a common place<br />

to store additional information associated with implementations of ORB objects. For example,<br />

debugging information, administrative control, resource allocation, security, etc., might be associated<br />

with the Implementation Repository.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!