MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL...

26
MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK

Transcript of MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL...

Page 1: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

MiddlewareTechCorba Concepts

- recap of RMI

- ORB

- CORBA

N/W Model, Object Model

- IDL

MuralitharanK

Page 2: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Java RMI

Java Remote Method Invocation (RMI) is a set of APIs designed to support remote method invocations on objects across Java virtual machines.

RMI directly integrates a distributed object model into the Java language such that it allows developers to build distributed applications in Java.

More technically speaking, with RMI, a Java program can make calls on a remote object once it obtains a reference to the remote object. This can be done either by looking up the remote object in the bootstrap naming service provided by RMI or by receiving the reference as an argument or a return value

Page 3: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Pict Rep... of RMI

Page 4: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Java Provides Mobile code facility (mobility)

Java RMI and Java Serialization interfaces allow Java-Objects to migrate around the network

Java RMI uses a combination of Java Object Serialization and the Java Remote Method Protocol (JRMP) to convert normal-looking method calls into remote method calls

Page 5: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

CORBA Overview ORB one of the cornerstones of the CORBA architecture

IDL, the other CORBA architectural cornerstone

The CORBA N/W model, how CORBA objects fit within the network architecture

The CORBA object model, including object references and Basic Object Adapters (BOAs)

The definition and roles of clients and servers in the CORBA architecture

The use of client stubs and server skeletons to build CORBA applications

CORBAservices and CORBAfacilities, which provide additional functionality to CORBA applications

Page 6: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

CORBA CORBA defines a set of specifications formalizing the ways

software objects cooperate in a distributed environment across boundaries such as - N/w , Prog lang and OS.

CORBA is the most ambitious ongoing effort in the area of distributed object computing

CORBA supports the design and bottom-up development of new enterprise systems and could also be utilized for the integration of

legacy systems and sub-systems. CORBA automates many common n/w prog tasks such as object

registration, location, and activation; request demux; framing and error-handling; parameter marshalling and demarshalling; and operation dispatching

Page 7: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

ORB implementation of the CORBA standard defines a language and

platform-independent object bus called an ORB.

translate between different data formats

Distributed objects cooperate by sending messages over a communication networks

Each implementation of the CORBA standard, the object bus, is able to communicate with any other implementation of the standard., the protocol used to achieve this end is the Internet Inter-ORB Protocol (IIOP).

Page 8: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Pict rep... of ORB

Page 9: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

ORB Cont... A client application needn't know the location details of the object it needs to use.

The only information that is required on the client side is the object's name and details on how to use the remote objects interface.

Details pertaining to object location, request routing, invocation and returning of the result are transparently handled by the ORB. Using IIOP (Internet Inter-ORB Protocol) its possible to use the Internet itself as a backbone ORB through which other ORB's can merge.

CORBA is widely implemented in many languages (though they vary in degree of CORBA-compliance, portability and avaiability of additional features), besides supporting the mixing of languages

within a single distributed application.

Page 10: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

ORB

Page 11: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

ORB Summary Given an object reference from a client, the ORB locates the

corresponding object implementation (server) on behalf of the client. (Note that it is the responsibility of the client to obtain an object reference)

When the server is located, the ORB ensures that the server is ready to receive the request.

The ORB on the client side accepts the parameters of the method being invoked and marshals the parameters to the network.

The ORB on the server side unmarshals the parameters from the network and delivers them to the server.

Return parameters, if any, are marshaled/unmarshaled in the same way

Marhsaling refers to the process of translating input parameters to a format that can be transmitted across a network

Unmarshaling refers to the process converts data from the network to output parameters

Page 12: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Marshalling/Unmarshalling

Page 13: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Corba cont... CORBA is an emerging open distributed object computing

infrastructure being standardized by the Object Management Group (OMG)

CORBA automates many common network programming tasks such as object registration, location, and activation; request demultiplexing; framing and error-handling; parameter marshalling and demarshalling; and operation dispatching.

Page 14: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

OMG Reference Model

Object Services -- These are domain-independent interfaces that are used by many distributed object programs

Common Facilities -- Like Object Service interfaces, these interfaces are also horizontally-oriented, but unlike Object Services they are oriented towards end-user applications

Domain Interfaces -- These interfaces fill roles similar to Object Services and Common Facilities but are oriented towards specific application domains

Application Interfaces - These are interfaces developed specifically for a given application

Page 15: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

CORBA Archi...

ObjectObject -- This is a CORBA programming entity that consists of an identity, an interface, and an implementation, which is known as a

Servant. ServantServant -- This is an implementation programming language entity

that defines the operations that support a CORBA IDL interface. Servants can be written in a variety of languages, including C, C++, Java, Smalltalk, and Ada

Page 16: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Archi... Explanation ClientClient -- This is the program entity that invokes an operation on

an object implementation

ORBORB -- The ORB provides a mechanism for transparently communicating client requests to target object implementations

ORB InterfaceORB Interface -- An ORB is a logical entity that may be implemented in various ways (one or more processes or a set of libraries))

CORBA IDL stubs and skeletonsCORBA IDL stubs and skeletons -- CORBA IDL stubs and skeletons serve as the glue between the client and server applications, respectively, and the ORB

Dynamic Invocation Interface (DII)Dynamic Invocation Interface (DII) -- This interface allows a client to directly access the underlying request mechanisms provided by an ORB

Dynamic Skeleton Interface (DSI)Dynamic Skeleton Interface (DSI) -- This is the server side's analogue to the client side's DII. This allows an ORB to deliver requests to an object implementation

Page 17: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Object Adapter Object Adapter -- This assists the ORB with delivering requests to the object and with activating the object.

An object adapter associates object implementations with the ORB

Object adapters can be specialized to provide support for certain object implementation styles - OODB

Archi... Explanation (cont...)

Page 18: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Corba Comm (n/w) model• To understand CORBA, you must first understand its role in a

network of computing systems.

• A computer network consists of systems that are physically connected

• This physical layer provides the medium through which communication can take place (ie) telephone line, a fiber-optic cable, a satellite uplink, or any combination of networking technologies.

• Transport Layer ,which involves protocols responsible for moving packets of data from one point to another (TCP, http,telnet & etc )

Page 19: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Inter-ORB protocols• how does CORBA fit into this networking model?

CORBA specification is neutral with respect to network protocols

• CORBA standard specifies what is known as the General Inter-ORB Protocol (GIOP)

• GIOP specifies, on a high level, a standard for communication between various CORBA ORBs and components

• GIOP is a high-level standard protocol for comm... b/w ORBs.

• The Internet Inter-ORB Protocol (IIOP) is a specialization of the GIOP. IIOP is the standard protocol for communication between ORBs on TCP/IP based networks. An ORB must support IIOP.

Page 20: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Corba N/W Model

Page 21: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

CORBA Object model • Every OO architecture features an object model, which describes how

objects are represented in the system

• CORBA, being an OO architecture, has an object model as well

• CORBA's semi-transparent support for object distribution.

Object Distribution

To a CORBA client, a RM call looks exactly like a local method call. Thus, the distributed nature of CORBA objects is transparent to the users of those objects

The clients are unaware that they are actually dealing with objects which are distributed on a network

• Object distribution brings with it more potential for failure (n/w outage, server crash) sol: CORBA must offer a contingency to handle such possibilities. It does so by offering a set of system exceptions, which can be raised by any remote method.

Page 22: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Corba Obj Model (Cont...)• Obj Reference - there are two possible methods for

one application component to obtain access to an object in another process.

- Pass by reference

Page 23: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Corba Obj Model (Cont ...)• Passing an Obj by val - method of passing an object between

application components is known as passing by value Eg- When methods of the object are invoked by Process B, they are executed by Process B instead of Process A

Page 24: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Server Activation policy• One of the feature of BOA is its object activation and

deactivation capability

• The shared server policy, in which a single server is shared between multiple objects

• The unshared server policy, in which a server contains only one object

• The server-per-method policy, which automatically starts a server when an object method is invoked and exits the server when the method returns

• The persistent server policy, in which the server is started manually (by a user, batch job, system daemon, or some other external agent)

A server activation policy indicates how that particular server is intended to be accessed

Eg:If there is a single server used by all clients, or a new instance of the server should be started for each client, and so on.

Page 25: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

C/S Comm...

Page 26: MiddlewareTech Corba Concepts - recap of RMI - ORB - CORBA N/W Model, Object Model - IDL MuralitharanK.

Interface Definition Language

Definition: The Interface Definition Language (IDL) is a standard language used to define the interfaces used by CORBA objects

• Is the language used to define interfaces between application components

• IDL is not a procedural language

• it can define only interfaces, not implementations

C++ programmers can think of IDL definitions as analogous to header files for classes; a header file typically does not contain any implementation of a class but rather describes that class's interface

Java programmers might liken IDL definitions to definitions of Java interfaces; again, only the interface is described. No implementation is provided

IDL specification is responsible for ensuring that data is properly exchanged between dissimilar languages

Eg: IDL long type is a 32-bit signed integer quantity, which can map to a C++ long (depending on the platform) or to a Java int.