corb-atutorial-boston2003-1199015451803822-2

Embed Size (px)

Citation preview

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    1/136

    CORBA for transportation control and command systems tutorial

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    2/136

    2

    31

    /03

    /03

    Thales Air Traffic Management

    CORBA ATC use case, Note to offline reader.

    ! " # ! ! # "#

    $% # " " ! ! & ' ( )" "# # "

    % " & ! ( # #! & ! *)" "#

    " ! " # ! ! %! ! ! ! "# ! ( %! #

    ""' # " ( (

    "' " "# # " " %!#

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    3/136

    3

    31

    /03

    /03

    Thales Air Traffic Management

    The open issue :

    $#

    + " " + ,

    ,

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    4/136

    4

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    CORBA use case

    Can we use CORBA in Large Distributed ControlSystem ?

    What do We want !

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    5/136

    5

    31

    /03

    /03

    Thales Air Traffic Management

    Why CORBA ?

    )" "# (" " !( ( # - "

    . /

    0 ! )" "# (" " # !( ( # - "

    ( )"

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    6/136

    6

    31

    /03

    /03

    Thales Air Traffic Management

    Practical Use Case

    0 ## !

    + + #

    1" + " 2( !% ,

    3! !% ,

    0 (,

    2&

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    7/136

    7

    31

    /03

    /03

    Thales Air Traffic Management

    Complex system : ATC center

    Flight PlanProcessingFlight Plan

    Processing

    SupervisoryControlSupervisory

    Control

    Simulator

    Simulator

    RecordingReplayRecording

    Replay

    controllerWorkingPosition

    controllerWorkingPosition

    Radar DataProcessingRadar Data

    Processing

    Radar FrontProcessingRadar Front

    Processing

    LAN

    AFTN/CIDINATFM

    ADJACENTFIR'S/TWR'S

    MET Centres

    Voice controland

    communicationsVoice control

    andcommunications

    Intercom Priority Public RADIO A/G

    controllerWorkingPosition

    controllerWorkingPosition

    4 56

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    8/136

    8

    31

    /03

    /03

    Thales Air Traffic Management

    Object At system level ?

    - " ! )" "# ( ,

    ! ( "" ! !

    )" , !

    7 ( !

    # ' ! )" # (

    ! (

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    9/136

    9

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    CORBA use case

    Can we use CORBA in Large Distributed ControlSystem ?

    What do We want !

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    10/136

    10

    31

    /03

    /03

    Thales Air Traffic Management

    What Do We Want

    & + + # "

    # "#

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    11/136

    11

    31

    /03

    /03

    Thales Air Traffic Management

    ++

    "#

    What Do We Want !

    Supervision

    Operator

    Display

    System

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    12/136

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    13/136

    13

    31

    /03

    /03

    Thales Air Traffic Management

    ##

    "#

    ++

    What DO We Want !

    Supervision

    Operator

    Display

    System

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    14/136

    14

    31

    /03

    /03

    Thales Air Traffic Management

    We want to Increase Integrated software quality

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    15/136

    15

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    CORBA use case

    Can we use CORBA in Large Distributed ControlSystem ?

    What do We want !

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    16/136

    16

    31

    /03

    /03

    Thales Air Traffic Management

    What We expect ?

    0 !

    ##

    "#

    ++

    Supervision

    OperatorDisplay

    System

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    17/136

    17

    31

    /03

    /03

    Thales Air Traffic Management

    What We expect ?

    8

    +#

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    18/136

    18

    31

    /03

    /03

    Thales Air Traffic Management

    What We May Have :

    +(" +("

    +("

    +("

    +(" 2

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    19/136

    19

    31

    /03

    /03

    Thales Air Traffic Management

    Spaghetti Plate Syndrome

    8

    "

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    20/136

    20

    31

    /03

    /03

    Thales Air Traffic Management

    Spaghetti Plate Syndrome

    +#

    + ""

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    21/136

    21

    31

    /03

    /03

    Thales Air Traffic Management

    Spaghetti Plate Syndrome

    +#

    + #

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    22/136

    22

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    CORBA use case

    Can we use CORBA in Large Distributed ControlSystem ?

    What do We want !

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    23/136

    23

    31

    /03

    /03

    Thales Air Traffic Management

    Why CORBA

    0 !

    ( ( ! " # !

    )"+! )" "

    #

    0 )"' " # (( " "

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    24/136

    24

    31

    /03

    /03

    Thales Air Traffic Management

    Software Component Integration Bus

    Software BUS

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    25/136

    25

    31

    /03

    /03

    Thales Air Traffic Management

    ObjectSoftware Component Integration Bus

    "

    )"

    #

    99:;(

    !$##Distributed

    Polymorphism

    Software ComponentsEvolution

    And Replacement

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    26/136

    26

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    CORBA use case

    Can we use CORBA in Large Distributed ControlSystem ?

    What do We want !

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    27/136

    27

    31

    /03

    /03

    Thales Air Traffic Management

    Polymorphism

    1< ' )" "# " *

    ( !

    "

    0 ! ! " =

    *GoF stand for Gang of Four. It refers to the pattern seminal book of John Vlissides, Erich Gamma,Richard Helm, Ralph Johnson:

    Design Patterns: Elements of Reusable Object-Oriented Software.

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    28/136

    28

    31

    /03

    /03

    Thales Air Traffic Management

    ObjectSoftware Component Integration Bus

    Object Software BUS

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    29/136

    29

    31

    /03

    /03

    Thales Air Traffic Management

    ObjectSoftware Component Integration Bus

    Object Software BUS

    8!

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    30/136

    30

    31

    /03

    /03

    Thales Air Traffic Management

    Procedural versus Object

    Procedural Design Object Design

    Before Object After Object

    CORBA use case

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    31/136

    31

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    CORBA use case

    Can we use CORBA in Large Distributed ControlSystem ?

    What do We want !

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    32/136

    Ch S * D i D l t

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    33/136

    33

    31

    /03

    /03

    Thales Air Traffic Management

    -

    "( 0 0 # 2 (

    "# " "# 0

    +%

    0 $ B 0 "( # + ;

    + "

    8

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    34/136

    34

    31

    /03

    /03

    Thales Air Traffic Management

    Object Oriented Design

    # # ! " "# " ! ! "

    )" #./ "-

    ./ "# " # "! "## "

    0

    " " " ! " ! "#

    0

    " " " ! "

    Without OOD

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    35/136

    35

    31

    /03

    /03

    Thales Air Traffic Management

    Without OOD

    Without OOD

    Design for no Changes

    Stationary System

    Change management before OOD

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    36/136

    36

    31

    /03

    /03

    Thales Air Traffic Management

    Change management before OOD

    #( " (

    "# "

    Caller called

    Change management before OOD

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    37/136

    37

    31

    /03

    /03

    Thales Air Traffic Management

    Change management before OOD

    0 ! " " " ( "# " " # ! " "

    Caller called

    No changes

    Change management before OOD

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    38/136

    38

    31

    /03

    /03

    Thales Air Traffic Management

    Change management before OOD

    ! ' ! " " "# " " "# ! "

    Caller called

    Changes

    Change management and code reuse before OO

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    39/136

    39

    31

    /03

    /03

    Thales Air Traffic Management

    Change management and code reuse before OO

    ! ' ! " " "# " " "# ! "

    Caller called

    System Integration is a specific change case

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    40/136

    40

    31

    /03

    /03

    Thales Air Traffic Management

    System Integration is a specific change case

    + # " "# " "# " ! "

    0 ! " #

    -( ! " "# "

    " " "

    Caller Called Caller Called

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    41/136

    Pervasive Change

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    42/136

    42

    31

    /03

    /03

    Thales Air Traffic Management

    Pervasive Change

    Replaced Module (Changed)

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    43/136

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    44/136

    Pervasive Change

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    45/136

    45

    31

    /03

    /03

    Thales Air Traffic Management

    g

    Several Changes Replace and Reused

    Pervasive Change = Spaghetti Plate

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    46/136

    46

    31

    /03

    /03

    Thales Air Traffic Management

    g p g

    +#

    After Several Changes Replace and Reused

    Procedural versus Object

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    47/136

    47

    31

    /03

    /03

    Thales Air Traffic Management

    Without OOD With OOD

    Design For Changes

    Evolutionary System

    Design for no Changes

    Stationary System

    Change management with OO reuse

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    48/136

    48

    31

    /03

    /03

    Thales Air Traffic Management

    0 % ! " " " ! " "

    Caller called

    OOD

    Change management with OO reuse

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    49/136

    49

    31

    /03

    /03

    Thales Air Traffic Management

    0 % ! " " " ! " "

    Caller called

    No changes

    OOD

    With OOD : Software Bus

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    50/136

    50

    31

    /03

    /03

    Thales Air Traffic Management

    CORBA use case

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    51/136

    51

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    Can we use CORBA in Large Distributed Control

    System ?

    What do We want !

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design Designing Distributed Object

    Normalisation processes

    Changes example : the printer

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    52/136

    52

    31

    /03

    /03

    Thales Air Traffic Management

    Client Printing Server

    From The CORBA Bible

    Michi Henning

    Steve Vinoski

    Advanced CORBAProgramming with C++

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    53/136

    Changes example : the printer

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    54/136

    54

    31

    /03

    /03

    Thales Air Traffic Management

    Client Printing Server

    Changes example : the printer

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    55/136

    55

    31

    /03

    /03

    Thales Air Traffic Management

    Old Client Printing Server

    New Client

    Change management with OOD reuse

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    56/136

    56

    31

    /03

    /03

    Thales Air Traffic Management

    ## ! "% !

    Client Printing Server

    Change management with OOD reuse

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    57/136

    57

    31

    /03

    /03

    Thales Air Traffic Management

    3! "# (( ?-"%@ !"# ! " ! ! "

    Client Printing Server

    Change management and code reuse before OOD

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    58/136

    58

    31

    /03

    /03

    Thales Air Traffic Management

    " "#" ! ( " "#

    Change management with OOD reuse

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    59/136

    59

    31

    /03

    /03

    Thales Air Traffic Management

    # ?)"@ " ! ""# ( "

    Object properties

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    60/136

    60

    31

    /03

    /03

    Thales Air Traffic Management

    ?)"@ !#

    2"

    "

    "

    2&" #

    " "

    " ! # "#

    CORBA = Distributed Polymorphism

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    61/136

    61

    31

    /03

    /03

    Thales Air Traffic Management

    )" ## "#

    0 #

    )" +(" .+/

    CORBA use case

    C CORBA i L Di t ib t d C t l

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    62/136

    62

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    Can we use CORBA in Large Distributed Control

    System ? What do We want !

    Complex System Seamless Integration

    Why CORBA ? Object Software Bus

    Design for changes

    Change example : Printer CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design Designing Distributed Object

    Normalisation processes

    CORBA Distributed Polymorphism examples

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    63/136

    63

    31

    /03

    /03

    Thales Air Traffic Management

    2&

    ! + 8# ("

    2& C

    # + $ " " " .1/

    2& D

    #

    Example UML Diagram

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    64/136

    64

    31

    /03

    /03

    Thales Air Traffic Management

    Strip

    Strip : string

    Print()

    Strip : string

    Print()

    Printer

    Print()Print()

    Print

    1

    ColorPrinter

    Setcolor()Setcolor()

    From The CORBA Bible

    Michi HenningSteve Vinoski

    Advanced CORBA

    Programming with C++

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    65/136

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    66/136

    printer

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    67/136

    67

    31

    /03

    /03

    Thales Air Traffic Management

    Printer

    print()

    CORBA Distributed Polymorphism example 1

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    68/136

    68

    31

    /03

    /03

    Thales Air Traffic Management

    0

    -&

    8#+("

    Printer

    CORBA = Distributed Polymorphism

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    69/136

    69

    31

    /03

    /03

    Thales Air Traffic Management

    ?# ("@ " "

    # (" # #" ""

    8# +(" ( ! "#! " # ("

    Objet Reference and Naming

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    70/136

    70

    31

    /03

    /03

    Thales Air Traffic Management

    Client NamingService Server

    Server exports

    IOR

    Client lookupfor Interface IOR

    Client submits

    request to server

    CORBA = Distributed Polymorphism

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    71/136

    71

    31

    /03

    /03

    Thales Air Traffic Management

    %

    ! ( " "#

    "

    8! " " ! "! " "

    CORBA = Distributed Polymorphism

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    72/136

    72

    31

    /03

    /03

    Thales Air Traffic Management

    0

    -&

    8#+("

    ColorPrinter

    Printer

    +" ! "#

    "% 0

    CORBA Distributed Polymorphism

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    73/136

    73

    31

    /03

    /03

    Thales Air Traffic Management

    0

    -&

    8#+("

    ColorPrinter

    Printer+" ! "#

    printer

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    74/136

    74

    31

    /03

    /03

    Thales Air Traffic Management

    Printer

    print()

    Colour

    set_color()

    CORBA use case

    Can we use CORBA in Large Distributed Control

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    75/136

    75

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    System ? What do We want !

    Complex System Seamless Integration

    Why CORBA ? Object Software Bus

    Design for changes

    Change example : Printer CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design Designing Distributed Object

    Normalisation processes

    We need design patterns

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    76/136

    76

    31

    /03

    /03

    Thales Air Traffic Management

    0 ( # " "- #

    # " " !" "# ! " "

    ! %! )" ##

    Distributed Pattern

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    77/136

    77

    31

    /03

    /03

    Thales Air Traffic Management

    # # .1/ )" +

    # )" +! #!"

    ( "# " 2&" !" " ")"

    ! +

    & ! "

    +" & # ! "

    & # !

    The GOF Abstract Factory Design Pattern

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    78/136

    78

    31

    /03

    /03

    Thales Air Traffic Management

    *GoF stand for Gang of Four. It refers to the famous books of John Vlissides, Erich Gamma, Richard Helm,Ralph Johnson. Design Patterns: Elements of Reusable Object-Oriented Software.

    Polymorphism and Factory Pattern : example 2

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    79/136

    79

    31

    /03

    /03

    Thales Air Traffic Management

    "

    Life cycle

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    80/136

    80

    31

    /03

    /03

    Thales Air Traffic Management

    Printer FactoryClient Printer

    Create Printer

    Create Printer

    Request

    Printer IOR

    FACTOY PATTERN (from OOC training)

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    81/136

    81

    31

    /03

    /03

    Thales Air Traffic Management

    " " ! ( ' "# !#

    +"

    A client is required to provide security information before thefactory object will allow the client to have access to anotherobject.

    $*"#

    The factory object manages a pool of objects, oftenrepresenting some limited resource, and assigns them toclients based on some utilization algorithm.

    A factory object enables the use of polymorphism by returningobject references to different implementations depending onthe criteria specified by a client.

    Polymorphism and Factory Pattern

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    82/136

    82

    31

    /03

    /03

    Thales Air Traffic Management

    "

    Polymorphism and Factory Pattern

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    83/136

    83

    31

    /03

    /03

    Thales Air Traffic Management

    "

    Factory And Code Generation

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    84/136

    84

    31

    /03

    /03

    Thales Air Traffic Management

    Printer

    +print()

    Black & White

    + print()

    Factory And Code Generation

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    85/136

    85

    31

    /03

    /03

    Thales Air Traffic Management

    Printer

    +print()

    Black & White

    + print()

    Colour

    + print()

    Factory And Code Generation

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    86/136

    86

    31

    /03

    /03

    Thales Air Traffic Management

    Printer

    +print()

    Black & White

    + print()

    Colour

    + print()

    FAX

    + print()

    Factory And Code Generation

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    87/136

    87

    31

    /03

    /03

    Thales Air Traffic Management

    Printer

    +print()

    Black & White

    + print()

    Colour

    + print()

    FAX

    + print()

    Strip

    + print()

    Factory And Code Generation

    I t f

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    88/136

    88

    31

    /03

    /03

    Thales Air Traffic Management

    Printer

    +print()

    Black & White

    + print()

    Colour

    + print()

    FAX

    + print()

    Strip

    + print()

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    89/136

    CORBA use case

    Can we use CORBA in Large Distributed Control

    S t m ?

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    90/136

    90

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    System ? What do We want !

    Complex System Seamless Integration

    Why CORBA ? Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    91/136

    Why is OOD easy to change ?

    )

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    92/136

    92

    31

    /03

    /03

    Thales Air Traffic Management

    " )" #" "

    2" )"

    "# )"

    )"

    ""

    Object collaboration

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    93/136

    93

    31

    /03

    /03

    Thales Air Traffic Management

    Why is OOD easy to change ?

    + ! "#

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    94/136

    94

    31

    /03

    /03

    Thales Air Traffic Management

    + ! "# ! )" "# !

    " " )" "#

    "# "# ?@

    Example 3: The problem is in the User Input

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    95/136

    95

    31

    /03

    /03

    Thales Air Traffic Management

    Exit Coordination State

    A: NIL_EXIT_STATE,

    B: FLIGHT_ACTIVATION_PROPOSAL,

    C: FLIGHT_ACTIVATION_ALARM,

    D: FLIGHT_ACTIVATION_CONFIRMED,

    E: HANDOVER_TRANSFERED,F: COORDINATION_TERMINATED,

    G: UNKNOWN_EXIT_STATE

    Enter Exit Coordination State =>

    Replace case and enum by object .

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    96/136

    96

    31

    /03

    /03

    Thales Air Traffic Management

    enum ExitCoordinationState {

    NIL_EXIT_STATE,

    FLIGHT_ACTIVATION_PROPOSAL,FLIGHT_ACTIVATION_ALARM,

    FLIGHT_ACTIVATION_CONFIRMED,

    HANDOVER_TRANSFERED,

    COORDINATION_TERMINATED,

    UNKNOWN_EXIT_STATE

    }

    Example of structural fragility : the switch

    +" +!" "#

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    97/136

    97

    31

    /03

    /03

    Thales Air Traffic Management

    +" +!" "#2( "# "# "

    "# ! !"

    " " !"

    # % "# "E

    2(! ( " ""# (' ( !" ""# (

    0 ( "# (

    "# (! !" "

    structural switch

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    98/136

    98

    31

    /03

    /03

    Thales Air Traffic Management

    static void printsStatus(int status) {

    switch(status) {

    case NIL_EXIT_STATE :

    processing 1case FLIGHT_ACTIVATION_PROPOSAL:

    processing 2case FLIGHT_ACTIVATION_ALARM:

    processing 3case FLIGHT_ACTIVATION_CONFIRMED:

    processing 4case HANDOVER_TRANSFERED,processing 5

    case COORDINATION_TERMINATED,processing 6

    caseUNKNOWN_EXIT_STATEprocessing 7

    }}

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    99/136

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    100/136

    The problem space and the solution space.

    !" ( " &

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    101/136

    101

    31

    /03

    /03

    Thales Air Traffic Management

    !" ( " &

    0 - ! " ( "#(! !" (

    User Imput

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    102/136

    102

    31

    /03

    /03

    Thales Air Traffic Management

    Exit Coordination State

    A: NIL_EXIT_STATE,

    B: FLIGHT_ACTIVATION_PROPOSAL,

    C: FLIGHT_ACTIVATION_ALARM,

    D: FLIGHT_ACTIVATION_CONFIRMED,

    E: HANDOVER_TRANSFERED,

    F: COORDINATION_TERMINATED,

    G: NewState

    H: UNKNOWN_EXIT_STATE

    Enter Exit Coordination State =>

    Replace case and enum by object .

    enum ExitCoordinationState {

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    103/136

    103

    31

    /03

    /03

    Thales Air Traffic Management

    NIL_EXIT_STATE,

    FLIGHT_ACTIVATION_PROPOSAL,

    FLIGHT_ACTIVATION_ALARM,FLIGHT_ACTIVATION_CONFIRMED,

    HANDOVER_TRANSFERED,

    COORDINATION_TERMINATED,

    NewState,

    UNKNOWN_EXIT_STATE

    }

    static void printsStatus(int status) {

    switch(status) {

    structural switch

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    104/136

    104

    31

    /03

    /03

    Thales Air Traffic Management

    case NIL_EXIT_STATE :

    processing 1case FLIGHT_ACTIVATION_PROPOSAL:

    processing 2case FLIGHT_ACTIVATION_ALARM:processing 3

    case FLIGHT_ACTIVATION_CONFIRMED:

    processing 4case HANDOVER_TRANSFERED,

    processing 5case COORDINATION_TERMINATED,

    processing 6case New_State,

    processing 7

    caseUNKNOWN_EXIT_STATEprocessing 8

    }}

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    105/136

    OOD hides the problem space

    0 % "# " " )"

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    106/136

    106

    31

    /03

    /03

    Thales Air Traffic Management

    # )"

    3! 0

    0

    3!

    Polymorphism

    StatusPrint()

    Client

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    107/136

    107

    31

    /03

    /03

    Thales Air Traffic Management

    +print()

    NIL_EXIT

    _STATE

    + print()

    FLIGHT_ACTIVATION

    _PROPOSAL

    + print()

    FLIGHT_ACTIVATION

    _ALARM

    + print()

    UNKNOWN_EXI

    T_STATE

    + print()

    Factory Pattern

    Status

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    108/136

    108

    31

    /03

    /03

    Thales Air Traffic Management

    +print()

    NIL_EXIT

    _STATE

    + print()

    FLIGHT_ACTIVATION

    _PROPOSAL

    + print()

    FLIGHT_ACTIVATION

    _ALARM

    + print()

    UNKNOWN_EXIT

    _STATE

    + print()

    StatusFactory

    + create()

    Factory Pattern

    !" ! )" "

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    109/136

    109

    31

    /03

    /03

    Thales Air Traffic Management

    " ! )" # (" # !" " # "

    " ! " )" +

    2" )" %! ! # "(" "

    Factory pseudo code

    static Status create(int status) {

    switch(status) { New Object

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    110/136

    110

    31

    /03

    /03

    Thales Air Traffic Management

    case NIL_EXIT_STATE :return status = new nil_exit_state();

    break;

    case FLIGHT_ACTIVATION_PROPOSAL:

    return status = new flight_activation_proposal();break;

    case FLIGHT_ACTIVATION_ALARM:return status = new flight_activation_alarm();

    break;

    case FLIGHT_ACTIVATION_CONFIRMED:

    return status = new flight_activation_confirmed();

    break;

    case HANDOVER_TRANSFERED,return status = new handover_transfered();

    break;

    case COORDINATION_TERMINATED,return status = new coordination_terminated();

    break;

    caseUNKNOWN_EXIT_STATEreturn status = new unknown_exit_state();

    }}

    Polymorphism and changes

    Status

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    111/136

    111

    31

    /03

    /03

    Thales Air Traffic Management

    +print()

    NIL_EXIT

    _STATE

    + print()

    FLIGHT_ACTIVATION

    _PROPOSAL

    + print()

    FLIGHT_ACTIVATION

    _ALARM

    + print()

    UNKNOWN_EXIT

    _STATE

    + print()

    NEW_STATE

    + print()

    No Changes

    Polymorphism and state patterns

    ! ( )" !" " "## ! (

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    112/136

    112

    31

    /03

    /03

    Thales Air Traffic Management

    ""# )" !

    +( !" ( )" "##

    +" )" " "("

    State Pattern (from the GoF)

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    113/136

    113

    31

    /03

    /03

    Thales Air Traffic Management

    GoF stand for Gang of Four. It refers to the famous books of Vlisside and Co.Design Patterns: Elements of Reusable Object-Oriented Software.

    Object Programming

    Stat1

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    114/136

    114

    31

    /03

    /03

    Thales Air Traffic Management

    State2

    Stat1

    State4

    + #

    State5

    2&+ F

    G

    State Pattern

    "& )" "!" )"

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    115/136

    115

    31

    /03

    /03

    Thales Air Traffic Management

    )" & ' # " %! ! # ' ! " " ("

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    116/136

    Polymorphism

    Context

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    117/136

    117

    31

    /03

    /03

    Thales Air Traffic Management

    status

    +print()

    NIL_EXIT

    _STATE

    + print()

    FLIGHT_ACTIVATION

    _PROPOSAL

    + print()

    FLIGHT_ACTIVATION

    _ALARM

    + print()

    UNKNOWN_EXIT

    _STATE

    + print()

    Status

    +print()

    Concrete state

    Coarse Grain Examples

    & ( ' " " # " "

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    118/136

    118

    31

    /03

    /03

    Thales Air Traffic Management

    "' # ( )" #

    & " # &

    + ! )" " # )"

    On line coordination with CORBA Objects

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    119/136

    119

    31

    /03

    /03

    Thales Air Traffic Management

    Air Traffic Control Centre

    Status

    Status

    Status

    Status

    CORBA use case

    Can we use CORBA in Large Distributed Control

    System ? What do We want !

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    120/136

    120

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

    CORBA = Coarse Grain Object

    Remote ObjectLocal Object

    Operation1() NO

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    121/136

    121

    31

    /03

    /03

    Thales Air Traffic Management

    p

    Operation2()

    Operation3()

    Operation4()

    Fine Grain Object

    CORBA = Coarse Grain Object

    Remote ObjectLocal Object

    GroupOperation()

    YES

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    122/136

    122

    31

    /03

    /03

    Thales Air Traffic Management

    YES

    Distributed Object Patterns

    FaadeLocal Object Remote Object

    GetRemoteObject()

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    123/136

    123

    31

    /03

    /03

    Thales Air Traffic Management

    Operation1()

    Operation2()

    Operation3()

    H $" "

    Object By Value

    Local Object Remote Object

    OBV

    Event Factory

    $" )"

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    124/136

    124

    31

    /03

    /03

    Thales Air Traffic Management

    Operation1()

    Operation2()

    Operation3()

    new

    Event Type

    CORBA use case

    Can we use CORBA in Large Distributed ControlSystem ?

    What do We want !

    C l S S l I i

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    125/136

    125

    31

    /03

    /03

    Thales Air Traffic Management

    31

    /03

    /03

    Complex System Seamless Integration

    Why CORBA ?

    Object Software Bus

    Design for changes

    Change example : Printer

    CORBA distributed polymorphism example

    CORBA and Distributed Design pattern example

    Procedural design versus Object design

    Designing Distributed Object

    Normalisation processes

    Separation Of Concern

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    126/136

    126

    31

    /03

    /03

    Thales Air Traffic Management

    Fault

    Tolerance

    Printer

    Load

    Balancing

    Printer

    Transaction

    Printer

    Security

    Printer

    Separation Of Concern

    " " !(# " "" "

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    127/136

    127

    31

    /03

    /03

    Thales Air Traffic Management

    " )"

    )"

    " )"

    " )"

    " " ! "" )"

    "

    Separation Of Concern

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    128/136

    128

    31

    /03

    /03

    Thales Air Traffic Management

    SecurityLoad

    Balancing

    Printer

    TransactionFault

    Tolerance

    Separation Of Concern

    Security Load

    B l iTransaction

    Fault

    Tolerance

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    129/136

    129

    31

    /03

    /03

    Thales Air Traffic Management

    Balancing

    Printer

    Separation Of Concern

    SecurityLoad

    Balancing

    Printer TransactionFault

    Tolerance

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    130/136

    130

    31

    /03

    /03

    Thales Air Traffic Management

    Balancing

    DomainServices

    TechnicalServices

    Y development cycle

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    131/136

    131

    31

    /03

    /03

    Thales Air Traffic Management

    "$ "#""

    1" !

    !

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    132/136

    "

    "$#"

    Application Lay out

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    133/136

    133

    31

    /03

    /03

    Thales Air Traffic Management

    "$#"

    "-

    $#"

    " "-

    Application Lay out

    " $#""""

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    134/136

    134

    31

    /03

    /03

    Thales Air Traffic Management

    " "-""""

    Y Standardization Process

    " " "# ! #

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    135/136

    135

    31

    /03

    /03

    Thales Air Traffic Management

    "" ( #" ! "

    ""

    ""

    0 ( ! "% ( A

    "

    Y Standardization Process

    Domain Logic Domain Technical

  • 8/11/2019 corb-atutorial-boston2003-1199015451803822-2

    136/136

    136

    31

    /03

    /03

    Thales Air Traffic Management

    Domain LogicPatterns

    Domain TechnicalPatterns

    Transportation DTF