Copyright 1999 B.Ramamurthy Introduction to CORBA Copyright 1999 B.Ramamurthy 8/3/2019 B.Ramamurthy
Topics for Discussion What is CORBA? Object Request Broker (ORB) Structure of a CORBA Application Interoperability between ORBs OMA (needed?) OrbixWeb Example1: Java Application (grid) Example 2: Java Applet (grid) Summary 8/3/2019 B.Ramamurthy
What is CORBA? Common Object Request Broker Architecture (CORBA) specification (/standard) defines a framework for object-oriented distributed applications. It is defined by a consortium of vendors under the direction of Object Management Group (OMG). 8/3/2019 B.Ramamurthy
What is CORBA? (contd.) Allows distributed programs in different languages and different platforms to interact as though they were in a single programming language on one computer. Brings advantages of OO to distributed systems. Allows you design a distributed application as a set of cooperating objects and to reuse existing objects. 8/3/2019 B.Ramamurthy
Object Request Broker (ORB) A software component that mediates transfer of messages from a program to an object located on a remote host. Hides underlying network communications from a programmer. ORB allows you to create software objects whose member functions can be invoked by client programs located anywhere. A server program contains instances of CORBA objects. 8/3/2019 B.Ramamurthy
Clients, severs and objects Server0 Client CORBA Object invocation Server1 8/3/2019 B.Ramamurthy
CORBA Objects and IDL These are standard software objects implemented in any supported language including Java, C++ and Smalltalk. Each CORBA object has a clearly defined interface specified in CORBA interface definition language (IDL). The interface definition specifies the member functions available to the client without any assumption about the implementation of the object. 8/3/2019 B.Ramamurthy
Client and IDL To call a member function on a CORBA object the client needs only the object’s IDL. Client need not know the object’s implementation, location or operating system on which the object runs. 8/3/2019 B.Ramamurthy
IDL facilitates internetworking -- Specify in IDL -- Use IDL-language compiler -- Client sees only IDL interface C++ Java target object smalltalk OLE (VB, PB,Delphi) Ada, Cobol etc. 8/3/2019 B.Ramamurthy
Separation of Interface and Implementation Interface and implementation can be in two different languages. Interface abstracts and protects details (trade secrets) from client Interface offers a means of expressing design without worrying about implementation. 8/3/2019 B.Ramamurthy
ORB : Conceptual View When a client invokes a member function on a CORBA object, the ORB intercepts the function call. ORB directs the function call across the network to the target object. The ORB then collects the results from the function call returns these to the function call. 8/3/2019 B.Ramamurthy
Implementation Details Client ORB Object Stub Access to the services provided by an Object ORB : (Object-oriented middleware) Object Request Broker ORB mediates transfer between client program and server object. 8/3/2019 B.Ramamurthy
CORBA Application Development 1. Define interfaces to the objects in your system using CORBA IDL. 2. Compile these using IDL compiler : this compiler is language specific. IDL - Java compiler generates Java code from IDL definitions. This Java code contains client stub code which allows client code development and A skeleton code which allows implementation of server object code. 8/3/2019 B.Ramamurthy
CORBA Application Development (contd.) 3. Implement client, server code in Java (or what ever language). 4. Compile client.java, server.java and all the other source files generated by IDL compiler. (javac) 5. Register the server (object) with the ORB Implementation Repository. 6. Run CORBA (Ex: OrbixWeb) daemon, the server (if needed) and the client.(java) 8/3/2019 B.Ramamurthy
Example 1: Two-dimensional Grid A grid is an abstract view of a number of commonly used components such as spreadsheets or relational (database) tables. 8/3/2019 B.Ramamurthy
Defining the IDL Interface // In file grid.idl interface Grid { readonly attribute short height; readonly aatribute short width; void set (in short row, in short col, in long value); long get (in short row, in short col); }; 8/3/2019 B.Ramamurthy
Overview of Compilation Process Grid.idl IDL Compiler _GridStub _GridSkeleton Classes & interfaces Grid server application Grid client application Java compiler Server byte code Client byte code 8/3/2019 B.Ramamurthy
Summary We introduced general operation of CORBA. Also details of specifying a client, server application, compiling them and registering and running. In the next class we will look at actual implementation of CORBA client-server application. 8/3/2019 B.Ramamurthy