[A] CORBA mit C++ - Eine Einfuehrung



  • CORBA mit C++ - Eine Einführung

    Vorwort

    Dies ist der erste Artikel zu CORBA.

    Folgende weitere Artikel zu CORBA sind geplant:
    Asynchronous Messaging Interface, CORBA Services, Realtime CORBA
    und CORBA Security.

    Technische Fachausdrücke, die im Artikeln englische geschrieben werden,
    werden im Glosar übersetzt und erklärt.

    Übersicht

    In diesem Artikel möchte ich Ihnen eine Übersicht zu CORBA geben.
    Architektur, kurz 3 freie CORBA C++ Implementationen vorstellen,
    die Installation von TAO, IDL und Speicherverwaltung.
    Eine kurze Testanwendung soll diesen Artikel abschliessen.

    History

    CORBA 1.0 1991 Oktober
    Erste CORBA Spezifikation wird veröffentlicht mit:
    - Interface Definition Language IDL
    - "dynamic request management and invocation" DII
    - Interface Repository
    - IDL zu C Mapping (erstes Mapping)

    CORBA 2.0 1996 August
    - erweitertes CORBA Objekt Modell
    - dynamisches Skeleton Interface
    - interoperable Architektur mit GIOP, IIOP und DCE CIOP
    - IDL zu C++ Mapping
    - IDL zu Smalltalk Mapping

    CORBA 2.1 1997 August
    - Security Funktionen ("secure IIOP" und IIOP über SSL)
    - IDL zu Ada Mapping
    - IDL zu COBOL Mapping

    CORBA 2.2 1998 Februar
    Der POA löst den unvollstständigen und nicht portablen BOA (Basic Objekt Adapter) ab.
    POA ermöglicht persistente Objekte, mehrere POA-Instanzen, Konfiguration des POA über Policies.
    - POA Portable Object Adapter

    CORBA 2.3 1999 Juni
    Für Java gibt es ein Mapping in beide Richtungen.
    - IDL zu Java Mapping
    - Java zu IDL Mapping

    CORBA 2.4 2000 October
    Diese Version bringt mit CORBA Messaging die asynchrone Verarbeitung.
    - AMI Asynchronous Messaging Interface,
    - QoS Quality of Service
    - TII Time Independent Invocations

    CORBA 2.5 2001 September
    - Fehler Toleranz
    - Portable Interceptors

    CORBA 2.6 2001 December
    - Security Spezifikationen

    CORBA 3.0 2002 Juli
    - CORBA Component Modell

    C++ ORB

    MICO
    http://mico.org/index.html
    omniORB
    http://omniorb.sourceforge.net/features.html
    TAO
    http://www.cs.wustl.edu/~schmidt/TAO-status.html

    Installation

    TODO: Unterschied DCO zur OCI Version erklären.

    OCI http://download.ociweb.com/TAO-1.6a/ACE+TAO-1.6a.tar.gz

    Unix

    LIBCPP=/usr/local/LIBCPP
    ACE_ROOT=$LIBCPP/ACE_TAO-1.6a
    TAO_ROOT=$ACE_ROOT/TAO
    PATH=$ACE_ROOT/bin:$PATH
    LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
    export ACE_ROOT TAO_ROOT PATH LD_LIBRARY_PATH
    
    tar xzpf ACE+TAO-1.6a.tar.gz
    mv ACE_wrappers $ACE_ROOT
    
    cat <<EOF  >$ACE_ROOT/ace/config.h
    #define __ACE_INLINE__ 1
    #define ACE_HAS_EXCEPTIONS 1
    #define ACE_HAS_STANDARD_CPP_LIBRARY 1
    #define TAO_HAS_AMI 1
    #define TAO_HAS_CORBA_MESSAGING 1
    #define TAO_HAS_INTERCEPTORS 1
    #define TAO_HAS_INTERFACE_REPOSITORY 1
    #define TAO_HAS_RT_CORBA 1
    #define TAO_HAS_SMART_PROXIES 1
    #undef ACE_COMPILE_TIMEPROBES
    #undef TAO_PLATFORM_SVC_CONF_FILE_NOTSUP
    #include "ace/config-linux.h"
    EOF
    
    cat <<EOF >$ACE_ROOT/include/makeinclude/platform_macros.GNU
    ami=1
    boost=1
    corba_messaging=1
    debug=1
    exceptions=1
    inline=1
    no_hidden_visibility=1
    optimize=1
    profile=0
    rt_corba=1
    shared_libs_only=1
    ssl=1
    EOF
    
    cat <<EOF >$ACE_ROOT/bin/MakeProjectCreator/config/default.features
    openssl = 1
    qos     = 1
    ssl     = 1
    zlib    = 1
    EOF
    
    cd $TAO_ROOT
    $ACE_ROOT/bin/mwc.pl -type gnuace TAO_ACE.mwc
    make QoS Naming_Service Naming_Service BiDir_GIOP SSLIOP Utils Strategies catior nsadd nsdel nslist
    
    cd $ACE_ROOT/lib
    for so in lib*.so
    do
      ln -s $so `echo $so|sed 's/\.so$/d.so/'`
    done
    

    Windows

    Audio/Video Streaming Service
    Concurrency Service
    Event Service
    Lifecycle Service
    Logging Service
    Naming Service
    Notification Service
    Persistent State Service
    Property Service
    Relationship Service
    Security Service
    Time Service
    Trading Service
    Load Balancing Service
    Real-time Event Service
    Scheduling Service

    1IDL

    Schlüsselworte (keywords)

    Richtungsfluss:
    in
    out
    inout
    oneway

    long some_name_A(in int a, out int b, inout float c);
    oneway void some_name_B(in int a, in int b, in float c);

    Typmodifzierer:
    const
    readonly

    Typen und Konstantewerte:
    boolean
    FALSE
    TRUE
    double
    fixed
    float
    long
    octet
    short
    unsigned
    void
    char
    wchar
    string
    wstring
    any

    Ausnahmen (Exception):
    getraises
    setraises
    raises

    Strukturelemente und restliche:
    abstract
    attribute
    case
    context
    custom
    default
    exception
    enum
    factory
    interface
    local
    module
    native
    Object
    private
    public
    sequence
    struct
    supports
    switch
    truncatable
    typedef
    union
    ValueBase
    valuetype

    CCM
    component
    consumes
    emits
    eventtype
    finder
    home
    import
    multiple
    primarykey
    provides
    publishes
    typeid
    typeprefix
    uses

    2 IDL C++ Mapping

    3 C++ Speicherverwaltung

    4 POA

    5 Policies

    6 Servant

    7 Beispielanwendung

    ein paar Ideen:

    Shop System mit Artikeln
    ++ kann gut erweitert werden: z.B.: Messaging, Security
    + liese sich auch über JacORB, Java und Tomcat in JSP einbinden (noch nie gemacht aber sicher witzig)
    -- schon sehr umfangreich

    System mit verteilten Kassen zentral verwaltet
    + Kassen Input/Output kann gut sumliert werden
    + Nicht sehr komplex
    - Interessiert kein Schwein

    Abstraktes Beispiel nur mit Bezug zu Programmierproblem
    ++ Ich muss nicht denken
    -- Wenig anschaulich, ein abstraktes Thema wie CORBA kommt ohne Beispiel daher

    ---------------------------------------------------
    CORBA mit C++ - Multithreading und CORBA Messaging

    Naming Service und Alternativen, Multithreading Modelle wie Thread per Request oder Thread Pool (Teil von RTCORBA) und CORBA Messaging (asynchrone Verarbeitung).

    CORBA mit C++ - Security (nur bei Interesse)

    Verweise:
    http://www.omg.org
    http://www.cs.wustl.edu/~schmidt
    http://www.ciaranmchale.com/download

    CORBA mit C++ - Eine Einführung

    Ãœbersicht

    History

    CORBA 1.0 1991 Oktober
    Erste CORBA Spezifikation wird veröffentlicht mit:
    - Interface Definition Language IDL
    - "dynamic request management and invocation" DII
    - Interface Repository
    - IDL zu C Mapping (erstes Mapping)

    CORBA 2.0 1996 August
    - erweitertes CORBA Objekt Modell
    - dynamisches Skeleton Interface
    - interoperable Architektur mit GIOP, IIOP und DCE CIOP
    - IDL zu C++ Mapping
    - IDL zu Smalltalk Mapping

    CORBA 2.1 1997 August
    - Security Funktionen ("secure IIOP" und IIOP über SSL)
    - IDL zu Ada Mapping
    - IDL zu COBOL Mapping

    CORBA 2.2 1998 Februar
    Der POA löst den unvollstständigen und nicht portablen BOA (Basic Objekt Adapter) ab.
    POA ermöglicht persistente Objekte, mehrere POA-Instanzen, Konfiguration des POA über Policies.
    - POA Portable Object Adapter

    CORBA 2.3 1999 Juni
    Für Java gibt es ein Mapping in beide Richtungen.
    - IDL zu Java Mapping
    - Java zu IDL Mapping

    CORBA 2.4 2000 October
    Diese Version bringt mit CORBA Messaging die asynchrone Verarbeitung.
    - AMI Asynchronous Messaging Interface,
    - QoS Quality of Service
    - TII Time Independent Invocations

    CORBA 2.5 2001 September
    - Fehler Toleranz
    - Portable Interceptors

    CORBA 2.6 2001 December
    - Security Spezifikationen

    CORBA 3.0 2002 Juli
    - CORBA Component Modell

    1 IDL

    2 IDL C++ Mapping

    3 C++ Speicherverwaltung

    4 POA

    5 Policies

    6 Servant

    7 Beispielanwendung

    ein paar Ideen:

    Shop System mit Artikeln
    ++ kann gut erweitert werden: z.B.: Messaging, Security
    + liese sich auch ueber JacORB, Java und Tomcat in JSP einbinden (noch nie gemacht aber sicher witzig)
    -- schon sehr umfangreich

    System mit verteilten Kassen zentral verwaltet
    + Kassen Input/Output kann gut sumliert werden
    + Nicht sehr komplex
    - Interessiert kein Schwein

    Abstraktes Beispiel nur mit Bezug zu Programmierproblem
    ++ Ich muss nicht denken
    -- Wenig anschaulich, ein abstraktes Thema wie CORBA kommt ohne Beispiel daher

    ---------------------------------------------------
    CORBA mit C++ - Multithreading und CORBA Messaging

    Naming Service und Alternativen, Multithreading Modelle wie Thread per Request oder Thread Pool (Teil von RTCORBA) und CORBA Messaging (asynchrone Verarbeitung).

    CORBA mit C++ - Security (nur bei Interesse)

    Verweise:
    http://www.omg.org
    http://www.cs.wustl.edu/~schmidt
    http://www.ciaranmchale.com/download
    http://www.ciaranmchale.com/corba-explained-simply
    http://www.puder.org/corba
    ---------------------------------------------------

    IIOP Internet Inter-ORB Protocol
    SOAP Simple Object Access Protocol
    COM Common Object Model
    DII Dynamic Invocation Interface
    DSI Dynamic Skeleton Interface
    IFR Interface Repository
    BOA Basic Object Adapter
    POA Portable Object Adapter
    VTS Value Type Semantics
    Min MinimumCORBA
    AMI Asynchronous Messaging Interface
    AMH Asynchronous Messaging Handling
    CCM CORBA Component Model
    QoS Quality of Service
    FT Fault tolerance
    RT Real time
    PSS Persistent State Service
    CONC Concurrency Service
    PROP Property Service
    EVNT Event Service
    RLSH Relationship Service
    NAM Naming Service
    SEC Security Service
    TIME Time Service
    TRAD Trading Service
    NOTF Notification Service
    TRANS Transaction Service


Anmelden zum Antworten