+ All Categories
Home > Documents > Composition-based Interaction Design for...

Composition-based Interaction Design for...

Date post: 06-Jul-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
17
Composition-based Interaction Design for Adaptable Distributed Software Systems Kenji Tei Assistant Professor, National Institute of Informatics
Transcript
Page 1: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Composition-based Interaction Design for Adaptable Distributed Software Systems

Kenji Tei Assistant Professor, National Institute of Informatics

Page 2: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Self-Introduction : Kenji Tei•  Assistant professor at NII

–  [email protected] –  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

2

GRACE Center �

Page 3: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Distributed Software System

3

robots

networked control system

sensor network

Service-oriented (cloud) system

network

Page 4: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

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.

4

D,S |= RGoal/Requirement

SpecificationDomain properties(assumptions)

D’|= RS’,

Modify S in response to changes in D to satisfy R

off-line : Adaptive maintenance

on-line : Self-adaptation

Adaptation

Carlo Ghezzi, The fading boundary between development time and run time, SEAMS 2011

Page 5: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Our Focus

5

Adaptation Engine

Adaptable Software

effectingmonitoring

self-adaptive software

Monitor

Analyze Plan

Execute Monitor

Analyze Plan

Execute Monitor

Analyze Plan

Execute

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

Page 6: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Adaptable Software Development

Control loop for cleaning�

Collect�

Battery maintained

Object found�

Battery level observed�

Battery charged�

Current position detected�

Dust disposed�

Dust picked up�

Dust swept�

Dust appearance and cleaning result

observed�

Analyze �& Decide�

Analyze & Decide�Conditional Act�

Act� Collect�

Got close to object�

Analyze& Decide�

Collect�

Control loop for battery maintenance�

Object reachable�

Act�Collect�

Dust reachable

Station reachable

Act�

Act�

Control loop for approaching object�

Dust appearance�

Cleaning result�

Cleaning method�

Battery level�

Migration direction�

Object position

Current position�

���

Collect�

Battery maintained

Object and obstacle found�

Battery level observed�

Battery charged�

Current position detected�

Dust disposed�

Dust picked up�

Dust swept�

Dust appearance and cleaning

result observed�

Analyze �& Decide�

Analyze & Decide�

Conditional Act�

Act� Collect�

Got close to object�

Analyze& Decide�

Collect�

Control loop for battery maintenance�

Object reachable with

avoiding obstacles�

Act�

Load capacity not exceeded

Load amount observed�

Dust unloaded into dustbin�

Analyze & Decide�Act� Collect�Control loop for load amount management�

Collect�

Dustbin reachable�

Dust reachable

Station reachable

Act�

Act�

Act�

Control loop for approaching object�

Dust appearance�

Cleaning result�

Control loop for cleaning�

Cleaning method�

Battery level�

Migration direction�

Object position

Current position�

Load amount�

Traceability links between R and S should be maintained Changes in S for adaptation should be localized

adaptation

Architecture Design

Detailed Design

Req. analysis Impl.

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = TEMPERATUREprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = TEMPERATURE

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = HUMIDITYprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = HUMIDITY

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = HuffmantransmissionCondition = 30 secsendDataType = ACCELERATIONprotocol = CTP

: SendingTask

samplingCondition = 0.2 secdataType = ACCELERATION

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = DEFORMATIONprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = DEFORMATION

: SamplingTask

duration = 10 mintimeWindow = 100 minfunction = AVERAGEinputDataType = DEFORMATION

: TemporalAggregationTask

location = 3Fid = 153

: Node

location = 3Fid = 141

: Node

location = 3Fid = 146

: Node

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = TEMPERATUREprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = TEMPERATURE

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = HUMIDITYprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = HUMIDITY

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = HuffmantransmissionCondition = 30 secsendDataType = ACCELERATIONprotocol = CTP

: SendingTask

samplingCondition = 0.2 secdataType = ACCELERATION

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = DEFORMATIONprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = DEFORMATION

: SamplingTask

duration = 10 mintimeWindow = 100 minfunction = AVERAGEinputDataType = DEFORMATION

: TemporalAggregationTask

location = 3Fid = 153

: Node

location = 3Fid = 141

: Node

location = 3Fid = 146

: Node

SR

S’

Page 7: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Architecture Design for Distributed Software

Architecture Design

Detailed Design Impl.

Structural models

Req. analysis

Control loop for cleaning�

Collect�

Battery maintained

Object found�

Battery level observed�

Battery charged�

Current position detected�

Dust disposed�

Dust picked up�

Dust swept�

Dust appearance and cleaning result

observed�

Analyze �& Decide�

Analyze & Decide�Conditional Act�

Act� Collect�

Got close to object�

Analyze& Decide�

Collect�

Control loop for battery maintenance�

Object reachable�

Act�Collect�

Dust reachable

Station reachable

Act�

Act�

Control loop for approaching object�

Dust appearance�

Cleaning result�

Cleaning method�

Battery level�

Migration direction�

Object position

Current position�

Requirements (Goal)

Behavioral models

A C B

Interactions

A C B A C B A C B

Structure design ・  component-based software structure ・ component allocation to subsystems Behavior design ・ interaction between subsystems ・ local behavior in a subsystem

Page 8: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Traceablity between R and S to Localize Changes

•  Structural view

8

Goal model Architectural structure SR

•  Behavioral viewcfp�

Manager� Drone� Cleaning/Robot/

mapping�Send6map�

Cleaning�

observe�

propose�

refuse�alt�

accept6proposal�

refuse6proposal�alt�

result�

failure�alt�

Un;l/������

Logger/

? cfp�

Manager� Drone� Cleaning/Robot/

mapping�Send6map�

Cleaning�

observe�

propose�

refuse�alt�

accept6proposal�

refuse6proposal�alt�

result�

failure�alt�

Un;l/������

Logger/

cfp�

Manager� Drone� Cleaning/Robot/

mapping�Send6map�

Cleaning�

observe�

propose�

refuse�alt�

accept6proposal�

refuse6proposal�alt�

result�

failure�alt�

Un;l/������

Logger/

Interaction

Page 9: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

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

Page 10: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Room Cleaning System Scenario

10

Page 11: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Less Traceability between R and S(Interaction)

11

cfp�

Manager* Room*sensor�

Cleaning*robot*

mapping�Send6map�

Cleaning�

observe�

propose�

refuse�alt�

accept6proposal�

refuse6proposal�alt�

result�

failure�alt�

Un:l*������

Logging**server*

interweaving

request�

Manager� Mobile/robot�

Cleaning/robot/

mapping�Send5map�

Cleaning�

observe�

propose�

auth5request�

accept�

refuse�alt�

result�

failure�alt�

Un;l/������

Logging/server/

...

scattering

hard to localize changes for adaptation

Page 12: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Our Approach : Composition-based Interaction Design

Base� Observer�

request,observe�

Cleaning3Robot3

Send,result�mapping�

Send,map�

obseving�

Requester�

Mobile-Robot�

cfp�

propose�

refuse�alt�

accept2proposal�

refuse2proposal�alt�

inform2result�observe�

Requester�

Room*Sensor�

request�

Inrom.*result�observe�

auth.request�user.info�

accept�

refuse�alt�

Sender�

Receiver�

Result�

Failure0�alt�

loop�

cfp�

Manager* Room*sensor�

Cleaning*robot*

mapping�Send6map�

Cleaning�

observe�

propose�

refuse�alt�

accept6proposal�

refuse6proposal�alt�

result�

failure�alt�

Un:l*������

Logging**server*

request�

Manager� Mobile/robot�

Cleaning/robot/

mapping�Send5map�

Cleaning�

observe�

propose�

auth5request�

accept�

refuse�alt�

result�

failure�alt�

Un;l/������

Logging/server/

...

(1) design a piece of interaction

(2) automate compositions of interactions

Page 13: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Interaction Composition

•  Complete interaction can be achieved by composing sub-interactions corresponding to a requirement

Base Observer

request-observe

Roomba

Send-resultmapping

Send-map

obseving

Result

Failure alt

loop

Drone

Drone

Requester

Drone

cfp

propose

refusealt

accept-proposal

refuse-proposalalt

inform-result observe

cfp

DroneDroneLeader Drone Rumba

mappingSend-map

Cleaning

observe

propose

refusealt

accept-proposal

refuse-proposalalt

result

failurealtUntil 処理が成功

Logger

Compose

Page 14: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Interaction Composition

14

Base Observer

request-observe

Roomba

Send-resultmapping

Send-map

obseving

Result

Failure alt

loop

Compose

Requester

R_Sensor

request

Inrom- resultobserve

auth-requestuser-info

accept

refusealt

request

DroneDroneLeader Drone Rumba

mappingSend-map

Cleaning

observe

propose

auth-request

accept

refusealt

result

failurealt

Until 処理が成功

Logger

•  Complete interaction can be achieved by composing sub-interactions corresponding to a requirement

Page 15: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

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

•  Detailed behavior design and implementation should also be changed according to the changed interaction –  local behaviors and implementation are also designed to be

composable

15

R. Takahashi, F.Ishikawa, K.Tei, and Y.Fukazawa: Intention-based Automated Composition Approach for Coordination Protocol, ICWS2013.

Base� Observer�

request,observe�

Roomba0

Send,result�mapping�

Send,map�

obseving�

Drone�

Drone�

Requester�

Drone�

cfp�

propose�

refuse�alt�

accept,proposal�

refuse,proposal�alt�

inform,result�observe�

Compose�

Page 16: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

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

Page 17: Composition-based Interaction Design for …webhome.cs.uvic.ca/~hausi/EASSy2013/Tei-Shonan-2013-Sep...– model-driven development, software architecture – networked embedded systems

Overview of works in NII

Control loop for cleaning�

Collect�

Battery maintained

Object found�

Battery level observed�

Battery charged�

Current position detected�

Dust disposed�

Dust picked up�

Dust swept�

Dust appearance and cleaning result

observed�

Analyze �& Decide�

Analyze & Decide�Conditional Act�

Act� Collect�

Got close to object�

Analyze& Decide�

Collect�

Control loop for battery maintenance�

Object reachable�

Act�Collect�

Dust reachable

Station reachable

Act�

Act�

Control loop for approaching object�

Dust appearance�

Cleaning result�

Cleaning method�

Battery level�

Migration direction�

Object position

Current position�

���

Collect�

Battery maintained

Object and obstacle found�

Battery level observed�

Battery charged�

Current position detected�

Dust disposed�

Dust picked up�

Dust swept�

Dust appearance and cleaning

result observed�

Analyze �& Decide�

Analyze & Decide�

Conditional Act�

Act� Collect�

Got close to object�

Analyze& Decide�

Collect�

Control loop for battery maintenance�

Object reachable with

avoiding obstacles�

Act�

Load capacity not exceeded

Load amount observed�

Dust unloaded into dustbin�

Analyze & Decide�Act� Collect�Control loop for load amount management�

Collect�

Dustbin reachable�

Dust reachable

Station reachable

Act�

Act�

Act�

Control loop for approaching object�

Dust appearance�

Cleaning result�

Control loop for cleaning�

Cleaning method�

Battery level�

Migration direction�

Object position

Current position�

Load amount�

・Exploration of adaptation space Fuyuki Ishikawa

・Composition-based interaction design for adaptable distributed software systems Kenji Tei

Adaptation space analysis

Traceability maintenance to localize changes

adaptation

Architecture Design

Detailed Design

Req. analysis Impl.

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = TEMPERATUREprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = TEMPERATURE

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = HUMIDITYprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = HUMIDITY

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = HuffmantransmissionCondition = 30 secsendDataType = ACCELERATIONprotocol = CTP

: SendingTask

samplingCondition = 0.2 secdataType = ACCELERATION

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = DEFORMATIONprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = DEFORMATION

: SamplingTask

duration = 10 mintimeWindow = 100 minfunction = AVERAGEinputDataType = DEFORMATION

: TemporalAggregationTask

location = 3Fid = 153

: Node

location = 3Fid = 141

: Node

location = 3Fid = 146

: Node

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = TEMPERATUREprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = TEMPERATURE

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = HUMIDITYprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = HUMIDITY

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = HuffmantransmissionCondition = 30 secsendDataType = ACCELERATIONprotocol = CTP

: SendingTask

samplingCondition = 0.2 secdataType = ACCELERATION

: SamplingTask

deploymentCondition = ALL

: MemberRole

encryption = NONEcompress = NONEtransmissionCondition = 10 minsendDataType = DEFORMATIONprotocol = CTP

: SendingTask

samplingCondition = 10 mindataType = DEFORMATION

: SamplingTask

duration = 10 mintimeWindow = 100 minfunction = AVERAGEinputDataType = DEFORMATION

: TemporalAggregationTask

location = 3Fid = 153

: Node

location = 3Fid = 141

: Node

location = 3Fid = 146

: Node

・Putback-based Bidirectional Programming Zhenjiang Hu ・Bidirectional Graph Transformation Infrastructure and its Applications Soichiro Hidaka

Change propagation

・Designing Self-adaptive System using Control Loops Shinichi Honiden


Recommended