Context awareness and Resilience Engineering

23
Università degli Studi dell’Aquila Henry Muccini University of L’Aquila, Italy (www.henrymuccini.com , @muccinihenry) Dagstuhl Seminar 13022 "Engineering Resilient Systems: Models, Methods and Tools“, January 2013

description

This presentation outlines the role played by context-awareness when engineering a resilient system.

Transcript of Context awareness and Resilience Engineering

Page 1: Context awareness and Resilience Engineering

Università degli Studi dell’Aquila

Henry MucciniUniversity of L’Aquila, Italy (www.henrymuccini.com, @muccinihenry)

Dagstuhl Seminar 13022 "Engineering Resilient Systems: Models, Methods and Tools“, January 2013

Page 2: Context awareness and Resilience Engineering

The “context” of this presentation…

Investigation of the peculiarities of mobile applications

and implications on testing [AST 2012]

The mobile market is growing…

Henry Muccini, Antonio Di Francesco and Patrizio Esposito, Software Testing of Mobile Applications:

Challenges and Future Research Directions, in: 7th IEEE/ACM International Workshop on Automation of

Software Test (AST 2012) @ ICSE 2012, IEEE Digital Library, 2012

http://code.google.com/p/android/issues/list

Page 3: Context awareness and Resilience Engineering

and more…3

Architecting and Analysing Wireless Sensor Networks

Krishna Doddapaneni, Enver Ever, Ivano Malavolta, Leonardo Mostarda and Henry Muccini, A Model-

driven Engineering Framework to Support an Architecture-Driven Development and Analysis of WSNs,

in: Third Int. Workshop on SE for Sensor Network Applications (SESENA'12) @ ICSE 2012

Page 4: Context awareness and Resilience Engineering

Peculiarities and Implications on testing4

Type of Mobile

Application Peculiarity Implications on Testing

Apps4

Mobile

Mobile Connectivity Reliability, performance, security,

and functional testing through

different networks

Limited Resources Performance and functional

monitoring

Autonomy Monitoring for energy consumption

512 MB of RAM,

64 GB of disk space, and 1 Ghz dual core

CPU

Mobile Applications

MobileApps

Apps4

Mobile

User Interface GUI Testing

Context Awareness Context-dependent functional and

extra functional testing

Adaptation Adaptation correctness

New programming languages New white box and black-box

testing, byte-code analysis

New O.S.s Compatibility and O.S. testing

Diversity of phones and O.S.s Diversity coverage

Touch Screens Usability, and response to screen

touch

iPhone

New OS releases to increase autonomy

iPhone 4S:

200 hours autonomy in stand-by …drops to

9 hours when Wi-Fi is enabled … drops to

6 hours when a 3G connection is active

New OS releases to increase autonomy

1,800 different hw/sw

configurations

Page 5: Context awareness and Resilience Engineering

Peculiarities and Implications on testing5

Type of Mobile

Application Peculiarity Implications on Testing

Apps4

Mobile

Mobile Connectivity Reliability, performance, security,

and functional testing through

different networks

Limited Resources Performance and functional

monitoring

Autonomy Monitoring for energy consumption

Is the app going to work in any

environment and under any unpredictable

scenarios?

Mobile Applications

MobileApps

Apps4

Mobile

User Interface GUI Testing

Context Awareness Context-dependent functional and

extra functional testing

Adaptation Adaptation correctness

New programming languages New white box and black-box

testing, byte-code analysis

New O.S.s Compatibility and O.S. testing

Diversity of phones and O.S.s Diversity coverage

Touch Screens Usability, and response to screen

touch

Page 6: Context awareness and Resilience Engineering

6

CONTEXT-AWARE MOBILE APPLICATIONS

Page 7: Context awareness and Resilience Engineering

Context-Aware Computing

In context-aware computing, an application is aware of the computing environment in which it runs, and adapts/reactsaccording to its computing, user, physical, or time context[Schilit1994,Chen2000].

Schilit (1994)

•Computing context: e.g., the device connectivity, the

7

•Computing context: e.g., the device connectivity, the available bandwith, the outside resources the device may interact with.

•User context: the user’s feeling, his location, his prior actions.

•Physical context: includes the environment luminosity, noice, temperature, pressure, etc.

Page 8: Context awareness and Resilience Engineering

The context in this room

Computing context:

� Connectivity in this building

� Connectivity of our devices

User context:

� What happened this morning

� Mood

8

� Mood

� Degree of happiness/tiredeness/…

� Deadlines

Physical context:

� Luminosity

� Noice

� …

Page 9: Context awareness and Resilience Engineering

Context-aware (mobile) applications

FLYAQ Wii

9

busOnAir

Page 10: Context awareness and Resilience Engineering

Contextual Bugs: Interpretation-related11

input output

Device

movements

Values must be “interpreted”

and associated to “contextual info”

Page 11: Context awareness and Resilience Engineering

Our experimental framework12

Capture Replay

Monitoring

Upgrade

Black-box / design-time

White-box/ run-time

Page 12: Context awareness and Resilience Engineering

Our experience13

Page 13: Context awareness and Resilience Engineering

Contextual Bugs: bad assumptions!14

7:00 amBad assumption!!!

Page 14: Context awareness and Resilience Engineering

15

HOW THIS RELATES TO RESILIENCE?

Page 15: Context awareness and Resilience Engineering

16Computing/User/Physical context

Connectivity(3G, WiFi,

BT)

To accesscontextual

resourcesresources (printers, devices)BT)

SensorsTo get

contextual datadata

Page 16: Context awareness and Resilience Engineering

17

Data fromSensors

Data fromSensors

Re

sou

rce

sfr

om

Co

nn

ect

ivit

y

Sensors

Re

sou

rces

from

Co

nn

ectiv

ity

Page 17: Context awareness and Resilience Engineering

18

Avizienis, Laprie, Randell, Landwehr

[IEEE TDSC04]

“The persistence of dependability

when facing changes”

Laprie [DSN04]

Page 18: Context awareness and Resilience Engineering

[Strigini_Book]19

“ “resilience engineering” is about flexibility of people

and organisations, not just in reacting to individual

ability to recover to normality after a disturbance

and organisations, not just in reacting to individual

incidents and anomalous situations, but also in

learning from them and thus developing an ability to

react to the set of problems concretely occurring in

operation, even if not anticipated by designers of the

machinery or of the organisation”

Page 19: Context awareness and Resilience Engineering

Resources:

�signal strenght

�type of network

�devices around me

Data:

20 Engineering Resilient Context-aware systems = keeping the c-a

system persistently dependable when facing changes

Data:

�luminosity

�noice

�feeling

(since I move, or others move)

�mobility

�adaptivity by c-a

�variability

Strategies (for making c-a systems

resilient) builds on these

Page 20: Context awareness and Resilience Engineering

Resilience requirements

�The system availability shall not be less than 95% even

when “nodes” will move towards networks with different

speeds:

� I have to design my system so to continuously monitor the WiFi

networks around me and select those that overall guarantee 95%.

In case of no open network, I check with my 3G connectivity

22

In case of no open network, I check with my 3G connectivity

�The system must guarantee that data xxx remains

confidential even when operating through open networks;

�The system reliability/performance shall not go lower

than yy even when zz nodes are down

Page 21: Context awareness and Resilience Engineering

GM WOO23

Page 22: Context awareness and Resilience Engineering

Google Car24

Page 23: Context awareness and Resilience Engineering

25

Context-aware systems are subject to both functional, environmental, and technological changes and disturbancies.

Context-aware systems input data on which we mayhave made wrong assumptionsassumptions

All traditional dependabiliy issues apply, plus new

“context-awareness could be an important mechanism for

achieving resilience, while on the other hand that systems

that are intensely context-aware are intrinsically more

vulnerable to failure due to their high sensitivity to changes

in their environment.” [David Rosenblum]

All traditional dependabiliy issues apply, plus newrelated to the contextualcontextual (variable, unforeseenable, uncertain) naturenature of resources, assumptions, and data