Title: CS551 UML for Distributed Objects (Engineering Distributed Objects)
1CS551UML for Distributed Objects (Engineering
Distributed Objects)
- Yugi Lee
- STB 555
- (816) 235-5932
- yugi_at_cstp.umkc.edu
- www.cstp.umkc.edu/yugi
2UML 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
3Use Case Diagrams
Plan Training
Trainer
Schedule
Determine League
Games
National Soccer
Manager
Association
Print Personal
Player
Schedule
4Sequence Diagrams
BvBTeam
TeddyPlayer
StefanPlayer
Output
TonyTainer
bookGoalies
book()
book()
printTrainingPlan
5Class Diagrams
6Packages
Soccer Clubs
League
Management
National Team
7Object Diagrams
8State Diagrams
in team
healthy
in match
playing
/swap
/swap
/injury
reserve
injured
in_squad /play
!in_squad /play
/recovered
/finish
/finish
free
training
/exercise
9Parallel State Composition
Player
/sign_contract
/unsatisfaction
happy
on transfer list
/resign
in team
10Meta 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.
11OO 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
12Need 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.
13Different levels of abstraction...
Meta-Object Facility
Level 3
Meta Object Model
Level 2
Object Types
Level 1
Objects
Level 0
14Object 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.
15Samples Object vs. Object type
klinsiPlayer
name Jürgen Klinsmann role Forward Number
18
16Object 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).
17Object 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.
18Object 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
19Operation 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.
20Subtyping
- 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.
21Multiple 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
23Polymorphism
- 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.
24Polymorphism 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