1 Getting Service Engineering Right Global behaviours, services and sessions Rolv Bræk, Norwegian University of Science and Technology – NTNU, Department.

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

AP STUDY SESSION 2.
1
Distributed Systems Architectures
Chapter 7 System Models.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 4 Computing Platforms.
Processes and Operating Systems
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Objectives: Generate and describe sequences. Vocabulary:
RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) Customer Supplier Customer authorizes Enrollment ( )
1 Hyades Command Routing Message flow and data translation.
David Burdett May 11, 2004 Package Binding for WS CDL.
Jeff Mischkinsky Nickolas Kavantzas Goran Olsson Web Services Choreography.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
FIGURE 8.1 Process and controller.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Prepared by: Workforce Enterprise Services For: The Illinois Department of Commerce and Economic Opportunity Bureau of Workforce Development ENTRY OF EMPLOYER.
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Custom Services and Training Provider Details Chapter 4.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Week 2 The Object-Oriented Approach to Requirements
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
PP Test Review Sections 6-1 to 6-6
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering.
1 Getting Service Engineering Right UML 2 in a nushell Based on a paper by Birger Møller-Pedersen, Øystein Haugen, Thomas Weigert.
1 The Blue Café by Chris Rea My world is miles of endless roads.
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
CS 6143 COMPUTER ARCHITECTURE II SPRING 2014 ACM Principles and Practice of Parallel Programming, PPoPP, 2006 Panel Presentations Parallel Processing is.
Operating Systems Operating Systems - Winter 2012 Chapter 4 – Memory Management Vrije Universiteit Amsterdam.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Chapter 10: The Traditional Approach to Design
Analyzing Genes and Genomes
Systems Analysis and Design in a Changing World, Fifth Edition
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 12 View Design and Integration.
Essential Cell Biology
Converting a Fraction to %
Clock will move after 1 minute
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
SDS Foil no 1 V&V&S Verification, Validation and Synthesis: doing away with defects Verification, Validation and Synthesis: doing away with defects.
Science and Technology Norwegian University of NTNU Rolv Bræk, March Systems and Service Engineering Domain Modelling (textbook ch 3 ++) Rolv Bræk.
1 Getting Service Engineering Right Next Generation Service Engineering Making the most of service models Rolv Bræk, Norwegian University of Science and.
Science and Technology Norwegian University of NTNU Rolv Bræk, January Domain Modelling and requirement specifications by Rolv Bræk NTNU.
Presentation transcript:

1 Getting Service Engineering Right Global behaviours, services and sessions Rolv Bræk, Norwegian University of Science and Technology – NTNU, Department of Telematics NTNU, March 2011

2 Getting Service Engineering Right Current Best Practice: Model Driven, Agent Oriented Design Architecture Active objects: UML, SDL State machines Asynchronous communication Agents reflecting the domain and the environment Focus on individuals Application generation by model transformations Realization Architecture Runtime support for the Design Architecture: Agents, State machines, messaging, timers, … Distribution transparency and scalablility Platform layering with edges

3 Getting Service Engineering Right A design model defines a system as a structure of components with associated behaviour. This allows a complete and precise definition of behaviour. But the global behaviour is fragmented And the behaviour of different services is often combined

4 Getting Service Engineering Right For global behaviors it is common to use interaction diagrams: ITU-T: MSC, HMSC UML: SD, IOD But there are problems: 1.Behaviors tend to be incomplete because too many orderings are possible 2.Distributed realizations may cause implied scenarios and other emergent behavior that must be resolved

5 Getting Service Engineering Right Weak sequencing case Consider a direct realization of Z What problem may occur? How can it be fixed? a b ZYX MSC A c

6 Getting Service Engineering Right we ask ourselves: How to best organize global behavior models? Are there alternatives to interaction diagrams? How to define services separately in a precise way so that they may be composed? How to derive design models from service models?

7 Getting Service Engineering Right Answer: organize global behavior according to services and interfaces: Service models for: service specification service composition service analysis interface contracts design synthesis With added bonuses: Increased reuse Design correctness Interface validation Adaptability Modularity S1 S3 S2 Design synthezis S1.1S2.1 S3.1S2.2 Program generation Services Designs Realizations

8 Getting Service Engineering Right What is a service? A service is: an identified functionality aiming to establish some goals/effects among collaborating entities. This definition is quite general and captures: active and passive services end user services service as layered functionality (ISO OSI) service as component interface (WS, CORBA, JINI, …) Service essentials: Service is functionality; it is behavior performed by entities. Service imply collaboration; it makes no sense to talk about service unless at least two entities collaborate. Service behavior is cross-cutting; it imply coordination of two or more entity behaviors Service behavior is partial; it is to be composed with other services

9 Getting Service Engineering Right The nature of services A service is provided by several actors in collaboration: e.g. the agents representing users and terminals participating in a call. Actors may be involved in several services: e.g. a terminal may be engaged in a voice call and receiving SMS at the same time. A role is the part an actor plays in a service: e.g. the roles of caller and callee in a voice call. Roles are often bound dynamically: e.g. the callee role is dynamically bound to agents representing the called party. Neither services nor roles are simple components. Services are partial system behaviours involving one or more components, while roles are partial component behaviors.

10 Getting Service Engineering Right Service engineering: is contemporary SOA or WS the solution? Only if passive services are all you need there is little need for stateful sessions you are not too worried about interoperability and performance you are happy to live in a concrete architecture Because these ”services” are essentially invocation interfaces bound to concrete components used for integration and distribution not for engineering end user and community services

11 Getting Service Engineering Right Introducing UML 2 collaborations Matches the concept of services: Collaborative; Cross-cutting; Partial; Functionality Enable services to be defined separately in terms of role structures and behaviours. Enable flexible binding of roles to classes and allow classes to play several roles. Container for re-usable global behaviour Notion of compatibility between roles and classes Enabler for service composition, semantic connectors with modular validation and dynamic actor composition r2 r3 r1 service 2 service 1

12 Getting Service Engineering Right 12 Collaboration diagrams Service roleA:TypeA roleC:TypeC roleB:TypeB session1: Session session2: Session session3: Session roleX roleY roleX roleY roleX roleY A collaboration with three roles and three collaboration uses: may define a service structure Session roleX:TypeX roleY:TypeY A collaboration with two roles: may define a semantic connector TypeA must be compatible with (the semantic interface) TypeX Compatibility means that the role behaviours must be contained in the total behaviour of the actor – how is a semantic variation point in UML2

13 Getting Service Engineering Right 13 Behaviour can be in three places: –The collaboration itself –The roles –The context (scope) of the collaboration: Service roleA:typeA roleC:typeC roleB:typeB session1: Session session2: Session session3: Session roleXroleY roleX roleY roleX roleY sd

14 Getting Service Engineering Right 14 How to model the service behaviour? A service is an identified (partial) functionality, provided by a system, component, or facility, to serve a purpose (or achieve a goal) for its (usage) environment. Languages: Interaction diagrams Activity diagrams Role state machines op[n] Ii[m]ACD TaxiDispatch taxi[l] TaxiCentral

15 Getting Service Engineering Right What about this? acdOp available seize(caller) answer(op) end tourOrder(TourInfo) confirm acdLi Request answer(op) end queue(no) msc acd allocator alert(caller) queue(no)loop answer(op) available call(caller) grant(op) end alerting

16 Getting Service Engineering Right Good global overview,... but : It is bound to the system, not reusable It is incomplete It is hard to define all possible scenarios What can we do?

17 Getting Service Engineering Right Solutions: It is bound to the system, not reusable Bind to a collaboration in stead! It is incomplete, just one scenario It is hard to define all possible scenarios Decompose into collaborations corresponding to: Interfaces Sub-services Initiatives

18 Getting Service Engineering Right The taxi central with interface collaborations op[n] Ii[m]ACD TaxiDispatch taxi[l] TaxiCentral line Interface taxi Interface taxi Dispatch operator Interface acdTd acdLiacdOp td li td taxi op

19 Getting Service Engineering Right AcdInterfaces op acdOp operatorInterface ref msc operatorInterface opacdOp available call(caller) answer end loop tourOrder(TourInfo) confirm msc operatorInterface acdLi li lineInterface ref msc lineInterface acdLili alert(caller) alerting answer(op) loop alt answer(op) end queue(no) loop msc lineInterface

20 Getting Service Engineering Right TaxiDispatch td acdTd taxiDispatch ref msc taxiDispatch tdacdTd tourOrder(TourInfo) confirm deny loop alt msc taxiDispatch TourInfo customer: String taxi: String pickup: Location start: Location drop: Location start: Time end: Time distance: Integer Location street: String number: Integer

21 Getting Service Engineering Right taxiInterface: find-bind taxi to tour Here there is an initiative choice (mixed initiative) to be resolved taxi td taxiInterface taxitd available tourOrder(TourInfo) confirm unavailable loop finished(tourInfo) alt pickup(tourInfo) msc taxiInterface

22 Getting Service Engineering Right The result: More complete behaviors Reusable building blocks Interface contracts for validation as a bonus But now we need a way to link the interface behaviors. How?

23 Getting Service Engineering Right How to design and compose the roles? op[n] Ii[m] line Interface taxi Dispatch operator Interface acdTd acdLi acdOp td li op ACD TaxiDispatch acdTd acdOpacdLi ??

24 Getting Service Engineering Right Role design Consider which roles should be active objects and which should just be partial behavior of other objects State-full roles imply a session and normally map to active objects Dynamic links imply dynamic role binding and normally requires an additional allocator Stateless roles do not imply a session and can map to operations performed by existing objects

25 Getting Service Engineering Right The resulting ACD Operator sessions by op(1,m):OperatorAgt Line sessions by li(1,n):LineAgt Dynamic linking by Allocator Taxi dispatch operation by OperatorAgt

26 Getting Service Engineering Right Completing the picture opacdOp available call(caller) answer en d loop confirm msc operatorInterface tourOrder(TourInfo) acdLili alert(caller) alerting answer(op) loop alt answer(op) end queue(no) loop msc lineInterface External interface to be respected Internal interactions to be added State machines to be designed External interface to be respected

27 Getting Service Engineering Right What about Activity diagrams? 27

28 Getting Service Engineering Right 28 The Access Control Activity Global activity flow Flows crossing partitions imply communication Exceptions not yet treated here An alternative to interaction diagrams Are they better or worse?

29 Getting Service Engineering Right 29 Activity concepts Partition Action Flow Fork Choice Token flow semantics Flows may be control flows or object flows Only local actions in this diagram Partitions may represent roles

30 Getting Service Engineering Right What if we use interface collaborations? 30

31 Getting Service Engineering Right 31 Activity diagram with collaborations as actions Card Entry Authorize Validate Open Deny Accept PIN Entry panel userAgt Authenticator Authorizer Door 1.Can you add the flows and local actions? 2.Can you define each collaboration as an activity? 3.Where do we have sessions?

32 Getting Service Engineering Right 32 Connecting roles using flows and local actions Card Entry Open panel userAgt Authenticator Authorizer Door 1.NB! pins have been omitted 2.What kind of pins are needed? StoreCID PIN Entry Deny Accept Validate Authorize Authent- icate Authorize Enter Card Enter PIN Deny- eject Pass- eject Open- close

33 Getting Service Engineering Right 33 Streaming pins Card Entry Open panel userAgt Authenticator Authorizer Door 1.Use streaming when actions shall not be stopped StoreCID PIN Entry Deny Accept Validate Authorize Authent- icate Authorize Enter Card Enter PIN Deny- eject Pass- eject Open- close

34 Getting Service Engineering Right 34 Sessions Card Entry Open panel userAgt Authenticator Authorizer Door 1.Each access point holds one session 2.Static binding – no allocators 3.Do we need sessions in AA? StoreCID PIN Entry Deny Accept Validate Authorize Authent- icate Authorize Enter Card Enter PIN Deny- eject Pass- eject Open- close

35 Getting Service Engineering Right 1.AA combined to one component 2.Roles not shown here 3.Some external flows are missing in components Splitting/combining to components Card Entry panel userAgt AA-combined StoreCID PIN Entry Deny Accept Validate Authent- icate Authorize Enter Card Enter PIN Deny- eject Pass- eject Validate Open Door Open- close Open Card Entry PIN Entry Deny Accept

36 Getting Service Engineering Right 1.Responding flows added to responding roles 2.Collaborations are kept as contracts Roles and responding flows panel userAgt StoreCID Enter Card Enter PIN Deny- eject Pass- eject Card Entry ceu Accept au Deny du PIN Entry peu Card Entry cep PIN Entry pep Deny dp Accept ap Validate vu Open ou

37 Getting Service Engineering Right 1.Can you derive the state machines? 37 The two last components AA-combined Authent- icate Authorize Door Open- close Authenticate aa Open od

38 Getting Service Engineering Right 38 Flow-global Activity diagram Useful for early analysis Focus on intended flows Can be refined to flow-localized flows Can be analyzed for implied scenarios

39 Getting Service Engineering Right 39 Service behaviour A-rule: Service separation (new) Use layering to separate service behaviour from interface given behaviour A-rule: Service Collaborations (new) Use collaborations to structure service definitions. a:Authenticator b:Authorizer u:User d:Door User Access ua:UserAgent The system structure helps to identify service roles Services may need roles provided by additional system objects – to be determined during design

40 Getting Service Engineering Right 40 Interface behaviour A-rule: Interface Collaborations (new) Use collaborations to structure interface definitions. A-rule: Message Sequence Charts Make message sequence charts that describe the typical interaction sequences (protocols) at each layer of the interfaces. p:Panel u:User PanelInterface PanelUser Code OK Push door MSC User_accepted

41 Getting Service Engineering Right 41 Role behaviours and Semantic Interfaces A-rule: Role behaviour Define the interface behaviour of each role in the system and in the environment. Use the roles as basis for behaviour synthesis and validation. A-rule: Semantic Interfaces (new) Use collaborations to structure and define semantic interfaces. p:Panel u:User PanelInterface

42 Getting Service Engineering Right Role state machine for taxi interface taxi td taxiInterface taxitd available tourOrder(TourInfo) confirm unavailable loop finished(tourInfo) alt pickup(tourInfo) msc taxiInterface tourOrder(ti) available 1 pickup 432 none confirmfinished 4 unavailable 15 available 2 process td DCL ti TourInfo;

43 Getting Service Engineering Right process taxi confirm none tourOrder(ti ) none DCL ti TourInfo; finished availableunavailabl e available pickup tourOrder(ti ) 3 pickup tourOrder(ti) available 1 pickup none confirm finished 4 unavailable 1 5 available 2 process td DCL ti TourInfo; pickup 4 taxi td taxiInterface A Semantic Interface: TaxiInterface defined using dual role state machines here with resolution of mixed initiative

44 Getting Service Engineering Right Dynamic sessions: Call handling ua:UserAllo us:UserServ u(n):UserAgent ua:UserAllo us:UserServ u(n):UserAgent a:Terminal b:Terminal Sessions handled by session role objects Dynamic linking handled by Allocators Allocators trigger session role objects Depending on state and context the allocator may trigger alternative role objects, e.g. call-waiting, forward, call-back when free

45 Getting Service Engineering Right Dynamic sessions: ACD Operator sessions by op(1,m):OperatorAgt Line sessions by li(1,n):LineAgt Dynamic linking by Allocator Taxi dispatch operation by OperatorAgt

46 Getting Service Engineering Right Dynamic Sessions: The Treasure Hunt

47 Getting Service Engineering Right Dynamic sessions: The Treasure Hunt system

48 Getting Service Engineering Right User agents on Android phones