UML Profile for CORBA Components Initial Submission by yfv54841

VIEWS: 9 PAGES: 29

									                Technical Meeting , January 27-31, 2002, Burlingame, CA




          UML Profile for
 CORBA Components Initial Submission
Submitted by:                   Supported by:

Alcatel                         IKV++ Technologies AG
Thales                          Laboratoire d’Informatique Fondamentale de LILLE
Fraunhofer Institute FOKUS      Technical University Berlin


                                Marc Born
                             Fraunhofer Fokus
                             born@fokus.fhg.de
                      Agenda

• Why a UML Profile for CORBA Components?
•   Relationship to Existing OMG Specification
•   Fulfillment of RFP Requirements
•   CORBA Component Model (CCM) – Concepts
•   The UML Profile for CCM
    – The CCM Metamodel
    – Stereotypes
    – Tagged Values
• Profile Illustration: The Dining Philosopher Example
• Benefits of the CCM Profile
• Future Work
Why a UML Profile for CORBA Components?

  • MDA as the general architecture
     – Software development is done model based
     – Platform independent models are mapped to platform
       specific models
  • UML serves as general purpose modeling language
     – PIMs and PSMs can be specified using UML
     – Profiles are available for PIM (EDOC) and PSM (CORBA,
       EJB)
  • CCM is the component infrastructure based on
    CORBA
  • CCM models can currently not be specified with UML
    though CCM models are PSMs in the sense of MDA
Relationship to Existing OMG Specification

 • Meta Object Facility (MOF) v.1.4
    – Foundation for OMG Metadata and Modeling architecture
    – The CCM metamodel is defined using MOF 1.4
 • Unified Modeling Language (UML) v.1.4
    – The UML is a graphical language for specifying, visualizing,
      constructing and documenting the artifacts of software systems
    – The CCM profile is defined as a UML 1.4 profile
 • UML Profile for CORBA v.1.1
    – The CCM profile is an extension of the CORBA profile
 • CORBA Component Model (CCM) v.3.0
   Fulfillment of RFP Requirements


• Submissions shall specify a UML profile suitable for
  expressing all semantics expressible using the
  concepts of the CCM metamodel.

• The UML profile follows in its definition the
  metamodel of CCM!
   Fulfillment of RFP Requirements


• The profile shall conform to the most current version
  of OMG Meta Object Facility which is available at the
  time the proposals are evaluated. In particular, Well-
  Formedness Rules that are part of the profile shall be
  defined as instances of MOF Constraint.

• The well-formedness rules are formulated as OCL
  constraints and in English!
• In the reveised submission all well-formedness rules
  will be in OCL!
   Fulfillment of RFP Requirements


• This RFP shall be based on the metamodel for
  CORBA Components which is defined as a MOF
  metamodel. It is expected, that submissions define,
  how the models using this profile are mapped to the
  CORBA Components metamodel.

• The submission specification follows the metamodel!
• The relations between the stereotypes/tagged values
  and the metamodel elements are defined in the
  submission!
   Fulfillment of RFP Requirements


• Submissions shall provide sample analyses and
  designs expressed in terms of the profile.

• The submission currently contains an academic
  example!
• More examples will be part of final submission.
   Fulfillment of RFP Requirements


• Transformation rules should be defined to declare
  how EDOC specifications can be transformed to
  CCM specifications. (Optional)

• No work has been done in this direction so far.
CORBA Components: Main Concepts

• CORBA Components or CORBA Component Model (CCM)
  is the component infrastructure based on CORBA 2.x

                      component facet    receptacles




       facets


                                          event sink




         attributes


                                        event source
           CORBA Components Package

• CCM extends CORBA IDL modeling concepts:
  – Component IDL (extended concepts for component modeling)
  – Component Implementation Framework (CIF) (concepts for
    modeling a component implementation)




                             <<metamodel>>
                                   CCM

    <<metamodel>>       <<metamodel>>         <<metamodel>>
     BaseIDL             ComponentIDL              CIF
CCM Metamodel-ComponentIDL: ComponentDef
                                                                              InterfacDef
                                                                              (from BaseIDL)
                                                                           isAbstract : Boolean
                                                         +uses             isLocal : Boolean        +provides

                                                                 1                                  1
                                    Uses_Interface                                                                 Provides_Interface


                  +usesDef                                                                                                       +providesDef
                                                                       1                       1
                        0..n                                                                                                             0..n
    UsesDef                                             +component ComponentDef                +component
                      +receptacle                                                                                                   +facet ProvidesDef
 multiple : Boolean
                      0..n   /Component_Receptacle      +component                             +component       /Component_Facet      0..n
                                                                                        1
                                                                       1                       1
                                                                             +component
                                         <<implicit>>
                                                                                                        /Component_Consumes
                                         /Component_Emits             /Component_Publishes
                                                                                                                               +consumes
                             0..n                                                 0..n
                                                                     +publishes                                             0..n   ConsumesDef
                  EmitsDef      +emits                                    PublishesDef



                                                                             EventPortDef
                                                                                                                  Component Emits
                                                                               0..n +event                        Interface Publishes
                                                                                       Event_Type                 Event     Consumes
                                                                                1
                                                                                    +type                                   Uses
                                                                               EventDef
                                                                                                                            Provides
        UML Profile for CORBA Components:
                   Stereotypes (1)
 Metamodel element       Stereotype name       UML              Parent
                                            Base Class

    ComponentDef         CCMComponent          Class        CORBAInterface


    Generalization        CCMSupports      Generalization        N/A
 between InterfaceDef
 and ComponentDef

ProvidesDef or UsesDef      CCMPort         Association          N/A


     ProvidesDef          CCMProvides       Association        CCMPort


       UsesDef              CCMUses         Association        CCMPort
     UML Profile for CORBA Components:
                Stereotypes (2)
Metamodel element   Stereotype name      UML           Parent
                                      Base Class


    EventDef          CCMEvent          Class       CORBAValue


   EventPortDef      CCMEventPort     Association       N/A


    EmitsDef           CCMEmits       Association   CCMEventPort


   PublishesDef      CCMPublishes     Association   CCMEventPort


  ConsumesDef       CCMConsumes       Association   CCMEventPort
CCM Metamodel-ComponentIDL: HomeDef
                                       OperationDef
                                          (from BaseIDL)                                         ComponentHome
                                                                                                 Finder
                                                                                                 Factory
                                                                                                 Manages
                                       ComponentDef


                                             1
                                                 +comp

   FactoryDef                                                                        FinderDef


            0..n                                                             +finder
                                      Component_Home                                0..n
        +factory
                                                                      <<implicit>>
                <<implicit>>

                                                                  /Home_Finder
                   /Hom e _ Factory

                               +home                 +home
                                            +cp_home
                                              0..n    1
                                      1                                                +primary_key
                                                                       Key_Home                           Va l u e D e f
                                            HomeDef +cp_home
                                                                                                         (from BaseIDL)
                                                           0..n                                   0..1
          UML Profile for CORBA Components:
                     Stereotypes (3)
    Metamodel element           Stereotype          UML               Parent
                                   name          Base Class

         HomeDef                 CCMHome            Class         CORBAInterface


        primary_key            CCMPrimaryKey   AssociationClass    CORBAValue


        FactoryDef              CCMFactory        Operation            N/A


         FinderDef              CCMFinder         Operation            N/A


   HomeDef/ComponentDef        CCMManages        Association           N/A
            and
HomeImplDef/ComponentImplDef
       relationships
               CCM Metamodel-CIF: ComponentImplDef
                                                         ComponentFeature
                                                          (from ComponentIDL)
                                                                                                                      ComponentImpl
                                                                                                                      HomeImpl
                                                                                  1..n                                Manages
                                                                                          +features
                                                                                                                      Implements
                             Component_Home
  HomeDef
                      +cp_home             +comp
                                                          ComponentDef                                                Segment
rom ComponentIDL)                                         (from ComponentIDL)
                    0..n                             1                                   implemented_by               Artifact
          1                                                    1          +comp
+home

 implements
                                                                     implements
                                                                                                                      1

+segs                                                       +segs     0..n                                        +segment
        0..n
                 +component_impl                         ComponentImplDef                                                       SegmentDef
HomeImplDef +home_impl                                                                      +comp            +segments
                                          category : CCMMetamodel::CIF::ComponentCategory                                    isSerialized : Boolean
            0..n              1                                                                       <<implicit>> 1..n
                    manages                                                                   1
                                                                                                      /segments
                                                                                                                                   1
                                                                                                                                        +segment

                                                          <<enumeration>>                                                     segments_artifact
                                                         ComponentCategory
                                                          PROCESS
                                                          SESSION                                                               +artifact
                                                          ENTITY
                                                                                                                                        1
                                                          SERVICE
                                                                                                                                 ArtifactDef
        UML Profile for CORBA Components:
                   Stereotypes (4)
    Metamodel element            Stereotype name      UML        Parent
                                                   Base Class

     ComponentImplDef           CCMComponentImpl   Class          N/A


ComponentImplDef/ComponentDef    CCMImplements     Association    N/A
            and
    HomeDef/HomeImplDef
        relationships

        HomeImplDef               CCMHomeImpl      Class          N/A


        SegmentDef                CCMSegment       Class          N/A

         ArtifactDef               CCMArtifact     Class          N/A
         UML Profile for CORBA Components:
                  Tagged Values (1)
     Applies to:          Tagged Value               Tagged Value Definition


                       ContainerType           “Transient”, “Persistent”

                       ContainerImplType
                                               “Stateless“, “Conversational“, “Durable“
Class:
<<CCMComponentImpl>>   ServantLifetimePolicy   “Method”, “Transaction”, “Component”,
                                               “Container“

                                               “NOT_SUPPORTED”, “REQUIRED”,
                       TransactionPolicy
                                               “SUPPORTS”, “REQUIRES_NEW”,
                                               “MANDATORY”, “NEVER”

                       SecurityPolicy          User specific

                       EventPolicy             “Normal”, “Default”, “Transaction”
                       PersistenceMechanis
                       m                       “CORBA”, “User”
       UML Profile for CORBA Components:
                Tagged Values (2)
     Applies to:         Tagged Value        Tagged Value Definition


                                        “entity”
                                              •identity.
                                              •persistent state


                                        “process”
                                             •persistent identity
Class                                        •behavior
                       Category
<<CCMComponentImpl>>                         •persistent state
                                        “service”
                                             •no state
                                             •no identity
                                             •behavior.
                                        “session”
                                             •transient state
                                             •identity which is not persistent
                                             •behavior.
      UML Profile for CORBA Components:
               Tagged Values (3)


     Applies to:        Tagged Value       Tagged Value Definition

                                       Identifiers of all emitted, published or
                                       consumed events implemented by
                                       the segment



Class <<CCMSegment>>   Features        Identifiers of all provided interfaces
                                       or used interfaces implmented by
                                       the segment


                                       The identifier of the component
                                       itself, if the component interface is
                                       implemented by the segment
               Profile Illustration:
        The dinning philosopher example
• The example scenario includes three different types of
  components:
   -   Philosopher
   -   Fork
   -   Observer
   -   Registrator
• Philosopher’s possible states:
   -   Thinking
   -   Eating
   -   Hungry
   -   Starving
   -   Dead
             Components and their ports (1)

• The IDL 3 definition of the example components:

        Module Dinner {
            component Philosopher {
                     readonly attribute integer metabolicRate;
                     uses Fork leftFork;
                     uses Fork rightFork;
                     uses Registration registration;
                     publishes StatusInfo statusInfo;
            }
            component Fork {
                     provides Fork fork;
            }
            component Registrator supports Registration {
            };
            component Observer {
                     consumes StatusInfo info;
            }
                         Components and their ports (2)

• The Profile definition
              <<CORBAInterface>>
                                                          <<CCMSupports>>
                 Registration                                                        <<CCMComponent>>
                                                                                          Registrator
          +register():PhilosopherName
         +registration 1                 <<CCMUses>>
          <<CCMUses>>
                    1           1                      +leftFork
                                                                  1
                                                         <<CORBAInterface>>
               <<CCMComponent>>                                 Fork
                  Philosopher
                                                       +rightFork 1  1
    +metabolicRate : integer                                         +fork
                                 1                                                   <<CCMComponent>>
                        1                                                                Observer
                                        <<CCMUses>>
       <<CCMPublishes>>                                                                        1
                                                               <<CCMProvides>>
                        1 +statusInfo
                                                                  1
                 <<CCMEvent>>                             <<CCMComponent>>
          StatusInfo
                                                             Fork
     +name : string
     +state : PhilosopherState        +statusInfo
     +secondesSinceLastMeal : integer
     +hasLeftFork : boolean            1                           <<CCMConsumes>>
     +hasRightFork : boolean
     <<CORBAValueFactory>>
     +init()
                  Components and their homs
• The IDL 3 definition
     Module Dinner {home RegistratorHome manages Registrator {};
                     home PhilosopherHome manages Philosopher {};
                     home ForkHome manages Fork {};
                     home ObserverHome manages Observer {}; }

• The Profile definition
          <<CCMHome>>                  <<CCMManages>>       <<CCMComponent>>
         RegistratorHome           1                   *        Registrator


         <<CCMHome>>                   <<CCMManages>>      <<CCMComponent>>
         PhilosopherHome           1               *          Philosopher


        <<CCMHome>>        <<CCMManages>>                  <<CCMComponent>>
         ForkHome              1                               Fork
                                               *


        <<CCMHome>>                <<CCMManages>>            <<CCMComponent>>
        ObserverHome                                             Observer
                           1                           *
         Components and their Implementations
• Composition - unit of component implementation
• The IDL definition
   module Dinner {
           composition session PhilosopherImpl {
                   home executor PhilosopherHomeImpl {
                          implements PhilosopherHome;
                          manages PhilosopherSessionImpl;
                   }; };

          composition entity ForkImpl {
                 home executor ForkHomeImpl {
                         implements ForkHome;
                         manages ForkEntityImpl {
                                segment Seg { provides the_fork; }
                         }; }; };

          composition session ObserverImpl {
                 home executor ObserverHomeImpl {
                         implements ObserverHome;
                         manages ObserverSessionImpl;
                 }; };

           composition session RegistratorImpl {
                  home executor RegistratorHomeImpl {
                          implements RegistratorHome;
                          manages RegistratorSessionImpl;
                  }; }; };
             Fork Component Implementation

• Composition - unit of component implementation

                          <<CCMImplements>>
  <<CCMHome>>                                         <<CCMHomeIMpl>>
                             implements_1
    ForkHome                                           ForkHomeImpl
                  1                               1
         1

 <<CCMManages>>
   manages_1
          *               <<CCMImplements>>
                                                  <<CCMComponentImpl>>                       <<CCMSegment>>
<<CCMComponent>>             implements_2
                                                         ForkEntityImpl              1             Seg
      Fork
                      1                       1
                                                                                         1   +segment



                                                                          1   +impl_class
                                                                <<CCMArtifact>>
                                                                   the_fork
                              Benefits

• Graphical modeling support for the existing CCM
  metamodel concepts is provided
   - Can be improved by additional graphical symbols
   - Will be improved with UML 2.0
• MDA development environments can target different up-to-
  date component platforms.
• The UML profile for CORBA is extended to allow the
  modeling of additional concepts of IDL 3.0 and Component
  IDL (CIDL)
• Interoperability between various analysis and design tools
  is ensured
                           Finally ...

• Future Work
   -   Correct the specification
   -   Finalize the CIF part
   -   Work on OCL constraints
   -   Work further on implementations of the profile
   -   Transformation rules should be defined to declare how EDOC
       specifications can be transformed to CCM specifications



• Joint UML Profile for CORBA Components initial submission:
  mars/2003-01-01

								
To top