SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
Common Object Request
      Broker Architecture
                                             Ali Ghodsi
                                           aligh@imit.kth.se




2004-02-02   A. Ghodsi aligh@imit.kth.se                  1




                                                               1
Goal of lecture

    Go a bit more into depth on the core
    architecture of CORBA

    Less breadth
         Read van Steen’s book




2004-02-02             A. Ghodsi aligh@imit.kth.se   2




                                                         2
Reading suggestions
       Tanenbaum & van Steen
             CORBA
                Section 2.3 page page 85-98
                Section 3.2.2 page 152-158
                Section 9.1

             Read chapter 9 and compare other systems with CORBA
             Compare RPC and DCE Remote Objects with CORBA


       Links
             Nice CORBA tutorial:
             http://www.omg.org/gettingstarted/



2004-02-02                     A. Ghodsi aligh@imit.kth.se         3




                                                                       3
Outlook
     General Overview
             General Information
             Applications
     Quick Architectural Overview
             OOP plus Distribution Transparency
             CORBA main overview
     Interface Definition Language (IDL)
             Types
             Examples
             Mappings
     ORB
             DII (and DSI)
             ORB interface
             Object Reference
             POA
             Persistent and Transient Objects
     Conclusions
2004-02-02                      A. Ghodsi aligh@imit.kth.se   4




                                                                  4
General CORBA Information
        Distributed Object Model (more later)
        It is a middleware
             Difference between Network OS               Middleware?

        Only a standard (v 2.7, 3.0)
             No reference implementation!
             Many independent implementations

        OMG - Non-profit organization
             800 members!
             Standardized UML and more…


2004-02-02                 A. Ghodsi aligh@imit.kth.se                 5




                                                                           5
Real World Applications?
    Support ”dinosaurs”
         Companies have invested years of development in
         projects done in ADA, C, Smalltalk…
         CORBA enables interoperability with new languages

    Languages with small user-base
         Eg Erlang, again interoperability

    Big ERM, ERP, IS
         Many different architectures, languages, platforms…




2004-02-02                  A. Ghodsi aligh@imit.kth.se        6




                                                                   6
Outlook
    General Overview
    Quick Architectural Overview
         OOP with Distribution Transparency
         CORBA overview
    Interface Definition Language (IDL)
         Types
         Examples
         Mappings
    ORB
    Conclusions




2004-02-02                A. Ghodsi aligh@imit.kth.se   7




                                                            7
CORBA builds on the DOM
    Provides a nice model

         Encapsulation

         Inheritance

         Polymorphism




2004-02-02               A. Ghodsi aligh@imit.kth.se   8




                                                           8
Exploiting Encapsulation
    Encapsulation enables:
         Distribution Transparency
             Have stubs and skeletons that together with ORBs
             enable distribution*.


         Inter-operability**
             Define interfaces in a standardised way
             Interface Definition Language (IDL)




2004-02-02                  A. Ghodsi aligh@imit.kth.se         9




                                                                    9
Goal 1: Distribution Transparency
    Encapsulation: black-box principle
         Has an interface
         Implementation details
                                               public interface MathBox {
         hidden
                                                             int add(int x, int y);
                                               }         Transparently
                                                           distribute
                                               public class MathBoxCL
  …                                            implements MathBox {
  MathBox obj = new MathBoxCL();                             MathBoxCL() {}
  System.out.println(obj.add(10,20));                        int add(int x, int y)
  …                                                          { return x+y; }
                                               }
2004-02-02                     A. Ghodsi aligh@imit.kth.se                            10




                                                                                           10
Distribution Transparency
                        Missing parts:
               Client   • Marshalling                    Server Implementation
                  …                                 int add(int x, int y)
                          • Unmarshalling
MathBox obj = new MathBoxCL();                      { return x+y; }
Integer result = obj.add(10,20);
                          • References
                  …
                                              MathBoxCL (SKELETON)
                        • Binding client to server
                                                      int invoke(msg msg)
      MathBoxCL (PROXY)                               {
                                                      {      int x, y;
                                                             x=msg.Unmarshall(INT);
                                                             x=msg.Unmarshal(INT);
int add(int x, int y)
                                                             y=msg.Unmarshall(INT);
                                                             y=msg.Unmarshal(INT);
{     Msg msg=new Msg();
                                                             res=serverImpl.add(x,y);
      msg.Marshall(x);
      msg.Marshal(x);
                                                             Msg msg=new Msg();
      msg.Marshall(y);
      msg.Marshal(y);
                                                             msg.marshall(res);
                                                             msg.marshal(res);
      SendReqMsg(HOST,IP,msg);
      SendReqMsg(HOST,IP,msg);
                                                             SendRespMsg(HOST,IP,msg);
                                                             SendRespMsg(HOST, IP, msg);
}
                                                      }

  2004-02-02                     A. Ghodsi aligh@imit.kth.se                           11




                                                                                            11
Goal 2: Inter-operability
         Use a language with standardized syntax to
         define the interface
         Generate the stub and the skeleton
                Programming Language Independent

                                                                                  C++
                              JAVA
                                                                        MathBoxCL (SKELETON)
                                                              int invoke(Msg msg)
                                                              {         int x, y;
                      MathBoxCL (STUB)                                  msg=GetMsg();
   int add(int x, int y)
   {     Msg msg=new Msg();                                             x=msg.Unmarshal(INT);
               msg.Marshal(x);                                          y=msg.Unmarshal(INT);
               msg.Marshal(y);                                          res=serverImpl.add(x,y);
               SendReqMsg(HOST,IP,msg);                                 Msg msg=new Msg();
   }                                                                    msg.marshal(res);
                                                                        SendRespMsg(HOST, IP, msg);
                                                              }

2004-02-02                                A. Ghodsi aligh@imit.kth.se                                 12




                                                                                                           12
Overview

                                             operation()
               Client                         args + return      Object Implementation
                                                 value



                                                                                    Object
                                                                         SKELETON
               STUB                                                                 Adapter




                                              Network
                 ORB Core                                              ORB Core
             ORB-dependent implementation
             Application specific Stub and Skeleton
             Same inteface. ORB-independent



2004-02-02                               A. Ghodsi aligh@imit.kth.se                          13




                                                                                                   13
Outlook
    General Overview
    Architecture Overview
    Interface Definition Language (IDL)
         Types
         Example
         Language Mappings
    ORB
    Conclusions


2004-02-02            A. Ghodsi aligh@imit.kth.se   14




                                                         14
Interface Definition Language
        Builds on OOP principle of encapsulation
             Clear boundary between implementation and interface

        Independent
             Programming Language (Only OO?)
             OS
             Platform
             Network Connection
             etc

        Can be converted to a binary format and stored in a
        database (i.e. well-defined schema, iterators)
             Interface Repository (IR)
             A Repository ID for each interface

2004-02-02                     A. Ghodsi aligh@imit.kth.se         15




                                                                        15
IDL’s Type System
        Two levels:
             Interfaces for CORBA objects!
                One interface per CORBA object
             Official types for variables
                integers, floats
                struct, enum
                array
                string
                binary values
                …and more!
             Scoped types
                modules
                exceptions
                Interfaces
                structs

2004-02-02                         A. Ghodsi aligh@imit.kth.se   16




                                                                      16
Examples
DSLABS.IDL:
typedef string GroupMembers[4];

interface DS_project {
     long register_project(in long groupId, in string status, inout string date);
     long get_status(in long groupId, out string state, out string date, out
        GroupMembers gm);
};



 2004-02-02                      A. Ghodsi aligh@imit.kth.se                        17




                                                                                         17
IDL language mappings
    OMG defines mappings to different languages
         C, C++, Java, Smalltalk, COBOL, Ada, Lisp, PL/1,
         Python, and IDLscript
         Proprietary mappings exist for obscure languages,
         though not standardized!


    Every ORB has an IDL compiler
         Creates
             A STUB and
             A SKELETON




2004-02-02                 A. Ghodsi aligh@imit.kth.se       18




                                                                  18
Outlook
    General Overview
    Architecture Overview
    Interface Definition Language (IDL)
    ORB
         DII (and DSI)
         ORB interface
         Object References
         POA
         Persistent and Transient Objects
    Conclusions




2004-02-02                 A. Ghodsi aligh@imit.kth.se   19




                                                              19
Compile time vs Runtime?

    What if interfaces change?
         Recompile everything? Unfeasable
         Dynamic interface definitions required:
             IS (Information Systems)
             ERM (Enterprise Resource Management systems)
             Batch Service
             etcetera




2004-02-02                A. Ghodsi aligh@imit.kth.se       20




                                                                 20
Dynamic Invocation Interface (DII)
        Generic run-time invocation

             No compile-time knowledge of CORBA
             object interfaces
             No stub and skeleton needed a-priori
             Instead, a generic interface is used
               Of course defined in IDL




2004-02-02                  A. Ghodsi aligh@imit.kth.se   21




                                                               21
Dynamic Invocation Interface (DII) cont.
        In essence:
             Search and fetch an IDL from an Interface
             Repository. (remember binary presentation
             of IDL)
             Construct a request
             Specify target object, operation, and
             parameters
             Invoke the request
               C++ (not entirely true)
                  invoke(remoteObj, ”getStatus”, paramters)
               Java uses reflection/introspection (transparent):
                  remoteObj.getStatus(paramters);
2004-02-02                  A. Ghodsi aligh@imit.kth.se            22




                                                                        22
Complete picture

                                                  operation()
                    Client                         args + return      Object Implementation
                                                      value


                                                                   Dynamic
                                                                                Static    Object
      Dynamic         Static                                       Skeleton
                                                                               Skeleton   Adapter
     Invocation       Stub                                         Interface



                                                   Network
                      ORB Core                                              ORB Core
                  ORB-dependent implementation
                  Application specific Stub and Skeleton
                  Same inteface. ORB-independent



2004-02-02                                    A. Ghodsi aligh@imit.kth.se                           23




                                                                                                         23
Object References
        Remote object references
             Enable clients to invoke CORBA objects

        Three incarnations
             Language specific implementation
                E.g. pointer to a stub in C++ implementing the
                IDL
                Not valid outside local computation space
             Language independent ORB representation
                IOR, Inter-operable Object Referenece
                Supported by all ORBs
             Textual representation
                Send by e-mail, store in DB, textfiles and so on.

2004-02-02                   A. Ghodsi aligh@imit.kth.se            24




                                                                         24
Inter-operable Object References (IOR)


              Type Name                Protocol
                 ”Reference toObject ReferenceObject Key Name)
                      Remote an object on a server
             (Repository ID) Hostname & Port (Adapter & Object




  *GIOP, address, port         ex: ”IIOP v1.0”,”ripper.it.kth.se”, 8765

  *Which object adapter, which object?

                               ex: ”OA5”, ”_DSD”


  Repository ID                ex: ”IDL:KTH/imit/DSD:1.0”
2004-02-02                      A. Ghodsi aligh@imit.kth.se               25




                                                                               25
ORB Interface

                                                  operation()
             Client                                args + return     Object Implementation
                                                      value


                                                                   Dynamic
                                                   ORB                          Static    Object
     Dynamic          Static                                       Skeleton
                                                   Interface                   Skeleton   Adapter
     Invocation       Stub                                         Interface



                                                   Network
     ORB Core                                                               ORB Core
                  ORB-dependent implementation
                  Application specific Stub and Skeleton
                  Same inteface. ORB-independent




2004-02-02                                    A. Ghodsi aligh@imit.kth.se                           26




                                                                                                         26
ORB Interface
    Standard interface (defined in IDL)
         All ORBs implement this interface


    Important services provided:
         Bootstrapping, getting initial references
         Converting Object References to Strings and
         vice versa
         Object Reference Counting
             Distributed garbage collection



2004-02-02                  A. Ghodsi aligh@imit.kth.se   27




                                                               27
How do I get an IOR?
    All ORBs implement:
         string_to_object()
             file, e-mail, phone :)

         resolve_initial_references()
        Returns an IOR for naming service,                  interface
    repository
              Continue to search for IOR’s in a naming
              service




2004-02-02                    A. Ghodsi aligh@imit.kth.se               28




                                                                             28
Portable Object Adapter (POA)

                                                  operation()
             Client                                args + return     Object Implementation
                                                      value


                                                                   Dynamic
      Dynamic
                                                      ORB          Skeleton
                                                                                Static    Object
                      Static                                                   Skeleton
                                                    Interface      Interface              Adapter
     Invocation       Stub



                                                   Network
     ORB Core                                                               ORB Core
                  ORB-dependent implementation
                  Application specific Stub and Skeleton
                  Same inteface. ORB-independent




2004-02-02                                    A. Ghodsi aligh@imit.kth.se                           29




                                                                                                         29
Why Object Adapters?
             Client 1                                 Server
dsObject.calculate();                      DsObject::calculate()
                                           {
             Client 2                                 ...
dsObject.calculate();                      }


  Several clients call the same object, what
  to do?
       Demultiplex requests

2004-02-02              A. Ghodsi aligh@imit.kth.se                30




                                                                        30
Why Object Adapters? (2)
             Client 1                                   Server
dsObject.calculate();                        DsObject::calculate()
                                             {
             Client 2                                   ...
dsObject.calculate();                        }

   Queue requests or run in separate threads?
        Serialize all requests
        One thread per object
        One thread per invocation
        Pool of threads

2004-02-02                A. Ghodsi aligh@imit.kth.se                31




                                                                          31
Why Object Adapters? (2)
             Client 1                                 Server
dsObject.calculate();                      DsObject::calculate()
                                           {
             Client 2                                 ...
dsObject.calculate();                      }

   Security between the objects?
        Sandboxing?
        Share methods, separate data?

2004-02-02              A. Ghodsi aligh@imit.kth.se                32




                                                                        32
Why Object Adapters? (2)
             Client 1                                       Server
dsObject.calculate();                            DsObject::calculate()
                                                 {
             Client 2                                       ...
dsObject.calculate();                            }

   Lifespan policy:
        Transient objects
        Persistent Objects
              Continues to exist even if activated/deactivated?

2004-02-02                    A. Ghodsi aligh@imit.kth.se                33




                                                                              33
Portable Object Adapter – PL meets
ORB!
    POA is generic and CORBA object independent
    and implements different activation policies

    POA keeps pointers to skeletons*

    An Object Identifier is associated with object.

    A table called Active Object Map maps between
    Object Identifers => Skeletons



2004-02-02            A. Ghodsi aligh@imit.kth.se     34




                                                           34
Portable Object Adapter
      OBJ 1       OBJ 2                                                 OBJ 3

      skel1       skel2                                                 skel3


   POA1 (policy1)                                   POA2(policy2)
                   Active Object Map                                     Active Object Map

   Invoke right    OBJ2 -> skel2                    Invoke the right     OBJ3 -> skel3

                   OBJ1 -> skel1

   skeleton                                         skeleton

                    Server Demultiplexer
                    Dispatch requests                            POA1

                    to the right POA                             POA2

2004-02-02                         A. Ghodsi aligh@imit.kth.se                               35




                                                                                                  35
Transient Object Illustration
                  Client
      _dsd->student_operation()
                                                                            Object Implementation


STUB: Object Reference                                                          Reply message
IDL:Institution/IT/DSD:1.0   ”IIOP v1.0”,”ripper”, 8765   ”OA5”, ”_DSD”           Unique ID : ”13FABCDA”

                                                                            return variables, out parameters


                                                                       Active Object Maps
   Stub                                                                   OA4:
                                                                          _InfoSec                             Object
               Request message                                                                      Skeleton
                                                                          OA5:                                 Adapter
                 Unique ID : ”13FABCDA”       ”OA5”, ”_DSD”
                                                                          _DSC
                         student_operation() + *par                       _DSD




          ORB Core                                                                       ORB Core

 2004-02-02                                       A. Ghodsi aligh@imit.kth.se                                      36




                                                                                                                         36
Persistent Objects
        A IOR to a Persistent Object always points
        to the same object
             Migration Transparency
             Location Transparency


        Ceases to exist only if the CORBA object is
        logically destroyed
             Might move
             Might change IP, Port, Machine
             Might change POA
             etc

2004-02-02                  A. Ghodsi aligh@imit.kth.se   37




                                                               37
Persistent Objects continued
    Its life cycle is independent of the objects
         I.e. its existence is independent of whether the
         object is in the local address-space.
    ORBs can automatically startup objects
    implementing persistent CORBA objects




2004-02-02              A. Ghodsi aligh@imit.kth.se     38




                                                             38
How is this possible?
    Implementation repository (IMR) is used
    Keeps information about
         Object Adapter
         Startup Command
         Current Server




2004-02-02           A. Ghodsi aligh@imit.kth.se   39




                                                        39
Persistent Objects Illustrated
           Client
                                          Implem. Repository                                 Object Implementation
_dsd->student_operation()
                                      IMR Table
                                       Adapter        Startup           Address

                  ORB Core             xOA_1          rsh x ”/bin/st”   bored:131
                                       yOA_2          /startup          ir:1444
                                                                                                 Reply message
                                       OA5            rsh ripper /run   ripper:313
              Location Forward                                                                      Unique ID : ”13FABCDA”

                                                                                                 return variables, out parameters

          ORB Core
                                                                                     Active Object Maps
  Stub                                                                                OA4:
                                                                                      _InfoSec
                  Request message
                                                                                      OA5:
                    Unique ID : ”13FABCDA”      ”OA5”, ”_DSD”
                                                                                      _DSC                       Skeleton
                           student_operation() + par                                  _DSD

STUB: Object Reference
  IDL:KTH/imit/DSD:1.0   ”IIOP v1.0”,”IMR”, 8765
                          ”IIOP v1.0”,”ripper”, 313    ”OA5”, ”_DSD”
                                                                                              ORB Core
 2004-02-02                                    A. Ghodsi aligh@imit.kth.se                                                  40




                                                                                                                                    40
Failure and replication (IOR cont)
   Multiple locations in one reference. If an invocation fails, go to next location

              Type Name             Protocol1            Object1 Key
             (Repository ID)    Hostname1 & Port1 (Adapter1 & Object1 Name)


                                      Protocol2 Object2 Key
                      Remote Object Port2 on a server
                            to an object (Adapter2
                 ”Reference Hostname2 & Reference & Object2 Name)

  *GIOP, address, port         ex: ”IIOP v1.0”,”ripper.it.kth.se”, 8765

   Repository ID                                          ex: ”IDL:KTH/imit/DSD:1.0”

   HOST1/PORT2/ADAPTER2/OBJECT2                           ex: ripper1/1234/oa1/obj1
   HOST2/PORT2/ADAPTER2/OBJECT2                           ex: ripper2/3233/oa3/obj6
   …
2004-02-02                      A. Ghodsi aligh@imit.kth.se                            41




                                                                                            41
Summary-1
        CORBA is a standardization effort

        Based on the the Distributed Object Model

        Provides inter-operability

        Uses proprietary interface language: IDL
          All CORBA objects have an interface in IDL
          Most of the services offered by CORBA have an
          interface in IDL




2004-02-02                A. Ghodsi aligh@imit.kth.se     42




                                                               42
Summary-2
        Provides both Dynamic and Static invocations
           DII/DSI and STUBS/SKELETONS

        Stubs/Skeletons talk to an ORB

        The ORB uses a standardized protocol to exchange
           Messages(Req/Resp), IORs (persistent/transient)

        ORB uses a POA to implement different activation policies
             Threading policy
             Lifespan policy (Persistent vs. Transient Objects)
             Security (sandboxing of object implementations)


2004-02-02                     A. Ghodsi aligh@imit.kth.se          43




                                                                         43
What did I miss?
        A whole lot! ☺
          CORBA facilities/services
             Synchronization
             Caching
             Replication
             Fault-tolerance
             Security
        Comparison of CORBA against
           .NET
           DCOM
           Java RMI
           etcetera
        Please read chapter 9!
2004-02-02                A. Ghodsi aligh@imit.kth.se   44




                                                             44
The End



             THANK YOU VERY MUCH!




2004-02-02         A. Ghodsi aligh@imit.kth.se   45




                                                      45

Contenu connexe

Tendances (20)

C O R B A Unit 4
C O R B A    Unit 4C O R B A    Unit 4
C O R B A Unit 4
 
Corba introduction and simple example
Corba introduction and simple example Corba introduction and simple example
Corba introduction and simple example
 
CORBA Basic and Deployment of CORBA
CORBA Basic and Deployment of CORBACORBA Basic and Deployment of CORBA
CORBA Basic and Deployment of CORBA
 
CORBA - Introduction and Details
CORBA - Introduction and DetailsCORBA - Introduction and Details
CORBA - Introduction and Details
 
CORBA & RMI in java
CORBA & RMI in javaCORBA & RMI in java
CORBA & RMI in java
 
Corba concepts & corba architecture
Corba concepts & corba architectureCorba concepts & corba architecture
Corba concepts & corba architecture
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
 
Corba in power system
Corba in power systemCorba in power system
Corba in power system
 
RMI and CORBA Why both are valuable tools
RMI and CORBA Why both are valuable toolsRMI and CORBA Why both are valuable tools
RMI and CORBA Why both are valuable tools
 
Unit iv
Unit ivUnit iv
Unit iv
 
Rmi, corba and java beans
Rmi, corba and java beansRmi, corba and java beans
Rmi, corba and java beans
 
CORBA
CORBACORBA
CORBA
 
Corba
CorbaCorba
Corba
 
Corba
CorbaCorba
Corba
 
Corba
CorbaCorba
Corba
 
CORBA
CORBACORBA
CORBA
 
COM
COMCOM
COM
 
85305524 i-t-case-study
85305524 i-t-case-study85305524 i-t-case-study
85305524 i-t-case-study
 
Presentation On Com Dcom
Presentation On Com DcomPresentation On Com Dcom
Presentation On Com Dcom
 
19.cobra
19.cobra19.cobra
19.cobra
 

En vedette

Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented ArchitectureJason Austin
 
CORBA Component Model
CORBA Component Model CORBA Component Model
CORBA Component Model Elham Hormozi
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented ArchitectureSandeep Ganji
 
Component object model and
Component object model andComponent object model and
Component object model andSaransh Garg
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloJoe Stein
 
Java Servlets
Java ServletsJava Servlets
Java ServletsNitin Pai
 

En vedette (13)

Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
CORBA Component Model
CORBA Component Model CORBA Component Model
CORBA Component Model
 
Interoperability
InteroperabilityInteroperability
Interoperability
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
Deployment
DeploymentDeployment
Deployment
 
Servlets
ServletsServlets
Servlets
 
EJB 3.1 by Bert Ertman
EJB 3.1 by Bert ErtmanEJB 3.1 by Bert Ertman
EJB 3.1 by Bert Ertman
 
javabeans
javabeansjavabeans
javabeans
 
Component object model and
Component object model andComponent object model and
Component object model and
 
Javabeans
JavabeansJavabeans
Javabeans
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
 
Java beans
Java beansJava beans
Java beans
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 

Similaire à CORBA

Scoobi - Scala for Startups
Scoobi - Scala for StartupsScoobi - Scala for Startups
Scoobi - Scala for Startupsbmlever
 
Object oriented programming in 2014:Standard or Legacy?
Object oriented programming in 2014:Standard or Legacy?Object oriented programming in 2014:Standard or Legacy?
Object oriented programming in 2014:Standard or Legacy?mat f.
 
Writing a DSL for the Dense with Scala - JVMCon
Writing a DSL for the Dense with Scala - JVMConWriting a DSL for the Dense with Scala - JVMCon
Writing a DSL for the Dense with Scala - JVMConJan-Hendrik Kuperus
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Bill Buchan
 
Madeo - a CAD Tool for reconfigurable Hardware
Madeo - a CAD Tool for reconfigurable HardwareMadeo - a CAD Tool for reconfigurable Hardware
Madeo - a CAD Tool for reconfigurable HardwareESUG
 
Multiple Inheritance
Multiple InheritanceMultiple Inheritance
Multiple InheritanceMichal Píše
 
How to design Programs using VHDL
How to design Programs using VHDLHow to design Programs using VHDL
How to design Programs using VHDLEutectics
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Trayan Iliev
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actorspetabridge
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Hajime Tazaki
 
2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in KotlinGiovanni Ciatto
 
Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.Enrico Daga
 
Designing Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.ProtoDesigning Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.ProtoJoel Falcou
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsAleksandr Yampolskiy
 
Flux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JSFlux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JSIvo Andreev
 

Similaire à CORBA (20)

Scoobi - Scala for Startups
Scoobi - Scala for StartupsScoobi - Scala for Startups
Scoobi - Scala for Startups
 
Object oriented programming in 2014:Standard or Legacy?
Object oriented programming in 2014:Standard or Legacy?Object oriented programming in 2014:Standard or Legacy?
Object oriented programming in 2014:Standard or Legacy?
 
COM Introduction
COM IntroductionCOM Introduction
COM Introduction
 
Writing a DSL for the Dense with Scala - JVMCon
Writing a DSL for the Dense with Scala - JVMConWriting a DSL for the Dense with Scala - JVMCon
Writing a DSL for the Dense with Scala - JVMCon
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
 
Madeo - a CAD Tool for reconfigurable Hardware
Madeo - a CAD Tool for reconfigurable HardwareMadeo - a CAD Tool for reconfigurable Hardware
Madeo - a CAD Tool for reconfigurable Hardware
 
08lexi.pdf
08lexi.pdf08lexi.pdf
08lexi.pdf
 
Multiple Inheritance
Multiple InheritanceMultiple Inheritance
Multiple Inheritance
 
How to design Programs using VHDL
How to design Programs using VHDLHow to design Programs using VHDL
How to design Programs using VHDL
 
Preparing for Scala 3
Preparing for Scala 3Preparing for Scala 3
Preparing for Scala 3
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
 
2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin
 
Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.
 
C++0x
C++0xC++0x
C++0x
 
Designing Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.ProtoDesigning Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.Proto
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random Permutations
 
Flux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JSFlux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JS
 
C++ Programming
C++ ProgrammingC++ Programming
C++ Programming
 

Plus de Object-Frontier Software Pvt. Ltd (9)

Chap9
Chap9Chap9
Chap9
 
Wsh96 Wilkinson
Wsh96 WilkinsonWsh96 Wilkinson
Wsh96 Wilkinson
 
Dc 11 Brucepotter
Dc 11 BrucepotterDc 11 Brucepotter
Dc 11 Brucepotter
 
Ieee 802.11overview
Ieee 802.11overviewIeee 802.11overview
Ieee 802.11overview
 
Presentation
PresentationPresentation
Presentation
 
Gsm Network
Gsm NetworkGsm Network
Gsm Network
 
GPRS
GPRSGPRS
GPRS
 
Rmi
RmiRmi
Rmi
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 

Dernier

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Dernier (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

CORBA

  • 1. Common Object Request Broker Architecture Ali Ghodsi aligh@imit.kth.se 2004-02-02 A. Ghodsi aligh@imit.kth.se 1 1
  • 2. Goal of lecture Go a bit more into depth on the core architecture of CORBA Less breadth Read van Steen’s book 2004-02-02 A. Ghodsi aligh@imit.kth.se 2 2
  • 3. Reading suggestions Tanenbaum & van Steen CORBA Section 2.3 page page 85-98 Section 3.2.2 page 152-158 Section 9.1 Read chapter 9 and compare other systems with CORBA Compare RPC and DCE Remote Objects with CORBA Links Nice CORBA tutorial: http://www.omg.org/gettingstarted/ 2004-02-02 A. Ghodsi aligh@imit.kth.se 3 3
  • 4. Outlook General Overview General Information Applications Quick Architectural Overview OOP plus Distribution Transparency CORBA main overview Interface Definition Language (IDL) Types Examples Mappings ORB DII (and DSI) ORB interface Object Reference POA Persistent and Transient Objects Conclusions 2004-02-02 A. Ghodsi aligh@imit.kth.se 4 4
  • 5. General CORBA Information Distributed Object Model (more later) It is a middleware Difference between Network OS Middleware? Only a standard (v 2.7, 3.0) No reference implementation! Many independent implementations OMG - Non-profit organization 800 members! Standardized UML and more… 2004-02-02 A. Ghodsi aligh@imit.kth.se 5 5
  • 6. Real World Applications? Support ”dinosaurs” Companies have invested years of development in projects done in ADA, C, Smalltalk… CORBA enables interoperability with new languages Languages with small user-base Eg Erlang, again interoperability Big ERM, ERP, IS Many different architectures, languages, platforms… 2004-02-02 A. Ghodsi aligh@imit.kth.se 6 6
  • 7. Outlook General Overview Quick Architectural Overview OOP with Distribution Transparency CORBA overview Interface Definition Language (IDL) Types Examples Mappings ORB Conclusions 2004-02-02 A. Ghodsi aligh@imit.kth.se 7 7
  • 8. CORBA builds on the DOM Provides a nice model Encapsulation Inheritance Polymorphism 2004-02-02 A. Ghodsi aligh@imit.kth.se 8 8
  • 9. Exploiting Encapsulation Encapsulation enables: Distribution Transparency Have stubs and skeletons that together with ORBs enable distribution*. Inter-operability** Define interfaces in a standardised way Interface Definition Language (IDL) 2004-02-02 A. Ghodsi aligh@imit.kth.se 9 9
  • 10. Goal 1: Distribution Transparency Encapsulation: black-box principle Has an interface Implementation details public interface MathBox { hidden int add(int x, int y); } Transparently distribute public class MathBoxCL … implements MathBox { MathBox obj = new MathBoxCL(); MathBoxCL() {} System.out.println(obj.add(10,20)); int add(int x, int y) … { return x+y; } } 2004-02-02 A. Ghodsi aligh@imit.kth.se 10 10
  • 11. Distribution Transparency Missing parts: Client • Marshalling Server Implementation … int add(int x, int y) • Unmarshalling MathBox obj = new MathBoxCL(); { return x+y; } Integer result = obj.add(10,20); • References … MathBoxCL (SKELETON) • Binding client to server int invoke(msg msg) MathBoxCL (PROXY) { { int x, y; x=msg.Unmarshall(INT); x=msg.Unmarshal(INT); int add(int x, int y) y=msg.Unmarshall(INT); y=msg.Unmarshal(INT); { Msg msg=new Msg(); res=serverImpl.add(x,y); msg.Marshall(x); msg.Marshal(x); Msg msg=new Msg(); msg.Marshall(y); msg.Marshal(y); msg.marshall(res); msg.marshal(res); SendReqMsg(HOST,IP,msg); SendReqMsg(HOST,IP,msg); SendRespMsg(HOST,IP,msg); SendRespMsg(HOST, IP, msg); } } 2004-02-02 A. Ghodsi aligh@imit.kth.se 11 11
  • 12. Goal 2: Inter-operability Use a language with standardized syntax to define the interface Generate the stub and the skeleton Programming Language Independent C++ JAVA MathBoxCL (SKELETON) int invoke(Msg msg) { int x, y; MathBoxCL (STUB) msg=GetMsg(); int add(int x, int y) { Msg msg=new Msg(); x=msg.Unmarshal(INT); msg.Marshal(x); y=msg.Unmarshal(INT); msg.Marshal(y); res=serverImpl.add(x,y); SendReqMsg(HOST,IP,msg); Msg msg=new Msg(); } msg.marshal(res); SendRespMsg(HOST, IP, msg); } 2004-02-02 A. Ghodsi aligh@imit.kth.se 12 12
  • 13. Overview operation() Client args + return Object Implementation value Object SKELETON STUB Adapter Network ORB Core ORB Core ORB-dependent implementation Application specific Stub and Skeleton Same inteface. ORB-independent 2004-02-02 A. Ghodsi aligh@imit.kth.se 13 13
  • 14. Outlook General Overview Architecture Overview Interface Definition Language (IDL) Types Example Language Mappings ORB Conclusions 2004-02-02 A. Ghodsi aligh@imit.kth.se 14 14
  • 15. Interface Definition Language Builds on OOP principle of encapsulation Clear boundary between implementation and interface Independent Programming Language (Only OO?) OS Platform Network Connection etc Can be converted to a binary format and stored in a database (i.e. well-defined schema, iterators) Interface Repository (IR) A Repository ID for each interface 2004-02-02 A. Ghodsi aligh@imit.kth.se 15 15
  • 16. IDL’s Type System Two levels: Interfaces for CORBA objects! One interface per CORBA object Official types for variables integers, floats struct, enum array string binary values …and more! Scoped types modules exceptions Interfaces structs 2004-02-02 A. Ghodsi aligh@imit.kth.se 16 16
  • 17. Examples DSLABS.IDL: typedef string GroupMembers[4]; interface DS_project { long register_project(in long groupId, in string status, inout string date); long get_status(in long groupId, out string state, out string date, out GroupMembers gm); }; 2004-02-02 A. Ghodsi aligh@imit.kth.se 17 17
  • 18. IDL language mappings OMG defines mappings to different languages C, C++, Java, Smalltalk, COBOL, Ada, Lisp, PL/1, Python, and IDLscript Proprietary mappings exist for obscure languages, though not standardized! Every ORB has an IDL compiler Creates A STUB and A SKELETON 2004-02-02 A. Ghodsi aligh@imit.kth.se 18 18
  • 19. Outlook General Overview Architecture Overview Interface Definition Language (IDL) ORB DII (and DSI) ORB interface Object References POA Persistent and Transient Objects Conclusions 2004-02-02 A. Ghodsi aligh@imit.kth.se 19 19
  • 20. Compile time vs Runtime? What if interfaces change? Recompile everything? Unfeasable Dynamic interface definitions required: IS (Information Systems) ERM (Enterprise Resource Management systems) Batch Service etcetera 2004-02-02 A. Ghodsi aligh@imit.kth.se 20 20
  • 21. Dynamic Invocation Interface (DII) Generic run-time invocation No compile-time knowledge of CORBA object interfaces No stub and skeleton needed a-priori Instead, a generic interface is used Of course defined in IDL 2004-02-02 A. Ghodsi aligh@imit.kth.se 21 21
  • 22. Dynamic Invocation Interface (DII) cont. In essence: Search and fetch an IDL from an Interface Repository. (remember binary presentation of IDL) Construct a request Specify target object, operation, and parameters Invoke the request C++ (not entirely true) invoke(remoteObj, ”getStatus”, paramters) Java uses reflection/introspection (transparent): remoteObj.getStatus(paramters); 2004-02-02 A. Ghodsi aligh@imit.kth.se 22 22
  • 23. Complete picture operation() Client args + return Object Implementation value Dynamic Static Object Dynamic Static Skeleton Skeleton Adapter Invocation Stub Interface Network ORB Core ORB Core ORB-dependent implementation Application specific Stub and Skeleton Same inteface. ORB-independent 2004-02-02 A. Ghodsi aligh@imit.kth.se 23 23
  • 24. Object References Remote object references Enable clients to invoke CORBA objects Three incarnations Language specific implementation E.g. pointer to a stub in C++ implementing the IDL Not valid outside local computation space Language independent ORB representation IOR, Inter-operable Object Referenece Supported by all ORBs Textual representation Send by e-mail, store in DB, textfiles and so on. 2004-02-02 A. Ghodsi aligh@imit.kth.se 24 24
  • 25. Inter-operable Object References (IOR) Type Name Protocol ”Reference toObject ReferenceObject Key Name) Remote an object on a server (Repository ID) Hostname & Port (Adapter & Object *GIOP, address, port ex: ”IIOP v1.0”,”ripper.it.kth.se”, 8765 *Which object adapter, which object? ex: ”OA5”, ”_DSD” Repository ID ex: ”IDL:KTH/imit/DSD:1.0” 2004-02-02 A. Ghodsi aligh@imit.kth.se 25 25
  • 26. ORB Interface operation() Client args + return Object Implementation value Dynamic ORB Static Object Dynamic Static Skeleton Interface Skeleton Adapter Invocation Stub Interface Network ORB Core ORB Core ORB-dependent implementation Application specific Stub and Skeleton Same inteface. ORB-independent 2004-02-02 A. Ghodsi aligh@imit.kth.se 26 26
  • 27. ORB Interface Standard interface (defined in IDL) All ORBs implement this interface Important services provided: Bootstrapping, getting initial references Converting Object References to Strings and vice versa Object Reference Counting Distributed garbage collection 2004-02-02 A. Ghodsi aligh@imit.kth.se 27 27
  • 28. How do I get an IOR? All ORBs implement: string_to_object() file, e-mail, phone :) resolve_initial_references() Returns an IOR for naming service, interface repository Continue to search for IOR’s in a naming service 2004-02-02 A. Ghodsi aligh@imit.kth.se 28 28
  • 29. Portable Object Adapter (POA) operation() Client args + return Object Implementation value Dynamic Dynamic ORB Skeleton Static Object Static Skeleton Interface Interface Adapter Invocation Stub Network ORB Core ORB Core ORB-dependent implementation Application specific Stub and Skeleton Same inteface. ORB-independent 2004-02-02 A. Ghodsi aligh@imit.kth.se 29 29
  • 30. Why Object Adapters? Client 1 Server dsObject.calculate(); DsObject::calculate() { Client 2 ... dsObject.calculate(); } Several clients call the same object, what to do? Demultiplex requests 2004-02-02 A. Ghodsi aligh@imit.kth.se 30 30
  • 31. Why Object Adapters? (2) Client 1 Server dsObject.calculate(); DsObject::calculate() { Client 2 ... dsObject.calculate(); } Queue requests or run in separate threads? Serialize all requests One thread per object One thread per invocation Pool of threads 2004-02-02 A. Ghodsi aligh@imit.kth.se 31 31
  • 32. Why Object Adapters? (2) Client 1 Server dsObject.calculate(); DsObject::calculate() { Client 2 ... dsObject.calculate(); } Security between the objects? Sandboxing? Share methods, separate data? 2004-02-02 A. Ghodsi aligh@imit.kth.se 32 32
  • 33. Why Object Adapters? (2) Client 1 Server dsObject.calculate(); DsObject::calculate() { Client 2 ... dsObject.calculate(); } Lifespan policy: Transient objects Persistent Objects Continues to exist even if activated/deactivated? 2004-02-02 A. Ghodsi aligh@imit.kth.se 33 33
  • 34. Portable Object Adapter – PL meets ORB! POA is generic and CORBA object independent and implements different activation policies POA keeps pointers to skeletons* An Object Identifier is associated with object. A table called Active Object Map maps between Object Identifers => Skeletons 2004-02-02 A. Ghodsi aligh@imit.kth.se 34 34
  • 35. Portable Object Adapter OBJ 1 OBJ 2 OBJ 3 skel1 skel2 skel3 POA1 (policy1) POA2(policy2) Active Object Map Active Object Map Invoke right OBJ2 -> skel2 Invoke the right OBJ3 -> skel3 OBJ1 -> skel1 skeleton skeleton Server Demultiplexer Dispatch requests POA1 to the right POA POA2 2004-02-02 A. Ghodsi aligh@imit.kth.se 35 35
  • 36. Transient Object Illustration Client _dsd->student_operation() Object Implementation STUB: Object Reference Reply message IDL:Institution/IT/DSD:1.0 ”IIOP v1.0”,”ripper”, 8765 ”OA5”, ”_DSD” Unique ID : ”13FABCDA” return variables, out parameters Active Object Maps Stub OA4: _InfoSec Object Request message Skeleton OA5: Adapter Unique ID : ”13FABCDA” ”OA5”, ”_DSD” _DSC student_operation() + *par _DSD ORB Core ORB Core 2004-02-02 A. Ghodsi aligh@imit.kth.se 36 36
  • 37. Persistent Objects A IOR to a Persistent Object always points to the same object Migration Transparency Location Transparency Ceases to exist only if the CORBA object is logically destroyed Might move Might change IP, Port, Machine Might change POA etc 2004-02-02 A. Ghodsi aligh@imit.kth.se 37 37
  • 38. Persistent Objects continued Its life cycle is independent of the objects I.e. its existence is independent of whether the object is in the local address-space. ORBs can automatically startup objects implementing persistent CORBA objects 2004-02-02 A. Ghodsi aligh@imit.kth.se 38 38
  • 39. How is this possible? Implementation repository (IMR) is used Keeps information about Object Adapter Startup Command Current Server 2004-02-02 A. Ghodsi aligh@imit.kth.se 39 39
  • 40. Persistent Objects Illustrated Client Implem. Repository Object Implementation _dsd->student_operation() IMR Table Adapter Startup Address ORB Core xOA_1 rsh x ”/bin/st” bored:131 yOA_2 /startup ir:1444 Reply message OA5 rsh ripper /run ripper:313 Location Forward Unique ID : ”13FABCDA” return variables, out parameters ORB Core Active Object Maps Stub OA4: _InfoSec Request message OA5: Unique ID : ”13FABCDA” ”OA5”, ”_DSD” _DSC Skeleton student_operation() + par _DSD STUB: Object Reference IDL:KTH/imit/DSD:1.0 ”IIOP v1.0”,”IMR”, 8765 ”IIOP v1.0”,”ripper”, 313 ”OA5”, ”_DSD” ORB Core 2004-02-02 A. Ghodsi aligh@imit.kth.se 40 40
  • 41. Failure and replication (IOR cont) Multiple locations in one reference. If an invocation fails, go to next location Type Name Protocol1 Object1 Key (Repository ID) Hostname1 & Port1 (Adapter1 & Object1 Name) Protocol2 Object2 Key Remote Object Port2 on a server to an object (Adapter2 ”Reference Hostname2 & Reference & Object2 Name) *GIOP, address, port ex: ”IIOP v1.0”,”ripper.it.kth.se”, 8765 Repository ID ex: ”IDL:KTH/imit/DSD:1.0” HOST1/PORT2/ADAPTER2/OBJECT2 ex: ripper1/1234/oa1/obj1 HOST2/PORT2/ADAPTER2/OBJECT2 ex: ripper2/3233/oa3/obj6 … 2004-02-02 A. Ghodsi aligh@imit.kth.se 41 41
  • 42. Summary-1 CORBA is a standardization effort Based on the the Distributed Object Model Provides inter-operability Uses proprietary interface language: IDL All CORBA objects have an interface in IDL Most of the services offered by CORBA have an interface in IDL 2004-02-02 A. Ghodsi aligh@imit.kth.se 42 42
  • 43. Summary-2 Provides both Dynamic and Static invocations DII/DSI and STUBS/SKELETONS Stubs/Skeletons talk to an ORB The ORB uses a standardized protocol to exchange Messages(Req/Resp), IORs (persistent/transient) ORB uses a POA to implement different activation policies Threading policy Lifespan policy (Persistent vs. Transient Objects) Security (sandboxing of object implementations) 2004-02-02 A. Ghodsi aligh@imit.kth.se 43 43
  • 44. What did I miss? A whole lot! ☺ CORBA facilities/services Synchronization Caching Replication Fault-tolerance Security Comparison of CORBA against .NET DCOM Java RMI etcetera Please read chapter 9! 2004-02-02 A. Ghodsi aligh@imit.kth.se 44 44
  • 45. The End THANK YOU VERY MUCH! 2004-02-02 A. Ghodsi aligh@imit.kth.se 45 45