CS551 UML for Distributed Objects (Engineering Distributed Objects) - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

CS551 UML for Distributed Objects (Engineering Distributed Objects)

Description:

coaches. 1..* 1..* Player -name:string -role:Position -Number:int book() transfer(p:Player) ... Components still have to be interoperable. ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 25
Provided by: frankm8
Category:

less

Transcript and Presenter's Notes

Title: CS551 UML for Distributed Objects (Engineering Distributed Objects)


1
CS551UML for Distributed Objects (Engineering
Distributed Objects)
  • Yugi Lee
  • STB 555
  • (816) 235-5932
  • yugi_at_cstp.umkc.edu
  • www.cstp.umkc.edu/yugi

2
UML and Meta Model for Distributed Objects
  • Used for communicating about objects
  • Static vs. dynamic properties
  • Type vs. instance properties
  • UML
  • Use Case Diagrams
  • Sequence Diagrams
  • Class and Object Diagrams
  • State Diagrams
  • Packages
  • Meta Model

3
Use Case Diagrams
Plan Training
Trainer
Schedule
Determine League
Games
National Soccer
Manager
Association
Print Personal
Player
Schedule
4
Sequence Diagrams
BvBTeam
TeddyPlayer
StefanPlayer
Output
TonyTainer
bookGoalies
book()
book()
printTrainingPlan
5
Class Diagrams
6
Packages
Soccer Clubs
League
Management
National Team
7
Object Diagrams
8
State Diagrams
in team
healthy
in match
playing
/swap
/swap
/injury
reserve
injured
in_squad /play
!in_squad /play
/recovered
/finish
/finish
free
training
/exercise
9
Parallel State Composition
Player
/sign_contract
/unsatisfaction
happy
on transfer list
/resign
in team
10
Meta Model for Distributed Objects
  • Distributed Systems consist of multiple
    components.
  • Components are heterogeneous.
  • Components still have to be interoperable.
  • There has to be a common model for components
    that expresses
  • component states,
  • component services and
  • interaction between components.

11
OO Approach to Distributed Systems
  • Objects.
  • Object attributes.
  • Object operations.
  • Operation execution requests.
  • Exceptions.
  • Components
  • Visible component state
  • Usable component services Component interactions
  • Component service failures

12
Need for an Object Meta-model
  • There are many different object-oriented
    approaches
  • Distribution middleware must define object model
    that can serve as a common basis for
    heterogeneous components.
  • We introduce general distributed object model to
    capture common characteristics of object models
    of different distributed object-middleware.

13
Different levels of abstraction...
Meta-Object Facility
Level 3
Meta Object Model
Level 2
Object Types
Level 1
Objects
Level 0
14
Object vs. Object type
  • Has a unique identifier.
  • May have many different references that refer to
    the object.
  • Has a set of attributes whose names denote
    values.
  • References may denote
  • equal/identical objects
  • Is encapsulated by operations.
  • May raise particular exceptions.
  • Multiple objects may export the same properties
    (Attributes, operations and exceptions)
  • Only define the properties once!
  • Attributes and operations, and exceptions are
    defined in object types.
  • May raise particular exceptions.

15
Samples Object vs. Object type
klinsiPlayer
name Jürgen Klinsmann role Forward Number
18
16
Object type Attributes
  • Attributes have a name and a type.
  • Type can be an object type or a non-object type.
  • Attributes are readable by other components.
  • Attributes may or may not be modifiable by other
    components.
  • Attributes correspond to one or two operations
    (set/get).

17
Object type Exceptions
  • Service requests in a distributed system may not
    be properly executed.
  • Exceptions are used to explain reason of failure
    to requester of operation execution.
  • Operation execution failures may be
  • generic or
  • specific.
  • Specific failures may be explained in specific
    exceptions.

18
Object type Operations
  • Operations have a signature that consists of
  • a name,
  • a list of in, out, or in-out parameters,
  • a return value type, and
  • a list of exceptions that the operation can raise

19
Operation Execution Requests
  • A client object can request an operation
    execution from a server object.
  • Operation request is expressed by sending a
    message (operation name) to server object.
  • Server objects are identified by object
    references.
  • Clients have to react to exceptions that the
    operation may raise.

20
Subtyping
  • Properties shared by several types should be
    defined only once.
  • Object types are organised in a type hierarchy.
  • Subtypes inherit attributes, exceptions and
    operations from their supertypes.
  • Subtypes can add more specific properties.
  • Subtypes can redefine inherited properties.

21
Multiple Inheritance
  • Means that one object type can be subtype of more
    than one super type
  • Not supported by all middleware
  • May lead to ambiguities

22
Multiple Inheritance Example
ltltinterfacegtgt Player
ltltinterfacegtgt Trainer
-namestring -rolePosition -Numberint
-salaryint
void book(in Date d) raises (AlreadyBooked) nex
t_game()Date
next_game()Date
ltltinterfacegtgt PlayerTrainer
23
Polymorphism
  • Object models may be statically typed.
  • Static type of a variable restricts the dynamic
    type of objects that can be assigned to it.
  • Polymorphism denotes the possibility of
    assignments of objects that are instances of the
    static type and all its subtypes.

24
Polymorphism Example
chelseaTeam
name Chelsea
vPlayerTrainer
dPlayer
name Gianluca Vialli role Forward Number
10 salary1000000
name Marcel Desailly roleDefender Number5
zPlayer
name Gianfranco Zola roleForward Number3
Write a Comment
User Comments (0)
About PowerShow.com