Common Object Request Broker Architecture (CORBA)

29
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins

description

Common Object Request Broker Architecture (CORBA). By: Sunil Gopinath David Watkins. Introduction. What is the purpose / goals of CORBA? How to meet goals? Example Conclusion. What is the purpose / goals of CORBA?. Enable the building of plug and play component software environment - PowerPoint PPT Presentation

Transcript of Common Object Request Broker Architecture (CORBA)

Page 1: Common Object Request  Broker Architecture  (CORBA)

Common Object Request Broker Architecture

(CORBA)

By:

Sunil Gopinath

David Watkins

Page 2: Common Object Request  Broker Architecture  (CORBA)

Introduction

• What is the purpose / goals of CORBA?

• How to meet goals?

• Example

• Conclusion

Page 3: Common Object Request  Broker Architecture  (CORBA)

What is the purpose / goals of CORBA?

• Enable the building of plug and play component software environment

• Enable the development of portable, object oriented, interoperable code that is hardware, operating system, network, and programming language independent

Page 4: Common Object Request  Broker Architecture  (CORBA)

How to meet goals?

• Interface Definition Language (IDL)

• Object Request Broker (ORB)

Page 5: Common Object Request  Broker Architecture  (CORBA)

Interface Definition Language (IDL)

• Language Independence

• Defines Object Interfaces

• Hides underlying object implementation

• Language mappings exist for C, C++, Java, Cobol, Smalltalk, and Ada

Page 6: Common Object Request  Broker Architecture  (CORBA)

Interface Definition Language (IDL)

module <identifier>{interface <identifier> [:inheritance]

{<type declarations>;<constant declarations>;<exception declarations>;<attribute declarations>;

[<op_type>] <identifier>(<parameters>)

[raises exception][context];}

}

Defines a CORBA object

Defines a method

Defines a container (namespace)

Page 7: Common Object Request  Broker Architecture  (CORBA)

IDL Compiler

IDL Definitions

IDL Compiler

Stubs Skeletons

1. Define objects using IDL

2. Run IDL file through IDL compiler

3. Compiler uses language mappings to generate programming language specific stubs and skeletons

Page 8: Common Object Request  Broker Architecture  (CORBA)

Object Request Broker (ORB)

• What is it?

• Architecture

• Request Handling

• Scenario

• CORBA Services

• CORBA Facilities

Page 9: Common Object Request  Broker Architecture  (CORBA)

Application

What is it?

• Implementation of CORBA specification

• Middleware product

• Conceptual Software Bus

• Hides location and

implementation details

about objects

Hardware

OS Drivers

Middleware

Page 10: Common Object Request  Broker Architecture  (CORBA)

Client / Object Interaction

Client Obj Impl

IDL IDL

ORB

Client Obj Impl

IDL IDL

ORB

Network

TC

P/I

P

OS

I

AT

M

IPX

TC

P/I

P

OS

I

AT

M

IPX

Page 11: Common Object Request  Broker Architecture  (CORBA)

ORB Architecture

Interface Repository

IDL Compiler

Implementation Repository

Client Object (servant)

ORB Core

IDL Skeleton

DSIORB

InterfaceIDL Stub

DII

OBJ Ref

GIOP/IOOP

Object Adapter

Page 12: Common Object Request  Broker Architecture  (CORBA)

Interface Repository

Interface Repository

Object Adapter

• Database of object definitions• Contains metadata about each object• Allows for introspection• Allows clients to discover interfaces at run-time• Used in support of dynamic invocations

Page 13: Common Object Request  Broker Architecture  (CORBA)

IDL Compiler

IDL Compiler

Object Adapter

• Compiles IDL definition into stubs and skeletons

• Uses OMG specified language mappings to translate IDL into a language specific implementation

Page 14: Common Object Request  Broker Architecture  (CORBA)

Implementation Repository

Implementation Repository

Object Adapter

• Contains information that allows the ORB to locate and activate object implementations

• Provides information about the classes a server supports, the objects that are instantiated, and their IDs

Page 15: Common Object Request  Broker Architecture  (CORBA)

ORB Core

ORB CoreGIOP/IOOP

Object Adapter

• Provides mechanism for transparently communicating client requests to target object implementations

• Makes client requests appear to be local procedure calls

• GIOP – General Inter-ORB Protocol• IIOP – Internet Inter-ORB Protocol

Page 16: Common Object Request  Broker Architecture  (CORBA)

ORB Interface

Client Object (servant)

ORB Interface Object Adapter

• Provides helper functions• Converting object

references to strings• Creating argument

lists for requests made through DII

Page 17: Common Object Request  Broker Architecture  (CORBA)

IDL Stub

• Static invocation interface (SII)

• Marshals application data into a common packet-level representation– Network byte order

(little-endian or big- endian)

– Size of data types

Client

IDL Stub

Page 18: Common Object Request  Broker Architecture  (CORBA)

IDL Skeleton

Object (servant)

IDL Skeleton

• Demarshals the packet-level representation back into typed data that is meaningful to an application– Network byte order

(little-endian or big- endian)

– Size of data types

Page 19: Common Object Request  Broker Architecture  (CORBA)

Dynamic Invocation Interface

Client

DIIObject Adapter

• Dynamically issue requests to objects without requiring IDL stubs to be linked in

• Clients discover interfaces at run-time and learn how to call them

Steps:1. Obtain interface name

2. Obtain method description (from interface repository)

3. Create argument list

4. Create request

5. Invoke request

Page 20: Common Object Request  Broker Architecture  (CORBA)

Dynamic Skeleton Interface

Object (servant)

DSI

Object Adapter

• Server side analogue to DII• Allows an ORB to deliver

requests to an object implementation that does not have compile-time knowledge of the type of object it is implementing

Page 21: Common Object Request  Broker Architecture  (CORBA)

Object Adapter

Object (servant)

IDL Skeleton

DSI

Object Adapter

• Accept requests for service on behalf of the server’s objects

• Demultiplexes requests to the correct servant

• Dispatches the appropriate operation upcall on the servant

• Registers classes it supports and their run-time instances with the implementation repository

• Portable Object Adapter (POA)

• policies control object behavior (ie. LifespanPolicy)

• Instance of the adapter design pattern

Page 22: Common Object Request  Broker Architecture  (CORBA)

Object Reference

Client Object (servant)OBJ Ref

Object Adapter

• Interoperable Object Reference (IOR)• Uniquely identifies each object• Contents

• Type Name (repository ID)• Protocol and Address Details• Object Key (object adaptor name, object name)

Page 23: Common Object Request  Broker Architecture  (CORBA)

Request Handling

ORB POA

Server Application

Servants

POA

POA

Incoming Request

Page 24: Common Object Request  Broker Architecture  (CORBA)

Scenario

Interface Repository

IDL Compiler

Implementation Repository

Client Object (servant)OBJ Ref

ORB CoreGIOP/IOOP

IDL Stub

DIIObject Adapter

ORB Interface

IDL Skeleton

DSI

Page 25: Common Object Request  Broker Architecture  (CORBA)

CORBA Services

• Provide basic infrastructure functionality• Currently there are 15 defined services

– Naming - maps human names to object references (White Pages)

– Event - provides both a push and pull event model

– Object Trader - discover objects based on the services they provide (Yellow Pages)

– Transactions – allows distributed objects to participate in atomic transactions

Page 26: Common Object Request  Broker Architecture  (CORBA)

CORBA Facilities

• Provide higher-level functionality at the application level

• Provide standard components that can be used “off-the-shelf”

• Two Categories– Horizontal – user interface, information management,

systems management, and task management

– Vertical – domain based, telecommunications, financial services

Page 27: Common Object Request  Broker Architecture  (CORBA)

Example

Page 28: Common Object Request  Broker Architecture  (CORBA)

Conclusion

• Distributed object, component architecture

• Real world examples of design patterns– TAO – freeware ORB

• Adapter, Factory, Reactor, Strategy

• Plugable Transports

• CORBA Beans

Page 29: Common Object Request  Broker Architecture  (CORBA)

References

• www.omg.org• www.cs.wustl.edu/~schmidt/corba.html• http://www.infosys.tuwien.ac.at/Research/

Corba/OMG/arch2.htm• Communications of the ACM, October 1998• Jeri Edwards, Dan Harkey, and Robert Orfali.

Instant CORBA. New York: Wiley Computer Publishing, 1997.