Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
Chapter 20 Introduction to CORBA

Chapter 20 Introduction to CORBA

Ratings: (0)|Views: 125 |Likes:
Published by Vinaykumar Singh

More info:

Published by: Vinaykumar Singh on Mar 11, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/06/2012

pdf

text

original

 
Chapter 20 Introduction to CORBA
What is CORBA? What does it do?
CORBA
is the acronym for 
C
ommon
O
bject
R
equest
B
roker 
A
rchitecture, OMG'sopen, vendor-independent architecture and infrastructure that computer applications use to work together over networks. Using the standard protocolIIOP, a CORBA-based program from any vendor, on almost any computer,operating system, programming language, and network, can interoperate with aCORBA-based program from the same or another vendor, on almost any other computer, operating system, programming language, and network.Some people think that CORBA is the only specification that OMG produces, or that the term "CORBA" covers all of the OMG specifications. Neither is true; for an overview of 
all 
the OMG specifications and how they work together, click here.To continue with CORBA, read on
What is CORBA good for?
CORBA is useful in many situations. Because of the easy way that CORBAintegrates machines from so many vendors, with sizes ranging from mainframesthrough minis and desktops to hand-helds and embedded systems, it is themiddleware of choice for large (and even not-so-large) enterprises. One of itsmost important, as well most frequent, uses is in servers that must handle largenumber of clients, at high hit rates, with high reliability. CORBA works behind thescenes in the computer rooms of many of the world's largest websites; ones thatyou probably use every day. Specializations for scalability and fault-tolerancesupport these systems. But it's not used just for large applications; specializedversions of CORBA run real-time systems, and small embedded systems.
How about a high-level technical overview?
CORBA applications are composed of 
objects
, individual units of runningsoftware that combine functionality and data, and that frequently (but not always)represent something in the real world. Typically, there are many
instances
of anobject of a single
type
- for example, an e-commerce website would have manyshopping cart object instances, all identical in functionality but differing in thateach is assigned to a different customer, and contains data representing themerchandise that its particular customer has selected. For other types, there maybe only one instance. When a legacy application, such as an accounting system,is wrapped in code with CORBA interfaces and opened up to clients on thenetwork, there is usually only one instance.For each object type, such as the shopping cart that we just mentioned, youdefine an interface in OMG IDL. The interface is the syntax part of the contractthat the server object offers to the clients that invoke it. Any client that wants toinvoke an operation on the object
must 
use this IDL interface to specify theoperation it wants to perform, and to marshal the arguments that it sends. Whenthe invocation reaches the target object, the
same
interface definition is usedthere to unmarshal the arguments so that the object can perform the requestedoperation with them. The interface definition is then used to marshal the resultsfor their trip back, and to unmarshal them when they reach their destination.
Information Technology for B.Sc. IT Semester V Page 111
 
Chapter 20 Introduction to CORBA
The IDL interfacedefinition isindependent of programminglanguage, but
maps
to all of thepopular programminglanguages via OMGstandards: OMGhas standardizedmappings from IDLto C, C++, Java,COBOL, Smalltalk,Ada, Lisp, Python,and IDLscript. This
separation of interface from implementation
, enabled by OMG IDL, is theessence of CORBA - how it enables interoperability, with all of the transparencieswe've claimed. The
interface
to each object is defined very strictly. In contrast,the
implementation
of an object - its running code, and its data - is hidden fromthe rest of the system (that is,
encapsulated 
) behind a boundary that the clientmay not cross. Clients access objects only through their advertised interface,invoking only those operations that that the object exposes through its IDLinterface, with only those parameters (input and output) that are included in theinvocation.Figure 1 shows how everything fits together, at least within a single process: Youcompile your IDL into client stubs and object skeletons, and write your object(shown on the right) and a client for it (on the left). Stubs and skeletons serve asproxies for clients and servers, respectively. Because IDL defines interfaces sostrictly, the stub on the client side has no trouble meshing perfectly with theskeleton on the server side, even if the two are compiled into differentprogramming languages, or even running on different ORBs from differentvendors.In CORBA, every object instance has its own unique
object reference
, anidentifying electronic token. Clients use the object references to direct their invocations, identifying to the ORB the exact instance they want to invoke(Ensuring, for example, that the books you select go into your own shopping cart,and not into your neighbor's.) The client acts as if it's invoking an operation onthe object instance, but it's actually invoking on the IDL stub which acts as aproxy. Passing through the stub on the client side, the invocation continuesthrough the ORB (Object Request Broker), and the skeleton on theimplementation side, to get to the object where it is executed. 
How do remote invocations work?
Figure 2 diagrams a remote invocation. In order to invoke the remote objectinstance, the client first obtains its object reference. (There are many ways to dothis, but we won't detail any of them here. Easy ways include theNaming Service
Information Technology for B.Sc. IT Semester V Page 112

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->