Transcript Common Object Request Broker Architecture (CORBA)
Common Object Request Broker Architecture (CORBA)
By: Sunil Gopinath David Watkins
Introduction
• • • • What is the purpose / goals of CORBA?
How to meet goals?
Example Conclusion
What is the purpose / goals of CORBA?
• • Enable the building of plug and play component software environment Enable the development of portable, object oriented, interoperable code that is hardware, operating system, network, and programming language independent
How to meet goals?
• • Interface Definition Language (IDL) Object Request Broker (ORB)
Interface Definition Language (IDL)
• • • • Language Independence Defines Object Interfaces Hides underlying object implementation Language mappings exist for C, C++, Java, Cobol, Smalltalk, and Ada
Interface Definition Language (IDL)
module
IDL Compiler
Stubs IDL Definitions IDL Compiler 1.
2.
3.
Define objects using IDL Run IDL file through IDL compiler Compiler uses language mappings to generate programming language specific stubs and skeletons Skeletons
Object Request Broker (ORB)
• • • • • • What is it?
Architecture Request Handling Scenario CORBA Services CORBA Facilities
What is it?
• • • • Implementation of CORBA specification Middleware product Conceptual Software Bus Hides location and Application implementation details Middleware about objects OS Drivers Hardware
Client IDL
Client / Object Interaction
Obj Impl IDL Client IDL Obj Impl IDL ORB ORB Network
Interface Repository Client OBJ Ref
ORB Architecture
IDL Compiler Implementation Repository Object (servant) IDL Stub GIOP/IOOP DII ORB Interface IDL Skeleton DSI Object Adapter ORB Core
Interface Repository
Interface Repository • • • • • Database of object definitions Contains metadata about each object Allows for introspection Allows clients to discover interfaces at run-time Used in support of dynamic invocations Object Adapter
IDL Compiler
IDL Compiler • • Compiles IDL definition into stubs and skeletons Uses OMG specified language mappings to translate IDL into a language specific implementation Object Adapter
Implementation Repository
Implementation Repository • • Contains information that allows the ORB to locate and activate object implementations Provides information about the classes a server supports, the objects that are instantiated, and their IDs Object Adapter
ORB Core
• • • • Provides mechanism for transparently communicating client requests to target object implementations Makes client requests appear to be local procedure calls GIOP – General Inter-ORB Protocol IIOP – Internet Inter-ORB Protocol Object Adapter GIOP/IOOP ORB Core
ORB Interface
Client Object (servant) ORB Interface • Provides helper functions • Converting object references to strings • lists for requests made through DII
IDL Stub Client
IDL Stub
• • Static invocation interface (SII) Marshals application data into a common packet-level representation – Network byte order (little-endian or big endian) – Size of data types
IDL Skeleton
• Demarshals the packet-level representation back into typed data that is meaningful to an application – Network byte order (little-endian or big endian) – Size of data types Object (servant) IDL Skeleton
Dynamic Invocation Interface
Client DII • • Dynamically issue requests to objects without requiring IDL stubs to be linked in Clients discover interfaces at run time and learn how to call them Steps: 1.
Obtain interface name 2.
Obtain method description (from interface repository) 3.
4.
5.
Create request Invoke request
Dynamic Skeleton Interface
• • Server side analogue to DII Allows an ORB to deliver requests to an object implementation that does not have compile-time knowledge of the type of object it is implementing Object (servant) DSI Object Adapter
Object Adapter
• • • • • • Accept requests for service on behalf of the server’s objects Demultiplexes requests to the correct servant Dispatches the appropriate operation upcall on the servant Registers classes it supports and their run-time instances with the implementation repository • Portable Object Adapter (POA) policies control object behavior (ie. LifespanPolicy) Instance of the adapter design pattern Object (servant) IDL Skeleton DSI Object Adapter
Object Reference
Client OBJ Ref Object (servant) • Interoperable Object Reference (IOR) • Uniquely identifies each object • Contents • • • Type Name (repository ID) Protocol and Address Details Object Adapter Object Key (object adaptor name, object name)
Server Application Incoming Request ORB
Request Handling
POA POA POA Servants
Interface Repository Client OBJ Ref IDL Compiler
Scenario
Implementation Repository Object (servant) IDL Stub GIOP/IOOP DII ORB Interface IDL Skeleton DSI Object Adapter ORB Core
CORBA Services
• • Provide basic infrastructure functionality Currently there are 15 defined services – Naming - maps human names to object references (White Pages) – – Event - provides both a push and pull event model Object Trader - discover objects based on the services they provide (Yellow Pages) – Transactions – allows distributed objects to participate in atomic transactions
CORBA Facilities
• • • Provide higher-level functionality at the application level Provide standard components that can be used “off-the-shelf” Two Categories – Horizontal – user interface, information management, systems management, and task management – Vertical – domain based, telecommunications, financial services
Example
Conclusion
• • • • Distributed object, component architecture Real world examples of design patterns – TAO – freeware ORB • Adapter, Factory, Reactor, Strategy Plugable Transports CORBA Beans
References
• • • • • www.omg.org
www.cs.wustl.edu/~schmidt/corba.html
http://www.infosys.tuwien.ac.at/Research/Corba/O MG/arch2.htm
Communications of the ACM
, October 1998 Jeri Edwards, Dan Harkey, and Robert Orfali. Instant CORBA. New York: Wiley Computer Publishing, 1997.