Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS551 UML for Distributed Objects (Engineering Distributed Objects)

Similar presentations


Presentation on theme: "CS551 UML for Distributed Objects (Engineering Distributed Objects)"— Presentation transcript:

1 CS551 UML for Distributed Objects (Engineering Distributed Objects)
Yugi Lee STB #555 (816) CS551 - Lecture 7

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 CS551 - Lecture 7

3 Use Case Diagrams use case actor system boundary Plan Training Trainer
Schedule actor Determine League Games National Soccer Manager Association system boundary Print Personal Player CS551 - Lecture 7 Schedule

4 Sequence Diagrams (remote) procedure call Object Name Type synchronous
Message Tony:Tainer BvB:Team Teddy:Player Stefan:Player :Output bookGoalies book() book() printTrainingPlan asynchronous message object activation lifeline object deletion CS551 - Lecture 7

5 Class Diagrams Player -name:string -role:Position -Number:int +book()
+transfer(p:Player) Club -noOfMembers:int -location:Address Trainer Organization #name:string protected dependency generalization aggregation uses works for 1 1..* plays in 1 11..16 has * coaches 1..* cardinality composition association class name attributes Team -name:string +bookGoalies() private public CS551 - Lecture 7 operations

6 Packages Soccer League Clubs Management National Team
CS551 - Lecture 7

7 name = “Tottenham Hotspurs”
Object Diagrams Object Name Object Type Object name = “Tottenham Hotspurs” spurs:Team Attribute Name Attribute Value stefan:Player name = “Stefan Freund” role = Defender Number=4 name=“Jürgen Klinsmann” role=Forward Number = 18 klinsi:Player Link CS551 - Lecture 7

8 State Diagrams in team action during transition healthy composite
in match playing /swap /swap /injury transition reserve [in_squad] /play injured condition [!in_squad] /play /recovered /finish /finish indicates default state training free /exercise CS551 - Lecture 7

9 Parallel State Composition
Player /unsatisfaction /sign_contract happy on transfer list concurrent threads /resign in team final state CS551 - Lecture 7

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. CS551 - Lecture 7

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 CS551 - Lecture 7

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. CS551 - Lecture 7

13 Different levels of abstraction...
Meta-Object Facility Level 3 Meta Object Model Level 2 Object Types Level 1 Objects Level 0 CS551 - Lecture 7

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. CS551 - Lecture 7

15 <<interface>>
Samples: Object vs. Object type <<interface>> Player -name:string; -role:Position; -Number:int; +void book(in Date d) raises (AlreadyBooked); klinsi:Player name = “Jürgen Klinsmann” role = Forward Number = 18 CS551 - Lecture 7

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). CS551 - Lecture 7

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. CS551 - Lecture 7

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 CS551 - Lecture 7

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. CS551 - Lecture 7

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. CS551 - Lecture 7

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 CS551 - Lecture 7

22 Multiple Inheritance Example
<<interface>> Player <<interface>> Trainer -name:string; -role:Position; -Number:int; -salary:int; +next_game():Date +void book(in Date d) raises (AlreadyBooked); +next_game():Date <<interface>> PlayerTrainer CS551 - Lecture 7

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. CS551 - Lecture 7

24 Polymorphism Example chelsea:Team name = “Chelsea” v:PlayerTrainer
d:Player name = “Gianluca Vialli” role = Forward Number = 10 salary= name = “Marcel Desailly” role=Defender Number=5 z:Player name = “Gianfranco Zola” role=Forward Number=3 CS551 - Lecture 7


Download ppt "CS551 UML for Distributed Objects (Engineering Distributed Objects)"

Similar presentations


Ads by Google