Composition-based Interaction Design for Adaptable Distributed Software Systems Kenji Tei Assistant Professor, National Institute of Informatics
Self-Introduction : Kenji Tei Assistant professor at NII tei@nii.ac.jp http://researchmap.jp/teikenji Research Interests adaptive software system model-driven development, software architecture networked embedded systems especially wireless sensor networks recently IoT, wireless control systems, and robots GRACE Center 2
Distributed Software System Service-oriented (cloud) system robots network sensor network networked control system 3
Adaptive Systems self-adaptation systems that are able to modify their behavior and/or structure in response to their perception of the environment and the system itself, and their requirements Rogério de Lemos, et.al., Software Engineering for Self-Adaptive Systems: A Second Research Roadmap, SEAMS2011. Specification Domain properties(assumptions) S, D = R Goal/Requirement Adaptation S, D = R Modify S in response to changes in D to satisfy R off-line : Adaptive maintenance on-line : Self-adaptation Carlo Ghezzi, The fading boundary between development time and run time, SEAMS 2011 4
Our Focus self-adaptive software Analyze Analyze Analyze Plan Plan Plan monitoring Adaptation Engine Adaptable Software Monitor Monitor Monitor Execute Execute Execute effecting MAPE loops How to develop adaptable software to be adaptable? Adaptable software should be developed to support one or more solutions All solutions should be tightly related to requirements 5
Adaptable Software Development Req. analysis Architecture Design Detailed Design Impl. R S Analyze & Decide method level Conditional charged maintained level disposed Station Control loop for battery maintenance Analyze & Decide Analyze& Decide swept Object with Got close to Migration avoiding obstacles object direction picked up Object and Object Current obstacle found position Current position appearance position detected and cleaning Control loop for approaching object result bin Load Control loop for cleaning amount senddatatype = HUMIDITY senddatatype = ACCELERATION transmissioncondition = 10 min transmissioncondition = 30 sec compress = Huffman datatype = HUMIDITY datatype = ACCELERATION deploymentcondition = ALL deploymentcondition = ALL samplingcondition = 0.2 sec id = 141 id = 146 id = 153 location = 3F location = 3F location = 3F datatype = TEMPERATURE datatype = DEFORMATION deploymentcondition = ALL deploymentcondition = ALL : TemporalAggregationTask appearance unloaded Load capacity not Load amount into dustbin exceeded Analyze & Decide Control loop for load amount management senddatatype = TEMPERATURE transmissioncondition = 10 min senddatatype = DEFORMATION transmissioncondition = 10 min inputdatatype = DEFORMATION function = AVERAGE timewindow = 100 min duration = 10 min adaptation S Conditional swept picked up appearance and cleaning result appearance disposed Control loop for cleaning Analyze & Decide method charged Station Current position detected Analyze & Decide maintained Analyze& Decide Current position Object Object found Got close to object level Control loop for battery maintenance Migration direction Object position Control loop for approaching object Traceability links between R and S should be maintained Changes in S for adaptation should be localized level datatype = HUMIDITY datatype = TEMPERATURE senddatatype = HUMIDITY transmissioncondition = 10 min deploymentcondition = ALL id = 141 location = 3F deploymentcondition = ALL senddatatype = TEMPERATURE transmissioncondition = 10 min id = 146 location = 3F senddatatype = ACCELERATION transmissioncondition = 30 sec compress = Huffman deploymentcondition = ALL id = 153 location = 3F deploymentcondition = ALL senddatatype = DEFORMATION transmissioncondition = 10 min datatype = ACCELERATION samplingcondition = 0.2 sec datatype = DEFORMATION : TemporalAggregationTask inputdatatype = DEFORMATION function = AVERAGE timewindow = 100 min duration = 10 min
Architecture Design for Distributed Software Req. analysis Architecture Design Detailed Design Impl. method Conditional disposed charged Analyze & Decide maintained level level swept Analyze & Decide Station Control loop for battery maintenance Requirements (Goal) picked up appearance and cleaning result appearance Control loop for cleaning Analyze& Decide Current position detected Current position Object Object found Got close to object Structural models A A A A B B B B Interactions C C C C Migration direction Object position Control loop for approaching object Structure design component-based software structure component allocation to subsystems Behavior design interaction between subsystems local behavior in a subsystem Behavioral models
Traceablity between R and S to Localize Changes Structural view R Behavioral view S / Manager Drone Logger/ Robot/ / Manager Drone Logger/ cfp Robot/ / Manager Drone cfp Logger/ Robot/ cfp refuse6proposal refuse6proposal accept6proposal refuse6proposal accept6proposal Un;l/ accept6proposal Un;l/ Un;l/ Send6map Send6map Send6map Interaction 8
Importance of Interaction Design Interaction is usually designed to satisfy one or more requirements especially, for networked embedded system, reliability, performance, security, etc..., will be affected by interaction design One interaction is related to many concerns centralized/decentralized coordination, logging, compression, encryption, retransmission, etc 9
Room System Scenario 10
Less Traceability between R and S(Interaction) scattering interweaving Manager* Room* sensor * robot* Logging** server* Manager Mobile/ robot / robot/ Logging/ server/ cfp request auth5request refuse6proposal accept6proposal accept... Un:l* Un;l/ mapping hard to localize changes for adaptation 11
Our Approach : Composition-based Interaction Design (1) design a piece of interaction Base Obser ver request, Send, Send,map obseving 3 Robot3 Requeste Room* r Sensor request auth.request user.info accept Inrom.* Request er cfp propos e Mobile- Robot refuse2proposal accept2 proposal inform2 loop Sen der Failure0 Result Rece iver (2) automate compositions of interactions Manager* Room* sensor * robot* Logging** server* Manager Mobile/ robot / robot/ Logging/ server/ cfp request auth5request refuse6proposal accept6proposal accept... Un:l* Un;l/
Interaction Composition Complete interaction can be achieved by composing sub-interactions corresponding to a requirement Base Obse rver Roo mba Requ ester Dr Dr on on e e e Dron Drone Drone Leader Drone Rumba Logger request- Send- obseving cfp refuse-proposal cfp Send-map acceptproposal inform- Com pose refuse-proposal accept-proposal Until 処理が成功 loop Failure Result Send-map
Interaction Composition Complete interaction can be achieved by composing sub-interactions corresponding to a requirement Base Obse rver Roo mba Request R_Sen er sor request Drone Drone Leader Drone Rumba Logger request- Send- Send-map obseving auth-request user-info accept Inrom- Com pose request auth-request accept Until 処理が成功 loop Failure Result Send-map 14
Requ ester Dron e Ongoing Work : Composition-based Interaction Design Identify specifications of interaction pieces from goal model goal elaboration process to clarify requirements for interaction pieces, Compose interactions bind roles and data, and merge message sequences explore and find a composition satisfying all their constraints R. Takahashi, F.Ishikawa, K.Tei, and Y.Fukazawa: Intention-based Automated Composition Approach for Coordination Protocol, ICWS2013. Detailed behavior design and implementation should also be changed according to the changed interaction local behaviors and implementation are also designed to be composable Base Obser ver Room ba0 request, Send, obseving Send,map cfp Dro Dro ne ne Com pose refuse,proposal accept,proposal inform, 15
Summary Interaction is high level design decision about behavior of distributed software system one or more solutions exist for one requirement Adaptable software should be designed to support one or more interactions for each requirement however, traceability link between req. and interactions is unclear To clarify traceability between requirements and interactions, we adopt composition-based approach one requirement corresponds to one interaction piece complete interaction can be achieve by composing interaction pieces easy to change solutions of a certain requirement 16
Overview of works in NII Req. analysis Architecture Design Exploration of adaptation space Fuyuki Ishikawa Adaptation space analysis Detailed Design Impl. Traceability maintenance to localize changes Conditional swept picked up appearance and cleaning result appearance disposed Control loop for cleaning method Analyze & Decide Current position charged Station Current position detected Analyze & Decide maintained Analyze& Decide Object with avoiding obstacles unloaded into dustbin Got close to object Object and obstacle found level Control loop for battery maintenance bin Load capacity not exceeded Analyze & Decide Control loop for approaching object Control loop for load amount management adaptation Migration direction Object position Load amount Load amount level datatype = HUMIDITY datatype = TEMPERATURE senddatatype = HUMIDITY transmissioncondition = 10 min deploymentcondition = ALL id = 141 location = 3F deploymentcondition = ALL senddatatype = TEMPERATURE transmissioncondition = 10 min id = 146 location = 3F senddatatype = ACCELERATION transmissioncondition = 30 sec compress = Huffman deploymentcondition = ALL id = 153 location = 3F deploymentcondition = ALL senddatatype = DEFORMATION transmissioncondition = 10 min datatype = ACCELERATION samplingcondition = 0.2 sec datatype = DEFORMATION : TemporalAggregationTask inputdatatype = DEFORMATION function = AVERAGE timewindow = 100 min duration = 10 min Designing Self-adaptive System using Putback-based Bidirectional Programming Control Loops Shinichi Honiden Zhenjiang Hu Bidirectional Graph Transformation Infrastr and its Applications Soichiro Hidaka Change propagation Composition-based interaction design Conditional disposed Analyze & Decide swept for adaptable distributed software systems Kenji Tei picked up appearance and cleaning result appearance Control loop for cleaning method charged Station Current position detected Analyze & Decide maintained Analyze& Decide Current position Object Object found Got close to object level Control loop for battery maintenance Migration direction Object position Control loop for approaching object level senddatatype = HUMIDITY senddatatype = ACCELERATION transmissioncondition = 10 min transmissioncondition = 30 sec compress = Huffman datatype = HUMIDITY datatype = ACCELERATION deploymentcondition = ALL deploymentcondition = ALL samplingcondition = 0.2 sec id = 141 id = 146 id = 153 location = 3F location = 3F location = 3F datatype = TEMPERATURE datatype = DEFORMATION deploymentcondition = ALL deploymentcondition = ALL : TemporalAggregationTask inputdatatype = DEFORMATION senddatatype = TEMPERATURE senddatatype = DEFORMATION function = AVERAGE transmissioncondition = 10 min transmissioncondition = 10 min timewindow = 100 min duration = 10 min