CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan...

21
CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia

Transcript of CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan...

Page 1: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

CSC 8560 Computer Networks Project-1

Chat Room Application using

CORBA (IIOP) Abhishek Bachchan

Vishal Patangia

Page 2: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

CORBA (Common Object Request Broker Architecture)

CORBA (Common Object Request Broker Architecture), is a set of industry standards for distributed object software technology.

The technical goal of the CORBA standards is to allow reliable, platform-independent remote execution of object-oriented software in wide and local area network environments.

Page 3: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Object Request Broker (ORB)

The ORB acts as sort of a "software bus" that manages storage, interaction and communications of object-based application executing on the respective platforms across a wide or local area network.

Objects themselves are executed by the operating system and application software running on the environment where a given ORB resides.

Page 4: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

ORB Responsibilities Given an object reference from a client, the ORB

locates the corresponding object implementation (the server) on behalf of the client.

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.

Page 5: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

ORB Architecture

Page 6: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

CORBA Interface Definition Language (IDL) The CORBA IDL is a contractual definition

language used to define the interface to objects.

An object interface is written in IDL, which is then compiled to the implementation language of choice (e.g.: C++, Java).

Page 7: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

IDL Provides Language IndependenceBecause interfaces described in IDL can be

mapped to any programming language, CORBA applications and components are thus independent of the languages used to implement them.

In other words, a client written in C++ can communicate with a server written in Java, which in turn can communicate with another server written in COBOL, and so forth.

Page 8: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Inter-ORB Protocols

CORBA specification is neutral with respect to network protocols. The CORBA standard specifies what is known as the General Inter-ORB Protocol (GIOP), which specifies, on a high level, a standard for communication between various CORBA ORBs and components.

GIOP, as its name suggests, is only a general protocol; the CORBA standard also specifies additional protocols that specialize GIOP to use a particular transport protocol. For instance, GIOP-based protocols exist for TCP/IP and DCE.

Page 9: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Internet Inter-ORB Protocol (IIOP) 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.

Page 10: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

CORBA and the Networking Model Essentially, CORBA applications are built on top of

GIOP-derived protocols such as IIOP. These protocols, in turn, rest on top of TCP/IP, DCE, or whatever underlying transport protocol the network uses.

CORBA applications aren't limited to using only one of these protocols; an application architecture can be designed to use a bridge that would interconnect, for instance, DCE-based application components with IIOP-based ones.

Page 11: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Networking Model

Page 12: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Stubs and SkeletonsThe IDL compiler generates what are known as client

stubs and server skeletons.

Client stubs and server skeletons serve as a sort of "glue" that connects language-independent IDL interface specifications to language-specific implementation code.

A Client Stub, is a small piece of code that makes a particular CORBA server interface available to a client.

A Server Skeleton, is a piece of code that provides the "framework" on which the server implementation code for a particular interface is built.

Page 13: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Client Stubs and Server Skeleton

Page 14: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Remote Invocation with ORB

Page 15: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

CORBA Features

Language independence   Platform independence   Location transparent – LAN, Internet. Object location is

completely transparent to application code. This makes CORBA well suited to applications which require high-availability or in which objects may be moving around a network.  

Availability of tools and expertise   Interoperability - CORBA applications can communicate with

Java applications using Java's integrated CORBA support and with COM/DCOM applications using a standardized gateway.

Page 16: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Chat IDL

module Chat{

interface Displayer{

void receive_update(in string msg, in string nam);};

interface Publisher{

typedef sequence<Displayer> DisplayerList;

void add_displayer(in Displayer s);void remove_displayer(in Displayer s);void send_message(in string msg, in string nam);

};};

Page 17: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Project Goal

To develop a Chat-Room Application using Java as Programming Language based on CORBA architecture standards.

We used Windows 2000 as the OS and the campus LAN as our environment to test this application.

Page 18: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Chat Application – Class Diagram

Page 19: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

ORB Generated Classes and Interfaces

Diagram Link

Page 20: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Parts of Server Code public static void main(String[] args) { try { // Initialize the ORB. org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null); // get a reference to the root POA POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

:::

byte[] managerId = "ChatManager".getBytes(); myPOA.activate_object_with_id(managerId, chatServant);

// Activate the POA manager rootPOA.the_POAManager().activate();

// Wait for incoming requests orb.run(); }catch (Exception e) { e.printStackTrace(); } }

Page 21: CSC 8560 Computer Networks Project-1 Chat Room Application using CORBA (IIOP) Abhishek Bachchan Vishal Patangia.

Parts of Client Code

public static void main(String[] args) { try{ // Initialize the ORB. org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null); // Get the manager Id byte[] managerId = "ChatManager".getBytes(); // Locate an account manager. Give the full POA name and the servant ID. Chat.Publisher publisher =

Chat.PublisherHelper.bind(orb, "/chat_poa", managerId);:::