Science and Technology Norwegian University of NTNU Rolv Bræk, April 2005 1 Compositional and Model Driven Service Engineering using semantic interfaces.

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Introduction to Software Engineering 7. Modeling Behaviour.
OASIS Reference Model for Service Oriented Architecture 1.0
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
1 Synchronization strategies for global computing models Ivan Lanese Computer Science Department University of Bologna.
Software Connectors. Attach adapter to A Maintain multiple versions of A or B Make B multilingual Role and Challenge of Software Connectors Change A’s.
Causality Interface  Declares the dependency that output events have on input events.  D is an ordered set associated with the min ( ) and plus ( ) operators.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
1 SOCK and JOLIE from the formal basis to a service oriented programming language Ivan Lanese Computer Science Department University of Bologna Italy Joint.
Requirements Analysis Concepts & Principles
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
The chapter will address the following questions:
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
Web Services Experience Language Web Services eXperience Language Technical Overview Ravi Konuru e-Business Tools and Frameworks,
SDS Foil no 1 V&V&S Verification, Validation and Synthesis: doing away with defects Verification, Validation and Synthesis: doing away with defects.
An Introduction to Software Architecture
Features, Policies and Their Interactions Joanne M. Atlee Department of Computer Science University of Waterloo.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
SelfCon Foil no 1 Self configuring systems - introduction II.
SelfCon Foil no 1 Self configurating systems - a starter Rolv Bræk, Item.
FDT Foil no 1 Overall Methodology – from Engineering RT Systems through TIMe; to RAM. Covering the full development cycle Supporting the whole company.
Formalizing the Asynchronous Evolution of Architecture Patterns Workshop on Self-Organizing Software Architectures (SOAR’09) September 14 th 2009 – Cambrige.
Science and Technology Norwegian University of NTNU Rolv Bræk, March Systems and Service Engineering Domain Modelling (textbook ch 3 ++) Rolv Bræk.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Telecom and Informatics 1 SDL Forum 2005 Grimstad, Norway Service Discovery and Component Reuse with Semantic Interfaces Richard T. Sanders (SINTEF, Trondheim,
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
FDT Foil no 1 Overall Methodology – from Engineering RT Systems through TIMe; to RAM. Covering the full development cycle Supporting the whole company.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
By: David Harel & Eran Grey Presenter: Elizabeth Antony CISC 836.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Design Model Lecture p6 T120B pavasario sem.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
SelfCon Foil no 1 Variability in Self-Adaptive Systems.
Science and Technology Norwegian University of NTNU Rolv Bræk, January ActorFrame an introduction Rolv Bræk NTNU Department of Telematics.
Science and Technology Norwegian University of NTNU Rolv Bræk, January Introduction to Systems Engineering by Rolv Bræk NTNU.
Chapter 1: Computing with Services Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
1 Getting Service Engineering Right Next Generation Service Engineering Making the most of service models Rolv Bræk, Norwegian University of Science and.
1 Grimstad, June th SDL Forum Synthesizing State-machine Behaviour from UML Collaborations and Use Case Maps Humberto Nicolás Castejón Dept. of.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Software Connectors Acknowledgement: slides mostly from Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic,
1 Middleware and future telecom ’platform’ By Lill Kristiansen, ntnu.
Science and Technology Norwegian University of NTNU Rolv Bræk, January Domain Modelling and requirement specifications by Rolv Bræk NTNU.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
Fusion Design Overview Object Interaction Graph Visibility Graph Class Descriptions Inheritance Graphs Fusion: Design The overall goal of Design is to.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
UML (Unified Modeling Language)
CHESS Methodology and Tool Federico Ciccozzi MBEES Meeting Sälen, January 2011 January 2011.
Context-Aware Middleware for Resource Management in the Wireless Internet US Lab 신현정.
Service technology based on process models
Web Ontology Language for Service (OWL-S)
COT 5611 Operating Systems Design Principles Spring 2012
Chapter 20 Object-Oriented Analysis and Design
Design Yaodong Bi.
COT 5611 Operating Systems Design Principles Spring 2014
Presentation transcript:

Science and Technology Norwegian University of NTNU Rolv Bræk, April Compositional and Model Driven Service Engineering using semantic interfaces Rolv Bræk, with friends The Norwegian University of Science and Technology – NTNU Department of Telematics

Science and Technology Norwegian University of NTNU Rolv Bræk, April The challenge How to support Rapid, Compositional, and Correct development with Dynamic deployment of Innovative Convergent Services?

Science and Technology Norwegian University of NTNU Rolv Bræk, April The nature of services: Client-server (traditional O-O and IS) One-way initiatives A service as an interface Synchronous communication Restricted structure Peer-to-peer (telecom and real-time) Multi-way initiatives A service as a collaboration Asynchronous communication General structure We focus on P2P and consider CS a special case

Science and Technology Norwegian University of NTNU Rolv Bræk, April Services, Roles and Actors A service is a collaboration among several actors: e.g. call Actors may be involved in several services: e.g. call1, call2, … A role is the part an actor plays in a service: e.g. caller, callee Roles are often bound dynamically: e.g. callee Neither services nor roles are simple components Need to: 1. model services separately using roles; 2. design actor classes by composing roles; 3. dynamically deploy and compose actors Service 1 Actor 1 Actor 2 Actor 3 Actor 4 Actor 5 Service 3 Service 2 “Vertical” composition (within an actor) “Horizontal” composition (within a service)

Science and Technology Norwegian University of NTNU Rolv Bræk, April Introducing UML 2 collaborations Matches the concept of Peer-to-Peer services (P2P). 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. Notion of compatibility between roles and classes is ”semantic variation” point. Enabler for service composition, semantic interfaces with modular validation and dynamic actor composition Method for service modelling and composition is under way. r2 r3 r1 service 2 service 1

Science and Technology Norwegian University of NTNU Rolv Bræk, April Sixth principle: services as collaborations with: goal expressions for liveness behaviour specified using MSC and state machines features represented by collaboration uses role behaviour designed as actor state machines a:Callerb:Callee invite:Role Request c:Calling b:Busy u:Unavailable b:Called Agent requester requested invoked ab b b a a UserCall {goal: VoiceCnt(a,b) = a.VoiceCntTo(b) AND b.VoiceCntTo(a)}

Science and Technology Norwegian University of NTNU Rolv Bræk, April FullCall at:Term Caller bt:Term Callee au:User Caller bu:User Callee uc:UserCall o:TermCall t:TermCall P1 P2 P3 P4P5P6P7P8 bt:Term Callee at:Term Caller au:User Caller bu:User Callee uc:UserCall o:TermCall t:TermCall fcx:FullCall P1’+P2’+P3’...+P8’ at:Term Agent au:User Agent bu:User Agent bt:Term Agent P12 P11 P10 P13 collaborations agents... and roles/actors bound to agents Actors as service components (provide roles) Actors for separate services and sessions

Science and Technology Norwegian University of NTNU Rolv Bræk, April Fifth principle: component based framework with loose coupling - Actors and Agents Agent identity: credentials: profile:

Science and Technology Norwegian University of NTNU Rolv Bræk, April with platform adaptors and edges AmigosFramework Kari: UserAgent Ola: UserAgent Mp1: MeetingPlace t1: TermAgent t2: TermAgent Mp2: MeetingPlace tlogonulogontchat mpcalluchat mpchat tcall ucall OSA FW OSA CallC call Service Platform Specific Computing Platform Specific Platform indenpendent Edge

Science and Technology Norwegian University of NTNU Rolv Bræk, April and distribution transparency Freedom to deploy actors on small devices and servers Global address space and transparent messaging Simple configuration, but not yet self-configuring Application Server edge Terminal/appliance edge Application Server edge Terminal/appliance edge

Science and Technology Norwegian University of NTNU Rolv Bræk, April Composition aspects: Actor implementation with metadata Service models: Collaborations with behaviour r2 r3 r1 > Service ececution environment design composition dynamic deployment Actor design with semantic interfaces (Automatic) code generation dynamic structure with dynamic discovery and composition collaboration (service feature) composition design composition - synthesising behaviours and defining actor types w. semantic interfaces managing dynamic role invocation metadata and ontology for dynamic systems dynamic deployment discovery, selection and negotiation

Science and Technology Norwegian University of NTNU Rolv Bræk, April Compatibility and interface roles Interface roles are ”projected and distilled” behaviours visible on interfaces, or associations. Given two state machines A and B: 1.Derive the interface role behaviours Project: hide and transform Distill: gather, minimize and merge Detect inconsistencies 2.Correct inconsistencies and repeat from 1 3.Validate role compatibility A B 1a 1b session

Science and Technology Norwegian University of NTNU Rolv Bræk, April Dual roles are fully compatible a-roles: 1.iff the original state machine is consistent, then the dual a-role may be constructed, 2.and used to discover, compare and select compatible services, 3.and to partially synthesise state machines. A 1a 1b 2 session B 1c C 1d 1 2 D 1b 2b 3b

Science and Technology Norwegian University of NTNU Rolv Bræk, April Compatibility in collaboration occurrences Assume a collaboration with dual roles A and B. For each potential participant class: 1.Derive a-role 2.Ensure s-role consistency 3.Compare a-roles, select Ai, Bj such that: Ai ~> A and Bj ~> B and if restriction has been applied that Ai-Bj satisfies obligation and collaboration goals. Subtyping can be checked once for each participant type. Goal reachability can be checked once for each pair Ai, Bj of participant types. Need not be repeated for each instance. Note that the collaboration will be restricted only if the subtypes are restricted. Class_A1 S-roleA Class_B2 S-roleB service-a B A a Class_A2 S-roleA Class_B1 S-roleB b A2 A1 B1 B

Science and Technology Norwegian University of NTNU Rolv Bræk, April A-roles and collaborations as semantic interface types... a basis for incremental and scalable compatibility checks... as well as for service discovery and service selection. If Class_A is typed with Call.a (alternatively by A alone) and Class_B is typed with Call.b (alternatively by B alone) Consistency of links can be checked statically and Service opportunities discovered and selected dynamically A B Call a b Class_A S-roleA Call B A 1 a Class_B Call S-roleB B A 1 b X:Class_A 1 y:Class_B 1

Science and Technology Norwegian University of NTNU Rolv Bræk, April Interface Typing by Semantic Interfaces to enable: compositional validation dynamic service discovery and selection Y: UserAgent Callee B yi X: UserAgent Caller A xi W: UserAgent CalleeW wi B Z: UserAgent CallerW zi A UserCallW UserCall

Science and Technology Norwegian University of NTNU Rolv Bræk, April defining a semantic interface without waiting

Science and Technology Norwegian University of NTNU Rolv Bræk, April and one with waiting

Science and Technology Norwegian University of NTNU Rolv Bræk, April Incompatible Validating compatibility (full or restricted) Y: UserAgent Callee B yi X: UserAgent Caller A xi W: UserAgent CalleeW wi B Z: UserAgent CallerW zi A Compatible {UserCallW.goal} UserCallW UserCall Compatible {UserCall.goal} Compatibility in collaboration occurrences Compatibility in composition

Science and Technology Norwegian University of NTNU Rolv Bræk, April Caller Callee UserCall CallerW CalleeW UserCallW ext extension reduction red Role relationships

Science and Technology Norwegian University of NTNU Rolv Bræk, April Substitution and subtyping Here a and b mirror each other with conflict resolution omitted. Substitution roles a’, b’ can have less outputs and more inputs, i.e. be subtypes of a,b (~>) Remove outputs a1 a2a3 a4 a6a7 a8 a5 a9 !m1!m2 ?m3?m4 ?m5 ?m6!m7!m8 b1 b2b3 b4 b6b7 b8 b5 b9 ?m1?m2 !m3!m4 !m5 !m6?m7?m8 a’1 a’2a’3 a’4 a’6a’7 a’8 a’5 a’9 !m1 !m2 ?m3?m4 ?m5 ?m6!m7!m8 b’1 b’2b’3 b’4 b’6b’7 b’8 b’5 b’9 ?m1?m2 !m3!m4 !m5 !m6?m7?m8 a’10 ?m9 b’10 ?m10 a’11 ?m11 b’11 ?m11 Add inputs a b a’ b’ Note that new inputs will never be explored in the a’ - b’ collaboration.

Science and Technology Norwegian University of NTNU Rolv Bræk, April Subtype ”anomaly” - given two compatible (here dual) roles a and b. Normally, subtypes a’ ~>a and b’~>b will be compatible. However, if all outputs are removed, they will not be compatible! Compatibility requires that containment and obligation be satisfied. Removing all output transitions from a state may violate obligation and result in a deadlock. Hence restricted sub-types cannot allways safely replace their super-types. The problem is restriction! a1 a2a3 a4 a6a7 a8 a5 a9 !m1!m2 ?m3?m4 ?m5 ?m6!m7!m8 b1 b2b3 b4 b6b7 b8 b5 b9 ?m1?m2 !m3!m4 !m5 !m6?m7?m8 a’1 a’2a’3 a’4 a’6a’7 a’8 a’5 a’9 !m1 !m2 ?m3?m4 ?m5 ?m6!m7!m8 b’1 b’2b’3 b’4 b’6b’7 b’8 b’5 b’9 ?m1?m2 !m3!m4 !m5 !m6?m7?m8 a b a’ b’

Science and Technology Norwegian University of NTNU Rolv Bræk, April What about liveness? Liveness require additional information: Separate property expressions (e.g. using Temporal Logic). Event goals and state goals attached to role behaviours. Collaboration goal expressions. The first is the classical approach used in modelchecking. The second and third are novel approaches that we seek to illuminate in this presentation.

Science and Technology Norwegian University of NTNU Rolv Bræk, April Role substitution examples Basic a-roles provide safety properties Progress labels provide (some) liveness

Science and Technology Norwegian University of NTNU Rolv Bræk, April Collaboration goals a1 a2a3a4 a6a7a8 a5 a9 !m1!m2?m3?m4 ?m6!m7!m8 b1 b2b3b4 b6b7b8 b5 b9 ?m1?m2!m3!m4 !m5!m6?m7 ?m8:b_eg1 a_sg2b_sg2 ?m5:a_eg1 a b ?m9 a_sg1b_sg1 !m9 c1 c2c3c4 c6c7c8 c5 c9 m1m2m3m4 m6m7 a_sg2 and b_sg2 m5:a_eg1 a-b m9 a_sg1b_sg1 m8:b_eg1 Collaboration goals are expressed in terms of role goals, e.g. c_sg2 = a_sg2 and b_sg2, c_eg1 = a_eg1 Collaboration goals specify goal obligations (desired goals) that shall be satisfied by the roles of the collaboration. Goal validation alternatives: modelchecking that a||b satisfy all collaboration goals checking that a-b satisfies all collaboration goals (The collaboration goals are satisfied in this example) a b a-b collaboration goals: c_eg1= a_eg1, c_sg1=a_sg1, c_sg2=a_sg2 and b_sg2;

Science and Technology Norwegian University of NTNU Rolv Bræk, April Goal categories: State Goal: a state assertion that shall hold in one or more role/collaboration states, regardless of how the state is reached (thus allowing many paths to the goal). Event Goal: a desired event (such as sending a message) produced by an action or transition. Event goals may be expressed using progress labels. Both categories of goals are considered useful. Both categories may have subgoals. A state goal, may have event sub-goals and v.v.

Science and Technology Norwegian University of NTNU Rolv Bræk, April Compatibility in collaboration occurrences Assume a collaboration with dual roles A and B. For each potential participant class: 1.Derive a-role 2.Ensure s-role consistency 3.Compare a-roles, select Ai, Bj such that: Ai ~> A and Bj ~> B and if restriction has been applied that Ai-Bj satisfies obligation and collaboration goals. Subtyping can be checked once for each participant type. Goal reachability can be checked once for each pair Ai, Bj of participant types. Need not be repeated for each instance. Note that the collaboration will be restricted only if the subtypes are restricted. Class_A1 S-roleA Class_B2 S-roleB service-a B A a Class_A2 S-roleA Class_B1 S-roleB b A2 A1 B1 B

Science and Technology Norwegian University of NTNU Rolv Bræk, April Static S-role composition Performed at design time, possibly by (partially) synthesising from a-roles. Services and features provided by the s-role should be reflected in goal and progress expressions and kept updated as the s-role evolves. The a-role consistency rules ensures that the s-role is internally consistent and that all goals and progresses are reachable! This avoids FI problems caused by ambiguous signals!? Dependecies among goals and progress on different a-roles (interfaces) are defined by the s-role behaviour. Can be explicitly expressed in state expressions and in larger collaborations!? Actor S-role C D ServiceX B A Terminal U T ServiceY goalT1, goalT2,... progressT1, progressT2,... goalX1, goalX2,... progressX1, progressX2,... goalY1, goalY2,... progressY1, progressY2,...

Science and Technology Norwegian University of NTNU Rolv Bræk, April Actor S-role C D Service X B A Service Y goalX1, goalX2,... progressX1, progressX2,... goalY1, goalY2,... progressY1, progressY2,... Termin al U T goalT1, goalT2,... progressT1, progressT2,... Static structure composition - ”horizontal” ProviderX X 1 Servic eX B A goalX1, goalX2,... progressX1, progressX2,... ProviderY Y 1 Servic eX D C goalY1, goalY2,... progressX1, progressX2,... Termi nal U T goalT1, goalT2,... progressT1, progressT2,... Term Trminal 1 a:Term b:Actor c:ProviderX d:ProviderY Note that a-role subtyping implies that all session goals and progress will be reachable! Feature interactions that violate safety and liveness rules are avoided!? Subtyping may result in goal and progress restrictions. Restrictions may directly reduce the reachable goals of the s-role and other collaborations of the same s-role. Restrictions may propagate through chains of a-roles linked by s- roles to indirectly restrict goals and progress on distant collaborations. This may unintentionally affect other features and is a kind of inverse FI. Information about the s-roles is required to analyse this – can it be provided in a distilled form? Using composite collaborations?? or s- role goal structures???

Science and Technology Norwegian University of NTNU Rolv Bræk, April Dynamic structure composition - ”horizontal” Dynamic links imply that roles are dynamically assigned to actors. This requires dynamic role management mechanisms for discovery, selection, adaptation and invocation. A large class of services are triggered in response to dynamic link requests (at least communication control services). There may be constraints on what actors are allowed to play given roles, e.g. B must be the individual identified by the called party identifier, B must have a given responsibility, B may be any object that can play the role. The state of an actor may determine what roles the actor is able to play at any given time, e.g. busy, free. Compatibility rules must be applied on dynamic liks to ensure goal and progress UserAgent Caller Call B A B A a b Terminal U T TerminalAgent POT 1 Terminal U T Ta: TerminalAgent Tb: TerminalAgent ua:UserAgent ub:UserAgent POT Caller callee POT Callee

Science and Technology Norwegian University of NTNU Rolv Bræk, April RAM.M – Service Engineering overview Actor implementation with metadata Service models: Collaborations with behaviour r2 r3 r1 > Service ececution environment design composition dynamic deployment Actor design with semantic interfaces (Automatic) code generation dynamic structure with dynamic discovery and composition methods and tools

Science and Technology Norwegian University of NTNU Rolv Bræk, April RAM.M Aspects Collaboration modelling: decomposing and composing collaborations collaboration goals collaboration behaviours semantic interfaces with goals and a-roles a-role composition synthesising s-role behaviours Designing Actors and Agents with semantic interfaces Dynamic discovery, selection, adaptation Formal foundation and tools