1 Distributed Systems Distributed Objects & Remote Invocation II (CORBA VS DCOM) Dr. Sunny Jeong....

Post on 30-Dec-2015

216 views 2 download

Tags:

Transcript of 1 Distributed Systems Distributed Objects & Remote Invocation II (CORBA VS DCOM) Dr. Sunny Jeong....

1

Distributed Systems

Distributed Objects & Remote Distributed Objects & Remote Invocation IIInvocation II

(CORBA VS DCOM)(CORBA VS DCOM)Dr. Sunny Jeong. spjeong@uic.edu.hk

With Thanks to Prof. G. Coulouris, Prof. A.S. Tanenbaum and Prof. S.C Joo

2

Distributed Object & Remote invocation

% rmic 클래스명Laptop

PDA

desktop

Local Data Format

Global Data Format(ex, XDR, CDR, Java object serialization )

Local Data FormatMarshalling Unmarshalling

MarshallingUnmarshallingNetwork

RequestReply

3

Overviews

Distributed applications programming distributed objects model(object-oriented model) RMI invocation semantics(object-based model) RPC(conventional procedure call model) events and notifications(event-based programming model)

Products Java RMI, CORBA, DCOM Sun RPC Jini( distributed event notification specification by Arnold K. – JVM)

About DCOM

DCOM is the distributed extension to COM (Component Object Model) that builds an object RPC layer to support remote objects.

A COM server can create object instances of multiple classes and also supports multiple interfaces allowing client-server communication.

A COM client interacts with a COM object by acquiring a pointer to the object’s interface and invoking methods through that pointer.

It is the product of Microsoft people.

About CORBA

CORBA (Common Object Request Broker Architecture), is a distributed object framework proposed by a consortium of nearly 800 companies called the Object Management Group (OMG) but developed by Sun people.

The core of CORBA is the Object Request Broker (OB) that acts as the object bus over which objects transparently interact with other objects located locally or remotely.

A CORBA object is represented by an interface with a set of methods and the instances are identified bye object reference

Object implementation interacts with the ORB through either an Object Adaptor or thru ORB interface.

FEATURES

Both DCOM and CORBA provide client-server type of communication.A client invokes a method implemented by a remote object (i.e., server).

The service provided by the server is encapsulated as an object and the interface of an object is described in an Interface Definition Language (IDL).

Features Cont’d

These interfaces serve as a contract between a server and its clients.

Some OOP features such as data encapsulation,polymorphism and single inheritance are present at the IDL level.

CORBA also support multiple inheritance but DCOM does not support. But DCOM can have multiple interfaces

Interaction Between Server & Client

The interaction between a client process and an object server are implemented as OO RPC style communications.

DCOM ARCHITECTURE

CORBA ARCHITECTURE

CORBA

Communication infrastructure for distributed objects

Allows a heterogeneous, distributed collection of objects to collaborate transparently

Basic CORBA Architecture

Client Server

ORB ORB

request response

“Object Bus”

Interface Definition Language IDL

Interface Definition Language Defines protocol to access objects Like a contract Well-specified Language-independent

IDL Example

module Calc {

interface Adder {

long add(in long x, in long y);

}

}

Defines an object called Adder with a method called add

Stubs and Skeletons

Stub lives on clientpretends to be remote object

Skeleton lives on server receives requests from stub talks to true remote objectdelivers response to stub

Stubs and Skeletons (Fig.)

IIOPORB

Client Host Machine

Client Object

ORB

Server Host Machine

Stub

Remote Object

Skeleton

Execution Order

Compile IDL interface with idlj (-fall) Compile files in the module folder Compile server and client program Run ORB demon (>start orbd –ORBInitialPort xxxx) Execute application (java servername-ORBInitialPort xxxx-ORBInitialHost localhost) (java clientname-ORBInitialPort xxxx-ORBInitialHost localhost)