CORBA by dffhrtcv3


From mainframe applications...

 Terminal Access

                       Mainframe Data and
                            Applications client/server applications...

     Client                         Corporate
     Client                     Oracle, DB2, MS
                                SQL, Informix,
                                Sybase, etc.

    Fat Client                  Back-end Data
…to multi-tier distributed

              Middle-Tier Services       Corporate
   Client      Business Processes
   Java                              Oracle, DB2, MS
   Client                            SQL, Informix,
                   Middle Tier
Thin Client      (NT/Unix/AS400)     Back-end Data
Enterprise computing

s Enterprises have a variety of computing platforms
   n Unix, 95/98/NT, MVS, AS/400, VMS, Macintosh,
     NC’s, VxWorks, etc.
s Enterprises write applications in a variety of
  programming languages
   n C, C++, Java, COBOL, Basic, Perl, Smalltalk, etc.
s Enterprises need an open architecture to support the
  heterogeneous environment
Object-oriented computing for the
s Enterprise applications are being written in terms of
  objects - reusable components that can be accessed
  over the enterprise network
s CORBA supplies the architecture for distributed
  applications based on open standards
Distributed application advantages

s Scalability
   n Server replication
   n Thin, heterogeneous clients

s Re-usability
s Partitioned functionality = easy updating of either
  clients or servers
Competing technologies for
distributed objects
s Open standards based solutions
     Servlets, JSP, Java Security
s The All-Microsoft solution
     n COM, COM+, ActiveX, Visual C++, MTS, ASP, IIS, etc.
s Other proprietary solutions
   n Message oriented middleware (MOMs - MQSeries, etc.)
   n TP monitors
TP monitors, web front-ends
                    Example: BEA Jolt
                    Example: BEA Jolt
 s Quickly extends an          s Limited to single process,
   existing application for      single machine
   access from the web         s Not object oriented or
 s Client context maintained     truly distributed
   by server                   s Jolt server consumes an
                                 additional process
                               s Jolt client classes must be
                                 either pre-installed or

 s Rich, well-integrated          s   NT only
   platform                       s   Firewall issue
 s Object-oriented                s   Limited flexibility
 s Web client access via:         s   Security
     n ActiveX controls &
     n Active Server Pages,
       HTTP and IIS
 s Distributed - as long as its
CORBA vs. ad-hoc networked apps

s Technical considerations:
s CORBA/EJB implementations have integration with
  object databases, transaction services, security
  services, directory services, etc.
s CORBA implementations automatically optimize
  transport and marshalling strategies
s CORBA implementations automatically provide
  threading models
CORBA vs. ad-hoc networked apps

s   Business considerations:
s   Standards based
s   Multiple competing interoperable implementations
s   Buy vs. build tradeoffs
s   Resource availability
       l software engineers
       l tools
The Object Management Group (OMG)
s Industry Consortium with over 855 member
  companies formed to develop a distributed object
s Accepted proposals for the various specifications put
  forth to define:
   n Communications infrastructure
   n Standard interface between objects
   n Object services
s Developed the spec for the Common Object Request
  Broker Architecture (CORBA)
CORBA design goals/characteristics:

s No need to pre-determine:
    n The programming language
    n The hardware platform
    n The operating system
    n The specific object request broker
    n The degree of object distribution
s   Open Architecture:
    n Language-neutral Interface Definition Language (IDL)
    n Language, platform and location transparent
s Objects could act as clients, servers or both
s The Object Request Broker (ORB) mediates the interaction
  between client and object
IIOP - Internet Inter-ORB Protocol

s Specified by the OMG as the standard communication
  protocol between ORBs
s Resides on top of TCP/IP
s Developers don’t need to “learn” IIOP; the ORB handles this
  for them
s Specifies common format for:
   n object references, known as the Interoperable Object
      Reference (IOR)
   n Messages exchanged between a client and the object
    Key definitions: ORB and BOA
s   Object Request Broker (ORB)
     n Transports a client request to a remote object an returns the result. Implemented as:
          l a set of client and server side libraries
          l zero or more daemons in between, depending on ORB implementation, invocation
             method, etc.
s   Object Adapter (OA), an abstract specification
     n Part of the server-side library - the interface between the ORB and the server process
     n listens for client connections and requests
     n maps the inbound requests to the desired target object instance
s   Basic Object Adapter (BOA), a concrete specification
     n The first defined OA for use in CORBA-compliant ORBs
     n leaves many features unsupported, requiring proprietary extensions
     n superceded by the Portable Object Adapter (POA), facilitating server-side ORB-neutral
What is an object reference?
s   An object reference is the distributed computing equivalent of a pointer
     n CORBA defines the Interoperable Object Reference (IOR)
          l IORs can be converted from raw reference to string form, and back
          l Stringified IORs can be stored and retrieved by clients and servers using other
     n an IOR contains a fixed object key, containing:
          l the object’s fully qualified interface name (repository ID)
          l user-defined data for the instance identifier
     n An IOR can also contain transient information, such as:
          l The host and port of its server
          l metadata about the server’s ORB, for potential optimizations
          l optional user defined data
CORBA object characteristics
s   CORBA objects have identity
     n A CORBA server can contain multiple instances of multiple interfaces
     n An IOR uniquely identifies one object instance
s   CORBA object references can be persistent
     n Some CORBA objects are transient, short-lived and used by only one client
     n But CORBA objects can be shared and long-lived
         l business rules and policies decide when to “destroy” an object
         l IORs can outlive client and even server process life spans
s   CORBA objects can be relocated
     n The fixed object key of an object reference does not include the object’s location
     n CORBA objects may be relocated at admin time or runtime
     n ORB implementations may support the relocation transparently
s   CORBA supports replicated objects
     n IORs with the same object key but different locations are considered replicas
CORBA server characteristics

s When we say “server” we usually mean server process, not
  server machine
s One or more CORBA server processes may be running on a
s Each CORBA server process may contain one or more
  CORBA object instances, of one or more CORBA interfaces
s A CORBA server process does not have to be “heavyweight”
   n e.g., a Java applet can be a CORBA server
Interfaces vs. Implementations
                             IDL Interface


  CORBA Objects are fully encapsulated
  Accessed through well-defined interface
  Internals not available - users of object have no knowledge of implementation
  Interfaces & Implementations totally separate
  For one interface, multiple implementations possible
  One implementation may be supporting multiple interfaces
Location Transparency

        Process A                 Process B                   Process C

                     Machine X                               Machine Y

  A CORBA Object can be local to your process, in another process on the
  same machine, or in another process on another machine
Stubs & Skeletons

  client program                                                        object
      operation                                                         language
     signatures                                                         mapping entry
                        Stub                              Skeleton      points

                                     ORB Operations    Basic Object Adapter
        Location Service
                   Transport Layer        ORB                    Multithreading

            Stubs and Skeletons are automatically generated from IDL interfaces
Dynamic Invocation Interface

  client program              DII* calls                         object

      dynamic                                                    method


                       DII*     ORB Operations   Basic Object Adapter

            * Dynamic Invocation Interface
Why IDL?
s IDL reconciles diverse object models and programming
s Imposes the same object model on all supported languages
s Programming language independent means of describing data
  types and object interfaces
   n purely descriptive - no procedural components
   n provides abstraction from implementation
   n allows multiple language bindings to be defined
s A means for integrating and sharing objects from different
  object models and languages
IDL simple data types

  s Basic data types similar to C, C++ or Java
     n long, long long, unsigned long, unsigned long long
     n short, unsigned short
     n float, double, long double
     n char, wchar (ISO Unicode)
     n boolean
     n octet (raw data without conversion)
     n any (self-describing variable)
IDL complex data types
s string - sequence of characters - bounded or unbounded
   n string<256> msg // bounded
   n string msg // unbounded
s wstring - sequence of Unicode characters - bounded or
s sequence - one dimensional array whose members are
  all of the same type - bounded or unbounded
   n sequence<float, 100> mySeq // bounded
   n sequence<float> mySeq // unbounded
IDL user defined data types

  s Facilities for creating your own types:
     n typedef
     n enum
     n const
     n struct
     n union
     n arrays
     n exception
  s preprocessor directives - #include #define
Operations and parameters

 s Return type of operations can be any IDL type
 s each parameter has a direction (in, out, inout) and
   a name
 s similar to C/C++ function declarations
CORBA Development Process Using
    Client                           IDL                               Object
Implementation                                                     Implementation


      Client                                                               Object
     Program                                                           Implementation
     Source       Stub Source                    Skeleton Source

                  Java or C++                       Java or C++
                   Compiler                          Compiler

                 Client Program                Object Implementation
A simple example: IDL

// module Money
     interface Accounting
       float get_outstanding_balance();
  A Java client
import org.omg.CORBA.*;
public class Client
            public static void main(String args[]) {
                        try {
                                   // Initialize the ORB.
                                   System.out.println("Initializing the ORB...");
                                   ORB orb = ORB.init(args, null);
                                   // bind to an Accounting Object named "Account"
                                   Money.Accounting acc =Money.AccountingHelper.bind(orb,"Account");
                                   // Get the balance of the account.
                                   System.out.println("Making Remote Invocation...");
                                   float balance = acc.get_outstanding_balance();
                                   // Print out the balance.
                                   System.out.println("The balance is $" + balance);
                                   catch(SystemException e) {
                                       System.err.println("Oops! Caught: " + e);
A Java server object
import Money.*;
import org.omg.CORBA.*;
class AccountingImpl extends _AccountingImplBase
public float get_outstanding_balance()
                          float bal = (float)14100.00; // Implement real outstanding balance function here
                          return bal;
public static void main(String[] args)
 try {
                          ORB orb = ORB.init(args, null); // Initialize the ORB.
                           BOA boa = orb.BOA_init();        // Initialize the BOA.
                          System.out.println("Instantiating an AccountingImpl.");
                          AccountingImpl impl = new AccountingImpl("Account");
                          System.out.println("Entering event loop."); // Wait for incoming requests
              catch(SystemException e) {
                          System.err.println("Oops! Caught: " + e);
A C++ client
#include <Money_c.hh>

int main (int argc, char* const* argv)

    try {
      cout << "Initializing ORB..." << endl;
      CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);

     cout << "Binding..." << endl;
     Money::Accounting_var acc = Money::Accounting::_bind();

     cout << "Making Remote Invocation..." << endl;
     cout << "The outstanding balance is "
      << acc->get_outstanding_balance()
             << endl;
    catch (CORBA::Exception& e) {
      cerr << "Caught CORBA Exception: " << e << endl;
    return 0;
A C++ server object
#include <Money_s.hh>
class AccountingImpl : public _sk_Money::_sk_Accounting
  AccountingImpl(const char* name) : _sk_Accounting(name) {}
  CORBA::Float get_outstanding_balance()
    // implement real outstanding balance function here
    return 3829.29;

int main (int argc, char* const* argv)
  // Initialize ORB.
  CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
  CORBA::BOA_var boa = orb->BOA_init(argc, argv);
  cout << "Instantiating an AccountingImpl" << endl;
  AccountingImpl impl("Accounting");
  cout << "Entering event loop" << endl;
  return 0;
CORBA services

s The OMG has defined a set of Common Object
s Frequently used components needed for building
  robust applications
s Typically supplied by vendors
s OMG defines interfaces to services to ensure
Popular CORBA services

 s Naming
    n maps logical names to to server objects
    n references may be hierarchical, chained
    n returns object reference to requesting client
 s Events
    n asynchronous messaging
    n decouples suppliers and consumers of information
Popular CORBA services
s Notification
   n More robust enhancement of event service
   n Quality of Service properties
   n Event filtering
   n Structured events
s Transaction
   n Ensures correct state of transactional objects
      l Manages distributed commit/rollback
      l Implements the protocols required to guarantee the ACID
        (Atomicity, Consistency, Isolation, and Durability) properties of
CORBA Internet Access via IIOP

    Java Enabled   HTTP     Web Server
    Web Browser                                     HTML
                               Proxy              Java Applets
   HTML Document               server
     Java Applet     IIOP
     <APPLET…>                      Naming
     </APPLET>                      service

                           Objects       JDBC
The future: CORBA 3

s Spec is complete. Final adoption due in November.
s Internet related features:
s Standard for callbacks through firewalls
      l currently not allowed by most firewalls, proprietary

s Interoperable naming service
      l standard bootstrapping mechanism to find naming services
      l iioploc://

s Quality of service enhancements
   n Asynchronous Messaging
      l invocation result retrieval by polling or callback
   n Quality of Service Control
      l Clients and objects may control ordering (by time, priority, or
        deadline); set priority, deadlines, and time-to-live
      l set a start time and end time for time-sensitive invocations
      l control routing policy and network routing hop count

s Minimum, Fault-Tolerant, and Real-Time CORBA
   n minimum CORBA - for embedded systems
      l strips out unnecessary pieces - dynamic invocation, etc.
   n Real-time CORBA
      l standardizes resource control - threads, protocols, connections
      l uses priority models to achieve predictable behavior for both
        hard and statistical realtime environments
   n Fault-tolerant CORBA
      l entity redundancy and fault management control
      l spec is still in process

s CORBA Component Model (CCM)
  n Spec approved on September 2, 1999
  n Support for Java, COBOL, Microsoft COM/DCOM, C++,
    Ada, C and Smalltalk
  n Container environment that is persistent, transactional,
    and secure
  n Containers will provides interface and event resolution
  n Integration/interoperability with Enterprise JavaBeans
CORBA vendors

 s Inprise/Borland VisiBroker:
 s Iona Orbix:
 s Rogue Wave Nouveau:
 s ObjectSpace Voyager:
Real-world implementations
 s Commercial products
    n Oracle8i
    n SilverStream Application Server
    n BEA WebLogic Server
    n Vitria BusinessWare enterprise integration server
    n Evergreen Ecential ecommerce engine
    n enCommerce getAccess security server
 s End-user applications:
Example: Cysive - Cisco
Internetworking Products Center
Example: Cisco IPC
s Server-side Java system
   n Provides extreme scalability and greatly accelerated
      l allows IPC to share data and system resources across multiple
      l maintains continuous server connections throughout long,
        complex transactions
      l process many more orders in a shorter period of time
Example: Cisco IPC
s Significant improvement of extensibility
   n Built on an object-oriented foundation, providing a modular
   n New features can be added
   n Back-end applications, such as Oracle Financials, can be
     linked to IPC quite easily
   n System offers greater availability than the earlier version,
     requiring almost no downtime—planned or unplanned—as
     capabilities are added
 Resources: Web
s Web sites:
   n OMG:
   n Washington University:
   n Free CORBA page
   n Cetus links (links to CORBA vendors, benchmarks, etc.):

s Newsgroups:
   n comp.object.corba
Resources: books

s Client/Server Programming With Java and CORBA (2nd
   n by Robert Orfali and Dan Harkey
s Programming with VisiBroker, A Developer's Guide to
  VisiBroker for Java
   n by Doug Pedrick, Jonathan Weedon, Jon Goldberg, and Erik
s Advanced CORBA Programming with C++
   n by Michi Henning and Steve Vinoski

To top