Introduction to CORBA G Michael Youngblood Artificial Intelligence
Introduction to CORBA G. Michael Youngblood Artificial Intelligence Laboratory The University of Texas at Arlington 9/13/2021 © 2002 -2003 G. Michael Youngblood 1
Objectives n n n n CORBA technology introduction CORBA terminology introduction CORBA references introduction CORBA IDL CORBA Applications CORBA Services CORBA demonstration Additional information 9/13/2021 © 2002 -2003 G. Michael Youngblood 2
CORBA Technology Overview 9/13/2021 © 2002 -2003 G. Michael Youngblood 3
CORBA Common Object Request Broker Architecture n Specification written and maintained by the Object Management Group (OMG) http: //www. omg. org n First Specification: OMA Object Management Architecture n 9/13/2021 © 2002 -2003 G. Michael Youngblood 4
Object Management Architecture Object: an encapsulated entity with an immutable distinct identity whose services are accessed only through well-defined interfaces. n Interface Categories: general groupings for object interfaces. Conceptually linked by an ORB. n 9/13/2021 © 2002 -2003 G. Michael Youngblood 5
OMA: Interface Categories n n n Object Services: domain-independent, or horizontally oriented, interfaces used by many distributed object applications. Ex: Naming Service, Trading Service Domain Interfaces: domain-specific, or vertically oriented, interfaces usu. Industry specific. Ex: Person Identification Service Application Interfaces: developed specifically for a given application. Ex: your own CORBA applications 9/13/2021 © 2002 -2003 G. Michael Youngblood 6
OMA interface categories Application Interfaces Domain Interfaces Domain Interfaces Object Request Broker Object Services 9/13/2021 © 2002 -2003 G. Michael Youngblood 7
CORBA Terminology Side step. . 9/13/2021 © 2002 -2003 G. Michael Youngblood 8
CORBA Terminology n n n n CORBA Object: a “virtual” entity capable of being located by an ORB and having client requests invoked on it. Target Object: within the context of a CORBA request invocation, it is the CORBA object that is the target of that request. Client: an entity that invokes a request on a CORBA object, Server: an application in which one or more CORBA objects exist. Request: an operation invocation on a CORBA object by a client. Object Reference: a handle used to identify, locate, and address a CORBA object. Servant: a programming language entity that implements one or more CORBA objects. 9/13/2021 © 2002 -2003 G. Michael Youngblood 9
CORBA Technology Overview Returning… 9/13/2021 © 2002 -2003 G. Michael Youngblood 10
OMA realized through CORBA provides platformindependent programming interfaces and models for portable distributed object-oriented computing applications. 9/13/2021 © 2002 -2003 G. Michael Youngblood 11
CORBA major features OMG Interface Definition Language Mappings n Operation invocation and dispatch facilities (static and dynamic) n Object adapters n Inter-ORB Protocol n 9/13/2021 © 2002 -2003 G. Michael Youngblood 12
CORBA Architecture 9/13/2021 © 2002 -2003 G. Michael Youngblood 13
IDL n Interface Definition Language ¨ Sole purpose is to allow object interfaces to be defined in a manner that is independent of any particular programming language. 9/13/2021 © 2002 -2003 G. Michael Youngblood 14
Language Mappings IDL-to-Programming Language mappings are defined. n C, C++, Java, Ada, LISP, XML, COBOL, FORTRAN, Smalltalk, Eiffel, Perl, Python, Tcl, etc. n 9/13/2021 © 2002 -2003 G. Michael Youngblood 15
Operation Invocation and Dispatch Facilities n Static invocation and dispatch ¨ IDL translated into language-specific stubs and skeletons that are compiled into applications. n Dynamic invocation and dispatch ¨ Construction and dispatch of CORBA requests at run time. ¨ Interface and types determined by outside means (e. g. , Interface Repository) 9/13/2021 © 2002 -2003 G. Michael Youngblood 16
Object Adapters n n Serve as glue between servants and the ORB Fulfill 3 requirements ¨ Create object references, which allow clients to address objects ¨ Ensure each target object is incarnated by a servant ¨ Takes requests dispatched by a server-side ORB and further directs them to servants incarnating each of the target objects n POA! 9/13/2021 © 2002 -2003 G. Michael Youngblood 17
Inter-ORB Protocols n n ORB-to-ORB communication (even between different implementations) GIOP (“gee-op”): General Inter-ORB Protocol ¨ An abstract protocol that specifies transfer syntax and a standard set of message formats to allow independently developed ORBs to communicate over any connection-oriented transport. n IIOP (“eye-op”): Internet Inter-ORB Protocol ¨ GIOP 9/13/2021 over TCP/IP © 2002 -2003 G. Michael Youngblood 18
IOR ORB interoperability also requires standardized object reference formats. n Interoperable Object References (IOR) n ¨ Standard 9/13/2021 object reference format © 2002 -2003 G. Michael Youngblood 19
How does it work? Request Invocation n Object Reference Semantics n Reference Acquisition n Contents of an Object Reference n References and Proxies n 9/13/2021 © 2002 -2003 G. Michael Youngblood 20
Request Invocation n When a client invokes an operation via an object reference, the ORB does the following: ¨ ¨ ¨ ¨ 9/13/2021 Locates the target object Activates the server application if the server is not already running Transmits any arguments for the call to the object Activates a servant for the object if necessary Waits for the request to complete Returns any out and inout parameters and the return value to the client when the call completes successfully Returns an exception (including any data contained in the exception) to the client when the call fails © 2002 -2003 G. Michael Youngblood 21
Request Invocation Characteristics n n The entire request invocation mechanism is completely transparent to the client, to whom it looks like an ordinary method invocation on a local object. Request characteristics: ¨ ¨ ¨ ¨ 9/13/2021 Location transparency Server transparency Language independence Implementation independence Architecture independence OS independence Protocol independence Transport independence © 2002 -2003 G. Michael Youngblood 22
Object Reference Semantics n n n n n Every object reference identifies exactly one object instance Several different references can denote the same object References can be nil References can dangle Reference are opaque (the client is not allowed to look at their contents) References are strongly typed References support late binding References can be persistent References can be interoperable 9/13/2021 © 2002 -2003 G. Michael Youngblood 23
Reference Acquisition Object references are the only way for a client to reach target objects. n How does a client get a server’s object reference? n ¨ Bootstrapping ¨ Naming or Trading Service ¨ Command-line or reading a file ¨ Out-of-band method 9/13/2021 © 2002 -2003 G. Michael Youngblood 24
Contents of an Object Reference Repository ID n Endpoint Info n Object Key n Repository ID (standardized) 9/13/2021 Endpoint Info (standardized) © 2002 -2003 G. Michael Youngblood Object Key (proprietary) 25
References and Proxies n n When a reference is received by a client, the client-side run time instantiates a proxy object in the client’s address space This proxy is an instance that supplies an interface to the target object to the client. Client Server Proxy foo() Skeleton Instance foo() Object Reference 9/13/2021 foo() Servant © 2002 -2003 G. Michael Youngblood 26
Questions? CORBA Technology Overview n CORBA Terminology n 9/13/2021 © 2002 -2003 G. Michael Youngblood 27
CORBA References 9/13/2021 © 2002 -2003 G. Michael Youngblood 28
OMG’s Document Access Page n OMG Specifications http: //www. omg. org/technology/documents/index. htm n Key Specifications ¨ Architecture and Specification (CORBA/IIOP) ¨ IDL ¨ Language Mappings ¨ Services 9/13/2021 © 2002 -2003 G. Michael Youngblood 29
Good Books The C++ Standard… Advanced CORBA Programming with C++ by Michi Henning and Steve Vinoski n Many examples… PURE CORBA by Fintan Bolton n 9/13/2021 © 2002 -2003 G. Michael Youngblood 30
Implementations Orbacus n Omni. ORB n MICO n TAO (The ACE ORB) n ORBit n etc. n 9/13/2021 © 2002 -2003 G. Michael Youngblood 31
Questions? n CORBA References 9/13/2021 © 2002 -2003 G. Michael Youngblood 32
CORBA Interface Definition Language (IDL) 9/13/2021 © 2002 -2003 G. Michael Youngblood 33
Interface Definiton Languge Simple language n Mappings to most modern popular programming languages n Compiled into stub and skeleton code by an IDL compiler n 9/13/2021 © 2002 -2003 G. Michael Youngblood 34
IDL Compilation 9/13/2021 © 2002 -2003 G. Michael Youngblood 35
IDL Simple Example // description of the module Address. Book { interface Person { attribute string name; string send. EMail(in string from. Whom); }; } ; 9/13/2021 © 2002 -2003 G. Michael Youngblood 36
IDL Data Types 9/13/2021 © 2002 -2003 G. Michael Youngblood 37
IDL Supports n n n n Constants Custom types Attributes Methods Structures Exceptions Interfaces Modules 9/13/2021 © 2002 -2003 G. Michael Youngblood 38
Questions n CORBA IDL 9/13/2021 © 2002 -2003 G. Michael Youngblood 39
CORBA Applications 9/13/2021 © 2002 -2003 G. Michael Youngblood 40
General CORBA Application Development 1. 2. 3. 4. 5. 6. Determine your application's objects and define their interfaces in IDL Compile your IDL definitions into C++ stubs and skeletons Declare and implement C++ servant classes that can incarnate your CORBA objects Write a server main program Compile and link your server implementation files with the generated stubs and skeletons to create your server executable Write, compile, and link your code together with generated stubs 9/13/2021 © 2002 -2003 G. Michael Youngblood 41
Examples Coming soon… n Please hold questions until demonstration n 9/13/2021 © 2002 -2003 G. Michael Youngblood 42
CORBA Services 9/13/2021 © 2002 -2003 G. Michael Youngblood 43
CORBA Services n OMG Naming Service ¨ Basically, n OMG Trading Service ¨ Service n DNS for IORs discovery OMG Event Service ¨ Broadcast n n n events Interface Repository Time Service etc. 9/13/2021 © 2002 -2003 G. Michael Youngblood 44
Questions? n CORBA Services 9/13/2021 © 2002 -2003 G. Michael Youngblood 45
CORBA Demonstration 9/13/2021 © 2002 -2003 G. Michael Youngblood 46
CORBA Examples Simple Client-Server n Advanced Client-Server using Name. Service invoking a Callback n 9/13/2021 © 2002 -2003 G. Michael Youngblood 47
Questions? CORBA Applications n CORBA demonstrations n 9/13/2021 © 2002 -2003 G. Michael Youngblood 48
Additional Information Are there any questions? 9/13/2021 © 2002 -2003 G. Michael Youngblood 49
Questions Any other questions? 9/13/2021 © 2002 -2003 G. Michael Youngblood 50
References n n n http: //personal. bgsu. edu/~amayer/corba_intro. html http: //www. omg. org Henning, Michi and Steve Vinoski. Advanced CORBA Programming with C++. Addison-Wesley: Reading, MA. 1999. 9/13/2021 © 2002 -2003 G. Michael Youngblood 51
Thank You! G. Michael Youngblood youngbld@cse. uta. edu http: //tauceti. uta. edu 9/13/2021 © 2002 -2003 G. Michael Youngblood 52
- Slides: 52