CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group...

73
CORBA CORBA Sowmya Prabha Nagaraja CS616 Presentation
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    221
  • download

    5

Transcript of CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group...

Page 1: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBACORBASowmya Prabha Nagaraja

CS616

Presentation

Page 2: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

OverviewOverview

• Introduction• The Object Management Group (OMG)• Common Object Request Broker

Architecture (CORBA)• Object Request Broker (ORB) • Interface Definition Language (IDL)• Object Adapters (BOA/POA)• CORBA versus RMI• Summary

Page 3: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Early Distributed ComputingEarly Distributed Computing

• Language specific remote procedure calls– Tightly coupled to protocol – Tightly coupled to language semantics– Often highly proprietary

• Homogenous environment

• Typically one to one cardinality– Not highly scalable

Page 4: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

ShortcomingsShortcomings

• Proprietary

• Tightly coupled to language

• Lack extensibility

• Lack scalability

• Lack transparency

Page 5: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Distributed Computing EvolutionDistributed Computing Evolution

• Object-Oriented design and reuse– OO thriving in non-distributed programming

• Multi-tiered architectures

• Legacy application extension

• Enterprise level application integration

• TCP/IP

• Internet computing

Page 6: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object Management GroupObject Management Group

Page 7: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object Management Group, est. 1989Object Management Group, est. 1989

• Initially 8 companies, over 750 today• One of the largest industry consortiums• Does not develop implementations• Formal process for defining specifications

– Members submit proposals, develop implementations

• Emphasizing cooperation and compromise– Most specs are an amalgamation of ideas

• Non-profit

Page 8: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

OMG GoalsOMG Goals

“...promote the reusability, portability, and interoperability of object-based

software in distributed, heterogeneous environments...”

“...promote the theory and practice of object-oriented technology in software

development…”

Page 9: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object Management ArchitectureObject Management Architecture

• Framework within which all OMG adopted technology fits

• Two fundamental models on which CORBA is based

“...to foster the growth of object technology and influence its direction by establishing the Object Management Architecture (OMA). The OMA provides the conceptual infrastructure upon

which all OMG specifications are based…”

Page 10: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

OMA ModelsOMA Models

• Core Object Model– Abstract definition– Details how Object Request Broker (ORB)

facilitates distributed application development

• Reference Object Model– Architectural framework– ORB at center, interface definitions– Framework for future technology adoption

Page 11: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

OMA Core Object ModelOMA Core Object Model

• Design portability– Interface based interaction– Access does not rely on location or language of

implementation

• Interoperability (I14Y)– Ability to invoke operations regardless of

location, platform, or language of implementation

Page 12: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

OMA Reference Model OMA Reference Model

• Defines interfaces to infrastructure and object services

• Guide for developers and vendors• Defines five main components

– Object Request Broker– Object Services– Common Facilities– Domain Interfaces– Application Interfaces

ApplicationObjects

Domain Objects

Object Services

Common Facilities

ORB

Page 13: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Common Object Request Common Object Request Broker ArchitectureBroker Architecture

Page 14: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

What is CORBA?What is CORBA?

• Architecture for interoperable distributed computing– Based on the OMG’s Object Management

Architecture

• Internet Interoperability Protocol (IIOP)

• Language mappings (OMG IDL)

• Integrated and reusable services

Page 15: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA TimelineCORBA Timeline

• Object Management Group founded 1989

• CORBA 1.x (91-93)– Experimental, architecture focused, IDL

• CORBA 2.0 (8/96)– Interoperability and COM integration

• CORBA 2.1 (8/97)– Security, language mappings

Page 16: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA TimelineCORBA Timeline

• CORBA 2.2 (2/98)– DCOM interoperability, POA, IDL/Java

• CORBA 2.3 (1999)– Objects by value, RMI/IIOP, language binding

enhancements

• CORBA 3.0 (?)– Multiple interface support, component model,

scripting support

Page 17: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA ArchitectureCORBA Architecture

ApplicationObjects

Domain Objects

Object Services

Common Facilities

ORB

The ORB serves as the common backbone on which many discrete services can

be integrated

• Based on OMA Reference Model

Page 18: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA Model ComponentsCORBA Model Components

• Object Request broker• Object Services• Common Facilities• Domain Interfaces• Application Interfaces

ApplicationObjects

Domain Objects

Object Services

Common Facilities

ORB

Page 19: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object Request Broker (ORB)Object Request Broker (ORB)

• Enables object to transparently make and receive requests and responses

“...like a telephone exchange, providing the basic mechanism for making and receiving calls…”

ORB

Page 20: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object Services & FacilitiesObject Services & Facilities

• Collection of interfaces and objects

Object Services

Common Facilities

ORB

• Services– Support functions for

implementing and using objects

– i.e. life cycle

• Facilities– Services that many

applications may share, but are not fundamental

– i.e. system management

Page 21: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Domain & Application ObjectsDomain & Application Objects

• Domain Interfaces– OMG Domain Special Interest Groups (SIGs)– Market vertical specific services

• Application Objects – Vendor provided or custom object implementation– Top layer in Reference Model, not standardized by

OMGApplication

ObjectsDomain Objects

ORB

Page 22: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Internet Inter ORB Protocol (IIOP)Internet Inter ORB Protocol (IIOP)

• Transport protocol– Defines inter ORB communication– Runs on top of TCP/IP– Defines CORBA messages

• IIOP is a specification– Vendors must implement to be “CORBA-

compliant”– Allows for multi-vendor interoperability

Page 23: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object Request BrokerObject Request Broker

Page 24: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

What is an ORB?What is an ORB?

• A distributed object bus• Hides transport mechanisms

– Location – Method invocation– Marshalling

• OMG Interface Definition Language (IDL) provides the language independent semantics

ORB

Page 25: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object Request Broker (ORB)Object Request Broker (ORB)

• Abstracts remote request and response mechanisms• Transport for distributing method invocations

ORB

Object ImplementationClient

RequestRequest

Page 26: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

ORB UsageORB Usage

• ORB is a singleton

• ORB initialization– Single static call to init() an ORB

– After initialization, you register objects with the ORB using an Object Adapter

org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();

Page 27: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

ORB Request InterfacesORB Request Interfaces

Page 28: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Proxy-based InvocationProxy-based Invocation

ORB

SkeletonStub

RequestRequest

Client Object Implementation

Request Request

Page 29: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Client RequestingClient Requesting

Page 30: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Server ReceivingServer Receiving

Page 31: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Static InvocationStatic Invocation

• Proxy objects generated to support distributed invocation– Interface defined using IDL– Stub and Skeleton classes

• Language specific

– Network and marshalling support

• Interface defined statically at compile time – Used when client is built

Page 32: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Dynamic Invocation InterfaceDynamic Invocation Interface

• Alternative to static Stub/Skeleton calls – Don’t need Stubs when client is built

• Structure a generic invocation structure and submit to DII

• Asynchronous (deferred synchronous) calls

• Slower than static but more flexible

• Similar to Java Reflection

Page 33: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

ORB AbstractionORB Abstraction

• How is this possible in a heterogeneous environment?

ORB

Object ImplementationClient ??JavaJava C++C++

IDLIDL

JavaJava C++C++

IDLIDL

Page 34: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Interface Definition LanguageInterface Definition Language

Page 35: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Interface Definition Language (IDL)Interface Definition Language (IDL)

• Specification language• Language independent interface

– Declare interfaces to object methods– IDL maps to many high-level programming

languages

• Design paradigm– Code to interface specified in the IDL

regardless of implementation

Page 36: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

OMG Language MappingsOMG Language Mappings

• Mapping IDL to programming language

– Many OMG standard mappings

• C

• C++

• Smalltalk

• Ada ‘95

• COBOL

• Java

Page 37: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Key IDL Language ElementsKey IDL Language Elements

• Module

• Interface

• Attribute

• Operation

• Argument

• Exception

• Struct

• Typedef

• Sequence

• Any

Page 38: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Sample IDL DefinitionSample IDL Definition// Quote system module module QuoteSystem { // Specify a data structure for quote struct Quote { string value; } // Specify interface to quote server interface QuoteServer { // Specify an stock exchange name attribute string exchange; // Unknown symbol exception exception UnknownSymbolException { string message; }; // Lookup symbol Quote getQuote (in string symbol) raises (UnknownSymbolException); }; };

define the struct for a Quote value

defines a QuoteServer

object’sinterface

specifies the scope/package QuoteSystem

argument(direction and type)

return type declares that method throws an exception

data member

Page 39: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Modules & InterfacesModules & Interfaces

• Module– Maps to a package in Java– Name space scoping– Module can contain multiple

interfaces

• Interface– Maps to a set of related

classes & interfaces

module QuoteSystem { interface QuoteServer { ... }; };

QuoteSystem.QuoteServer

Page 40: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

StructStruct

• Structure– Maps to a class in Java– Construct to hold logical blocks of data– Accessors and mutators

• Generated for all data elements within structure

struct Quote { string value; }

public final class Quote{ public String value;}

Page 41: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

AttributeAttribute

• Maps to variable accessor and mutator methods

• In Java, maps to overloaded functions– Not JavaBean style get()/set(...)

• Variables must be declared by developer– Not automatically generated by IDL compiler

String exchange();void exchange(String arg);

string exchange;

Page 42: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Operations & ArgumentsOperations & Arguments

• Operation maps to a method

• Arguments for operations– Specify direction

• IN (read in by method)

• OUT (set by the method for return to caller)

• INOUT (read and modified by the method)

Quote getQuote (in string symbol)

public Quote getQuote (String symbol)

Page 43: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

ExceptionException

• Maps to a Java exception– In IDL, no inheritance of exceptions

• Operation– raises instead of throws exceptions

Quote getQuote (in string symbol) raises UnknownSymbolException;

public Quote getQuote (String symbol) throws UnknownSymbolException;

Page 44: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

IDL to Java MappingIDL to Java Mapping

float floatdouble doublelong , unsigned long intlong long, unsigned long long longshort, unsigned short shortchar, wchar charboolean booleanoctet bytestring, wstring java.lang.String

Primitive Types:

IDL Type Java Type

Page 45: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

IDL to Java MappingIDL to Java Mapping

any set of related classesinterface set of related classessequence arraystruct final class

module packageexception exception class

(inheriting from org.omg.CORBA.UserException)

Others:

Complex Types:

IDL Type Java Type

IDL Type Java Type

Page 46: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Additional NotesAdditional Notes

• IDL is case sensitive– Identifiers can’t differ only by case

boolean foobarinterface FooBar

• No overriding or overloading of methods– Not all languages have these features

• Comments // comment /* comment */

Page 47: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Developing CORBA ObjectsDeveloping CORBA Objects

• Define interface using IDL

• Process IDL to create stub and skeleton code

• Write code that implements the object (servant) and server to host it

• Write code that uses the object (client)

Page 48: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

IDL CompilationIDL Compilation

• IDL compilation– Generates code

• Encapsulates underlying network code, marshalling

– Complied to language dependent interfaces

• Stub (client side)– Proxy, reference to a “remote” object

• Skeleton (server side)– Manage interaction between proxy and server

implementation

Page 49: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Development StepsDevelopment Steps

1 write the IDL file2 compile with idltojava (stubs/skeleton generated automatically)

3 write object implementation (servant)4 write client application

steps:

Stub Skeleton

Client Application Object Implementation

ORB ORBrequest

response

IDL

idltojava

1

2

3

2

4

Page 50: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object AdaptersObject Adapters

Page 51: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object AdaptersObject Adapters

• Generate and interpret object references

• Activate and deactivate object implementations

• Handle method invocations via skeletons

• Basic Object Adapter (BOA)

• Portable Object Adapter (POA)

Page 52: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Object AdaptersObject Adapters

Page 53: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

• Defines how objects are activated/deactivated– Initializing server objects:

• BOA.obj_is_ready( /* the object ref */ );– Registers the object with the ORB

• BOA.impl_is_ready();– Tells the BOA/ORB to begin listening for requests

• Underspecified– Initially unclear which features would be required

on various platforms

Basic Object Adapter (BOA)Basic Object Adapter (BOA)

Page 54: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Portability ConsiderationsPortability Considerations

• Basic Object Adapter (BOA)– Vendors have taken liberty with the BOA

specification– Various features are vendor dependent and non-

portable– Implementation experiences used to define

more complete and portable Object Adapter

• CORBA 2.2 introduced the Portable Object Adapter (POA)

Page 55: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Portable Object Adapter (POA)Portable Object Adapter (POA)

• Replaces BOA– Most commercial implementations still use

BOA

• Expanded scope of OA to include– Activation policies– Threading models– Object life cycle (transient/persistent)– Pre/post invocation capabilities

Page 56: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Interoperable Object Reference (IOR)Interoperable Object Reference (IOR)

• “Shareable” reference to a CORBA object• Compatible with all CORBA-compliant ORBs• Analogy: URL for object instances• Location independent

1) Save an IOR2) Go to another location3) Load the saved IOR4) Establish communication with the same object

Page 57: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Creating a CORBA ObjectCreating a CORBA Object

• Initialize ORB and BOA

• Instantiate the object

• Export the object– BOA.obj_is_ready()

• Optionally register the object– NamingContext.rebind()

• Tell the ORB to begin receiving requests– BOA.impl_is_ready()

Page 58: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Activating the QuoteServerActivating the QuoteServer

public static void main(String[] args) { try { // Initialize object request broker ORB orb = ORB.init(args, null); // Initialize basic object adapter BOA boa = orb.BOA_init(); // Create a new QuoteServer ... QuoteServer quoteServer = new QuoteServer(); // ... and export the object boa.obj_is_ready(quoteServer); // Object Request Broker Initialized System.out.println (”QuoteServer ORB initialized"); // Wait for incoming requests boa.impl_is_ready(); } catch (SystemExcpetion e) { System.err.println(e); }}

Page 59: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Accessing a CORBA ObjectAccessing a CORBA Object

• ORB uses Interoperable Object References (IORs)

• Object might be local, client uses proxy• Client must acquire first object reference

– Naming/Trading service – Proprietary bind– Proprietary URL service– Some other proprietary means

Page 60: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Registering the QuoteServerRegistering the QuoteServer

// Create a new QuoteServer ... QuoteServer quoteServer = new QuoteServer(); . . .// Obtain reference for our nameservice org.omg.CORBA.Object object = orb.resolve_initial_references("NameService"); // Since we have only an object reference, we must // cast it to a NamingContext. We use a helper // class for this purpose NamingContext namingContext = NamingContextHelper.narrow(object); // Add a new naming component for our interface NameComponent name[] = { new NameComponent(”QuoteServer", "") }; // Now notify naming service of our new interface namingContext.rebind(name, quoteServer);

Page 61: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Using a CORBA ObjectUsing a CORBA Object

• Initialize the ORB on the client

• Get a reference to the remote object– IOR– Actual reference (e.g. from bind())

• Invoke methods

Page 62: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Accessing the QuoteServerAccessing the QuoteServer

// Create an object request broker ORB orb = ORB.init(args, null); // Obtain object reference for name service ... org.omg.CORBA.Object object = orb.resolve_initial_references("NameService"); // ... and narrow it to a NameContext NamingContext namingContext = NamingContextHelper.narrow(object); // Create a name component array NameComponent name[] = { new NameComponent(”QuoteServer","") }; // Get a QuoteServer object reference ... org.omg.CORBA.Object objectReference = namingContext.resolve(name); // ... and narrow it to get a QuoteServer QuoteServer quoteServer = QuoteServerHelper.narrow(objectReference); // invoke methods on referenceQuote noveraQuote = quoteServer.getQuote(“MCTR”);

Page 63: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Services & FacilitiesServices & Facilities

Page 64: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

ServicesServices

• Naming• Events• Life Cycle• Relationships• Externalization• Transactions• Concurrency

Control

• Licensing

• Query

• Properties

• Security (IIOP/SSL)

• Collections

• Trading

• Time

Page 65: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

Naming & Trading ServicesNaming & Trading Services

• Naming– “White pages”– Federated

namespace– Name to object

mapping• No attributes

– Limited protocol

• Trading– “Yellow pages”– Federated

namespace– Attribute support– Limited

commercial implementations

Page 66: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

FacilitiesFacilities

• Internationalization (I18N)• Distributed Document Component

– Based on OpenDoc

• Systems Management• Time• Data Interchange• Mobile Agent• Printing

Page 67: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA versus RMICORBA versus RMI

Page 68: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA vs. RMICORBA vs. RMI

CORBA RMIPlatform independent JVM specificProtocol independent(IIOP)

Proprietary protocol(JRMP)

Languageindependent (IDL)

Java specific

Objects by value(3.0)

Objects by value(serialization)

Page 69: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

RMI DeploymentRMI Deployment

Object Implementation

Stubs Skeletons

Interface Definition

Implementation Installation

Client

Page 70: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA DeploymentCORBA Deployment

Object Implementation

Interface Repository

Implementation Repository

Stubs Skeletons

IDL Definition Implementation Installation

Client

Page 71: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

SummarySummary

Page 72: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA FeaturesCORBA Features

• Language independence

• Location transparency

• Reuse of facilities & services

• OMG IDL defined interfaces

• Stub & Skeleton generation

• Server activation

Page 73: CORBA Sowmya Prabha Nagaraja CS616 Presentation. Overview Introduction The Object Management Group (OMG) Common Object Request Broker Architecture (CORBA)

CORBA ResourcesCORBA Resources

• Object Management Group (OMG)– www.omg.org

– www.corba.org

• Discussion groups– comp.object.corba

– comp.lang.java.corba

• Implementers– Inprise: www.inprise.com

– Iona: www.iona.com

– Sun: java.sun.com/products/jdk/1.2/