You are on page 1of 22

CORBA

Common Object Request Broker Architecture. Specification for a distributed application framework. Developed by OMG(Object Management Group). Not a programming language. Enables user to develop application written in different programming languages. The language must have a mapping defined between itself and OMGs IDL.

Benefits
Language Independence Location Transparency

Support for heterogeneous network.


Interoperability

CORBA
An objects functionality can be accessed through its interface. Interface is a collection of public methods and attributes that the object implements. Objects are separated from the client application. Using the interface of the object, 2 pieces of code are generated I.e stub and the skeleton. Stub is used in place of the object in the client application Skeleton is included in the server side application that programmer will create to contain the object.

CORBA
Client interacts with the stub through an interface. Stub takes the details of the instruction. It packs the details into an request and sends ti across the network to skeleton. Server receives request message and the details. Invokes the method on the object,passes the parameters. The return values or exceptions are packaged into reply. Reply is sent to stub. Stub extracts information from reply message and returns it back to client application.
REQUEST STUB REPLY

CLIENT

SKELETON OBJECT

CORBA Framework
IDL (Interface Definition Language)
ORB (Object Request Broker) IIOP (Internet Inter-ORB Protocol)

IDL
Programming language independent language. Created by OMG for defining interfaces of distributed objects. OMG also defined IDL-to-language mappings. This allows an IDL interface to be mapped into a particular programming language. Once the IDL interface is defined, it is compiled using an IDL-to-language compiler to generate stub/skeleton. Interfaces defined in IDL + Mappings enables clients to access objects.

ORB
Facilitates the creation and transmission of request and reply messages that occur between clients and objects (stub to skeleton). Deals with manipulating and acquiring references to remote objects. It is usually implemented as a set of libraries in client and server.

IIOP
Defined by OMG Used by ORBs to send messages between clients and objects.

Is the TCP/IP version of the OMG-defined protocol named GIOP. (General Inter-ORB Protocol)
Vendor independent protocol.

Distributed CORBA Object

C++

Java

C++

Java

IDL

IDL Client

IDL

IDL

IDL Server

IDL

ORB

OMGs Object Management Architecture

Application Objects

Common Facilities

ORB Common Object Services

CORBA facilities:- Horizontal and Vertical facilities. Horizontal Facilities:-user interface, information management ,systems management Vertical Facilities:- Tele Communications, Health care, E-commerce.

Benefits of ORB
Static and Dynamic method invocation

High level language bindings


Self describing system Local/Remote Transparency Built in Security and transactions. Polymorphic messaging

ORB v/s RPC


CLIENT SERVER CLIENT INVOKE INVOKE abc abc On On Object X Object Y SERVER

CODE

OBJECT X

OBJECT Y

Call abc

DATA

abc

abc

Execute abc

RPC Mechanism

ORB Mechanism

STRUCTURE OF A CORBA 2.0 ORB

Interface Repository

CLIENT

Object Implementation

Implementation Repository

Dynamic Invocation

Client Stubs

ORB Interface

Skeletons

Dynamic Skeleton Invocation

Object Adapter

IIOP

Anatomy of CORBA 2.0 ORB


CORBA on the client side:The Client Stubs: Provides static interfaces to object services. Defines how clients invoke corresponding services. It is a local proxy for the remote server object. Services are defined using IDL. Client and server stubs are generated by the IDL compiler. Stub encodes and decodes the operation and its parameters into flattened message formats that can be sent to the server. The Dynamic Invocation Interface: helps to find methods to be invoked at run time. Standard APIs helps to search the metadata, that defines the server interface, generating the parameters, issuing the remote call, and getting back the results.

Anatomy of CORBA 2.0 ORB


CORBA on the client side:The Interface Repository APIs: Allows to obtain and modify the descriptions i.e method signatures of all the registered component interfaces, the methods they support, and the parameters they acquire. Is a run time distributed database that contains IDL defined interfaces. Repository for ORBs Allows components to dynamically access, store and update metadata information ORB Interface: helps to store and communicate object references.

Anatomy of CORBA 2.0 ORB


CORBA on the server side:The Server Stubs: Provides static interfaces to object services. Services are created using IDL. The Dynamic Skeleton Interface: provides a runtime binding mechanism to handle incoming method calls for components that do not have IDL based compiled skeletons. Server equivalent of DII.

Anatomy of CORBA 2.0 ORB


CORBA on the server side:The Object Adapter: Accepts requests for service on behalf of the servers objects. Provides a run time environment for instantiating server objects, passing requests to them, assigning them object ids. Registers the classes and their instances with the implementation repository. Creates CORBA objects and their references, activation and deactivation of CORBA objects. Implementation Repository: Provides a run time repository of information about the classes the server supports, the objects that are instantiated, and their IDs.

Global Repository IDs


Global identifiers to identify a component and its interface across multivendor ORBs and repositories. The IDs are system generated,unique strings that are used to maintain consistency in the naming conventions. The repository id is a string consisting of a three level name hierarchy

CORBA Services
Life Cycle Service Persistence Service Naming Service Event Service Concurrency Control Service Transaction Service Relationship Service Externalization Service Query Service Licensing Service Properties Service Time Service Security Service Trader Service Collection Service

CORBA Business Object


Business Object Component Servers Business Object Other Interfaces Presentation Object

Document

Business Process Object

Other Business Objects

Genesis of RMI & CORBA


RMI:Define a remote interface. Implement the remote interface. Develop the server and client. Generate stubs and skeletons. Start RMI registry, server and client CORBA:Define an interface in IDL. Map the IDL interface to the respective programming language. Implement the interface. Develop the server and client. Run the naming service, server and client.

Difference b/w RMI & CORBA


RMI: Interface definition in Java. Distributed Garbage Collection. No Language Independence CORBA: Interface Definition in IDL. No Garbage Collection. Language Independent.

You might also like