CORBA Distributed Technology CASE STUDY Juan C. Navarro.

33
CORBA Distributed Technology CASE STUDY Juan C. Navarro

Transcript of CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Page 1: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA Distributed Technology

CASE STUDY

Juan C. Navarro

Page 2: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Most popular distributed object technologies

OMG’s CORBA (Common Object Request Broker Architecture).

Microsoft’s DCOM (Distributed Component Object Model).

Sun’s Java/MRI (Java/Remote Method Invocation).

Page 3: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA

CORBA is a Standard Architecture for Distributed Object System.

The CORBA (Common Object Request Broker Architecture) specification was developed by the Object Management Group (OMG).

Page 4: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

OMG The Object Management Group (OMG), is

an open membership, not-for-profit consortium that produces and maintains computer industry specifications for interoperable enterprise applications.

The OMG was created in 1989 and has about 700 hundred members in the Organization:

Page 5: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

OMG (cont.)

Some of OMG Actual Members: Sun Microsystems GE Transportation Motorola (Platform) NASA (Government) Massachusetts Institute of Technology

(University) Adobe Systems

Page 6: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA SPECIFICATION

The CORBA specification describes how to develop an implementation of CORBA.

It also describes programming language bindings that developers use to develop applications.

The specification provides a broad and consistent model for building distributed applications by defining:

An object model for building distributed applications

A common set of application programming objects to be used by the client and server applications

Page 7: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA SPECIFICATION (cont.)

A syntax for describing the interfaces of objects used in the development of distributed applications. IDL

(Interface Definition Language).

Page 8: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA APPLICATIONS

Telephone Networks worldwide Banking Application on every continent Manufacturing Government Industrial Car dashboards to mainframes Controlling Telephone switches

Page 9: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

GOALS OF CORBA

Object Reuse: CORBA allows wide-spread use of existing components

Flexibility: CORBA allows developers to choose:

Operating System Execution Environment Programming Language Heterogeneous Hardware, networks

Page 10: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA FEATURES CORBA supports many existing languages. Including C, C++, Java,

Smalltalk, and Ada.

CORBA also supports mixing these languages within a single distributed application.

CORBA supports both distribution and Object Orientation.

CORBA is an industry standard. This creates competition among vendors and ensures that quality implementations exist. The use of the CORBA standard also provides the developer with a certain degree of portability between implementations.

CORBA provides a high degree of interoperability. This insures that distributed objects built on top of different CORBA products can communicate. Large companies do not need to mandate a single CORBA product for all development.

Page 11: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA SERVICES

Naming Services Event Service Notification Service Security Service

Authentication Access control can be applied to CORBA

objects.

Page 12: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA SERVICES (cont.)

Trading Service.

Transaction Service and Concurrency Control Service.

Persistent Object Service.

Page 13: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA ARCHITECTURE

Basic Concept

Page 14: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA ARCHITECTURE (Cont.)

Page 15: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

ARCHITECTURE (cont.) Object Request Broker (ORB): The ORB

provides a mechanism for transparently communicating client requests to target object implementations.

Intercept a call from the client Find the correct object Pass it the parameter Invoke its method Return the results to the client

Page 16: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

ARCHITECTURE (cont.)

CORBA IDL stubs and skeletons: Serve as the “glue” between the client and server applications, respectively, and the ORB.

Page 17: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

ARCHITECTURE (Cont.) Dynamic Invocation Interface (DII): This interface allows

a client to directly access the underlying request mechanisms provided by an ORB. Applications use the DII to dynamically issue requests to objects without requiring IDL interface-specific stubs to be linked in.

Dynamic Skeleton Interface (DSI): This is the server side's analogue to the client side's DII. The DSI allows an ORB to deliver requests to an object implementation that does not have compile-time knowledge of the type of the object it is implementing.

Object Adapter: Allows the interaction between the ORB with the objects.

Page 18: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA ARCHITECTURE (Cont.)

Page 19: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Steps for creating a CORBA

1. Define the remote interface (IDL) Primitive Data types: long , short, unsigned short, long, unsigned long, float

(IEEE), double, char, boolean, octet, any.

Extended built in data types: long long (64 bits), unsigned long long, long double, wstring, fixed.

Complex Types: struct, union, enum, muti-dim. arrays

Example: : FileInterface.idl

interface FileInterface { typedef sequence<octet> Data;

Data downloadFile(in string fileName); };

Page 20: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Steps for creating a CORBA (cont.)

2. Compile the remote interface (IDL)

The IDL Compiler implements language mapping in software. After checking the IDL code for errors, the compiler will produce the following files:

prompt> idlj –fserver FileInterface.idl (-fclient or –fall)

• Server skeletons for each IDL interface• Client stubs for each IDL interface• The program (Java or C++) interfaces• A Java / C++ class for IDL defined struct• Helper classes for each IDL defined type

Page 21: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Implementing the method(FileServant.java)

Copyright 1994-2006 Sun Microsystems, Inc.

Page 22: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Steps for creating a CORBA (cont.)

3. Implement the server. Initializes the ORB Creates a FileServant object Registers the object in the CORBA

Naming Service (COS Naming) Prints a status message Waits for incoming client requests

Page 23: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Copyright 1994-2006 Sun Microsystems, Inc

4. Implement the Server

Page 24: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

4. Implement the Client

Copyright 1994-2006 Sun Microsystems, Inc

Page 25: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

5. Start the applications

Running the the CORBA naming serviceprompt> tnameserv -ORBinitialPort 2500

Start the server prompt> java FileServer

Generate Stubs for the client. Before we can run the client prompt> idlj -fclient FileInterface.idl

Run the client. prompt> java FileClient hello.txt -ORBInitialPort 2500

Page 26: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA PRODUCTS

CORBA is a specification; it is a guide for implementing products. Several vendors provide CORBA products for various programming languages.

The Java 2 ORB : The Java 2 ORB comes with Sun's Java 2 SDK.

VisiBroker for Java: A popular Java ORB from Inprise Corporation. VisiBroker is also embedded in other products. For example, it is the ORB that is embedded in the Netscape Communicator browser.

OrbixWeb: A popular Java ORB from Iona Technologies.

WebSphere: A popular application server with an ORB from IBM.

Page 27: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA PRODUCTS (cont.) Netscape Communicator: Netscape browsers have

a version of VisiBroker embedded in them. Applets can issue request on CORBA objects without downloading ORB classes into the browser. They are already there.

MICO: MICO implements the CORBA standard relying on C++. It is an open source implementation.

omniORB: A CORBA ORB for C++ and Python. It is freely available under the terms of the GNU Lesser General Public License (for the libraries), and GNU General Public License (for the tools).

Various free or shareware ORBs: CORBA implementations for various languages are available for download on the web from various sources.

Page 28: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

SIGNIFICANT POINTS The Object Management Group comprises 700

companies and Organizations dedicated to maintain compatibility and standardization of the CORBA system.

The architecture and specifications of CORBA are vendor neutral.

CORBA Specifications are available to everyone CORBA’s interface definition language (IDL) is the

crucial part because it permits communication on a heterogeneous distributed system.

Microsoft’s DCOM is a Windows-based solution only.

Page 29: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

CORBA is a specification for creating distributed object-based applications. The CORBA architecture and specification were developed by the Object Management Group (OMG).

The goal of CORBA is to promote an object-oriented approach to building and integrating distributed software applications.

Summary

Page 30: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Summary (cont.) The CORBA specification

Describes how to develop an implementation of CORBA. Defines an object model for building distributed applications.

Defines a common set of application programming objects to be used by the client and server applications

Defines a syntax for describing the interfaces of objects used in the development of distributed applications

Page 31: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Summary (cont.) Support for use by applications written in multiple

programming languages, such as C, C++, java, Smalltalk, Ada, COBOL, Lisp.

A CORBA objects implements the operations in an IDL interface. All that the clients need to know to access CORBA objects is the operations available in its interface.

The OMG maintains its constant vision regarding CORBA since its creation in 1989, providing upgrades for the specifications in order to satisfy developers current service demands, the latest CORBA version is 3.03.

Page 32: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

Summary (cont.)

Three of the most popular distributed object technologies are: OMG’s CORBA, Microsoft’s DCOM, and Sun’s Java/MRI.

Page 33: CORBA Distributed Technology CASE STUDY Juan C. Navarro.

References OMG. Home page. http://www.omg.org. OMG, 2003. CORBA. <http://www.corba.org/> Coulouris, Dollimore, Kindberg. Distributed Systems

Concepts and Design. Harlow, England: Addison-Wesley, 2001.

Introduction to CORBA http://java.sun.com OMG. ”About The Object Management Group™

(OMG™)”. http://www.omg.org/gettingstarted/gettingstartedindex.htm. OMG, 2003.

CORBA Technology http://www.answer.com