Title: Ch2: CORBA: The Intergalactic Object Bus
1Ch2 CORBA The Intergalactic Object Bus
- SNU-OOPSLA-Lab
- Prof. H.J. Kim
2Contents
- What exactly is a CORBA 2.0 ORB?
- the anatomy of a CORBA 2.0 ORB
- CORBA method invocations Static Versus Dynamic
- whats an object adapter?
- CORBA 2.0 initialization
- CORBA 2.0 The Intergalactic ORB
- CORBA 2.0 the inter-ORB architecture
- CORBA 2.0 ORB-to -ORB Bridging
- Federated ORBs
3What exactly is a CORBA 2.0 ORB?
- CORBA 2.0 ORB
- middleware that establishes the client/server
relationships between objects - a client object can transparently invoke a method
on a server object - provides multivendor ORB interoperabiliy
4The Client/Server Request Using the ORB
5The Anatomy of a CORBA 2.0 ORB
- CORBA provides both static and dynamic interfaces
- What CORBA does on the client side
- The client IDL stubs
- provide the static interfaces to object services
- Dynamic Invocation Interface(DII)
- The interface repository API
- a run time database that contains
machine-readable versions of the IDL-defined
interfaces - dynamic metadata repository for ORBs
- The ORB interface
6The Anatomy of a CORBA 2.0 ORB(Contd)
- What CORBA elements do on the server side
- server IDL stubs
- provide static interfaces to each service
exported by the server - dynamic skeleton Interface
- object Adapter
- Implementation repository
- ORB interface
- a few APIs to local services that may be of
interest to an application
7The Structure of a CORBA 2.0 ORB
8CORBA Method Invocations Static Versus Dynamic
- Advantages of static stub interface over dynamic
method invocation - it is easier to program
- it provides more robust type checking
- it performs well
- it is self-documenting
- you can tell whats going on by reading the code
9CORBAs Static and Dynamic Method Invocations
10Language-Independent Object References
11CORBA static method invocations from IDL to
interface stubs
- The steps you go through to create your server
classes - define your object classes using Interface
Definition Language(IDL) - the IDL is the means by which objects tell their
potential clients what operations are available
and how they should be invoked - the IDL defines
- object type, attribute, the method they export,
method parameter - subset of ANSI C additional contracts to
support distribution - purely a declarative language
- uses the C syntax for constant, type, and
operation definitions, and does not include any
control structures or variables
12CORBA static method invocations from IDL to
interface stubs(Contd)
- The steps you go through to create your server
classes(Contd) - Run the IDL file through a language precompiler
- processes the IDL files and produces language
skeletons for the implementation server classes - Add the implementation code to the skeletons
- you must supply the code that implements the
methods in the skeletons
13CORBA static method invocations from IDL to
interface stubs(Contd)
- The steps you go through to create your server
classes(Contd) - Compile the code
- generating at least four types of output files
- imports files describe the objects to an
interface repository - client stubs
- server stubs
- the code that implements the server classes
- Build the class definitions to the interface
repository - Register the runtime objects with the
implementation repository - Instantiate the objects on the server
14(No Transcript)
15CORBA Dynamic Method Invocations A Step-By-Step
Guide
- CORBAs dynamic invocation API
- allow a client program to dynamically build and
invoke requests on objects - client specifies
- the object to be invoked
- the method to be performed
- the set of parameters through a call or sequence
of calls
16CORBA Dynamic Method Invocations A Step-By-Step
Guide(Contd)
- The dynamic method invocation steps
- obtain the method description from the interface
repository - locate and describe
- create the argument list
- create the request
- invoke the request
- invoke()
- send() and get-response()
- send()
17The CORBA Dynamic Invocation Interface
18The Server Side of CORBA
- An object implementation need from an ORB on the
server side - registers the applications classes
- instantiates new objects
- gives them unique IDs
- advertise their existence
- invoke their method
- manages concurrent requests for their services
- transaction management
- load balancing
- fine-grained security
19Whats an Object Adapter?
- Object Adapter
- the primary mechanism for an object
implementation to access ORB services - services provided by the Object Adapter
- registers server classes with the implementation
repository - instantiates new objects at run time
- generates and manages object references
- broadcasts the presence of the object servers
- handling incoming client calls
- routes the up-call to the appropriate method
20The Structure of a Typical Object Adapter
21BOA and Other Object Adapters
- Object Adapter
- defines how an object is activated
- BOA(Basic Object Adapter)
- functions to be provided in a BOA implementation
- an implementation repository
- mechanisms for
- generating and interpreting object references
- activating and deactivating object
implementations - invoking methods
- passing them their parameters
22BOA and Other Object Adapters(Contd)
- BOA(Basic Object Adapter)
- functions to be provided in a BOA
implementation(Contd) - a mechanism for authenticating the client making
the call - activation and deactivation of implementation
objects - method invocations through stubs
- four activation policy that specify the rules a
given implementation follows for activating
objects - shared server
- unshared server
- server-per-method
- persistent server
23BOA Shared Server
- A shared server activation policy
- multiple objects may reside in the same program
24The BOA Shared Server Activation Policy
25BOA Unshared Server
- An unshared server activation policy
- each object resides in a different server process
26The BOA Unshared Server Activation Policy
27BOA Server-per-Method
- A server-per-method activation policy
- the server runs only for the duration of the
particular method - several server processes for the same object may
be concurrently active
28The BOA Server-per-Method Activation Policy
29BOA Persistent Server
- A persistent server activation policy
- servers are activated by means outside BOA
- BOA treats all subsequent requests as shared
server calls
30The BOA Persistent Server Activation Policy
31CORBA 2.0 Initialization-Or How Does a Component
Find Its ORB?
- How does a component first discover its ORB?
- CORBA 1.1
- left this as an exercise for the ORB vendors
- non-portable solution
- CORBA 2.0
- defining a set of initialization APIs
- allows components to discover their ORB, BOA,
interface repository and a set of well known
object services
32CORBA 2.0 Initialization-Or How Does a Component
Find Its ORB?(Contd)
- CORBA 2.0 initialize scenario
- obtain an object reference for your ORB
- obtain a pointer to your object adapter
- discover what initial services are available
- obtain object references for the services you want
33CORBA 2.0 Initialization-Or How Does a Component
Find Its ORB?(Contd)
34CORBA 2.0 The Intergalactic ORB
- CORBA 1.1
- has some level of portability
- but have not interoperability
- CORBA 2.0
- IIOP(Internet Inter-ORB Protocol)
- for interoperability
- basically TCP/IP with some CORBA defined message
exchanges
35CORBA 2.0 The Inter-ORB Architecture
- Elements of the CORBA 2.0 inter-ORB architecture
- GIOP(General Inter-ORB Protocol)
- specifies a set of message formats and common
data representations for communications between
ORBs - defines seven message format that cover all the
ORB request/reply semantics - uses CDR(Common Data Representation)
- maps data types defined in OMG IDL into a flat
networked message representation - takes care of inter-platform issues such as byte
ordering and memory alignments
36CORBA 2.0 The Inter-ORB Architecture(Contd)
- Elements of the CORBA 2.0 inter-ORB
architecture(Contd) - IIOP(Internet Inter-ORB Protocol)
- specifies how GIOP messages are exchanged over a
TCP/IP network - makes it possible to use the Internet itself as
backbone ORB through which other ORBs can bridge
37CORBA 2.0 The Inter-ORB Architecture(Contd)
- Elements of the CORBA 2.0 inter-ORB
architecture(Contd) - ESIOP(Environment-Specific Inter-ORB Protocols)
- are used for out of the box interoperation over
specific networks - CORBA 2.0 specifies DCE as the first of many
optional ESIOP - DCE/ESIOP supports IORs using a DCE tagged
profile - supports Kerberos security, cell and global
directories, distribute time, and authenticated
RPC - transmit large amounts of data efficiently
- supports multiple underlying transport protocols
- can use both connection and ORB connectionless
protocols - OMG IDL and CDR types are mapped directly into
DCEs native Network Data Representation(NDR)
38(No Transcript)
39CORBA 2.0 ORB-to-ORB Bridging
- DSI(Dynamic Skeleton Interface)
- is used to receive all outgoing requests
- DII(Dynamic Invocation Interface)
- is used to invoke the request on a destination
ORB objects - This late binding technology
- is well suited to non-CORBA object buses such as
Microsofts OLE/COM
40Generic ORB-to-ORB Bridging Using CORBA 2.0s
Dynamic Facilities
41Federated ORBs
- You can use inter-ORB bridges and IIOPs to create
flexible topologies via federations of ORBs
42An Intergalactic Federation of Multivendor ORBs