170 likes | 293 Views
Distributed Systems. Distributed Objects & Remote Invocation II (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. Laptop. PDA. Distributed Object & Remote invocation. Request. Reply. Local Data Format.
E N D
Distributed Systems Distributed Objects & Remote Invocation II (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
Laptop PDA Distributed Object & Remote invocation Request Reply Local Data Format Unmarshalling Marshalling Local Data Format Network Unmarshalling Marshalling Global Data Format (ex, XDR, CDR, Java object serialization ) desktop
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.
CORBA • Communication infrastructure for distributed objects • Allows a heterogeneous, distributed collection of objects to collaborate transparently
Basic CORBA Architecture Server Client response request ORB ORB “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 client • pretends to be remote object • Skeleton • lives on server • receives requests from stub • talks to true remote object • delivers response to stub
Stubs and Skeletons (Fig.) Client Host Machine Server Host Machine Client Object Remote Object Stub Skeleton IIOP ORB ORB
Execution Order • Compile IDLinterface 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)