23
Luca Berardinelli luca.berardinelli@un ivaq.it Flavia Di Paolo Flavia.dipaolo@univaq. it Antinisca Di Marco antinisca.dimarco@univ aq.it Dipartimento di Ingegneria e Scienze dell’Informazione e Matematica (DSIM) University of L’Aquila (ITALY) MICE: Monitoring and modelIng the Context Evolution Lyon 10/09/2012

MICE: Monitoring and modelIng of Context Evolution

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: MICE: Monitoring and modelIng of Context Evolution

Luca Berardinelli [email protected]

Flavia Di [email protected]

Antinisca Di [email protected]

Dipartimento di Ingegneria e Scienze dell’Informazione e Matematica (DSIM)University of L’Aquila (ITALY)

MICE:Monitoring and modelIng the

Context Evolution

Lyon10/09/2012

Page 2: MICE: Monitoring and modelIng of Context Evolution

• Keywords

• Motivations and Motivating Example

• Background: our context modeling and analysis approach

• The MICE Tool

• Ongoing and Future Works

• Conclusions

2

OUTLINE

Page 3: MICE: Monitoring and modelIng of Context Evolution

Context:

The heterogeneous information that the software system is capable to sense from itself or from the external environment that can influence the behavior of the services it provides.

Context Awareness:

The ability of the software system to sense the context in which it is executing and to change the behavior in response to changes of the sensed context.

Context Evolution:

The set of changes in the sensed context and their possible (cause-effect) relationships.

3

KEYWORDS

Page 4: MICE: Monitoring and modelIng of Context Evolution

4

MOTIVATIONS

• The Goal:

– Validation and refinement of (context) models at run-time, as the basis for• Predictive Analysis of QoS: predicting the QoS of a context-aware software

system within ranges of parameters that are not (yet!) experienced in practice;

• Proactive Context Evolution: provinding in advance QoS information so that the system adaptation is not blindly taken, but it can be QoS-aware

• Our Contribution: – MICE (Monitoring and modelIng the Context Evolution), a supporting tool

for our context modeling and analysis approach.

Page 5: MICE: Monitoring and modelIng of Context Evolution

MOTIVATING EXAMPLE

5

Platform Layer

PDAWirelessNetwork

TCP/IP

Mobile eHealthDoctorPatientService Layer

Request Patient InfoSend Alarm

Service Manager

Component Layer

Doc GUI Server App Beeper ClientDoc Client

home

surgery

open air

patient’s home

Mobile eHealth (MeH) is a mobile, component-based application for assisting doctors in their everyday activities through services running on their PDAs.

MeH Context may be (but not limited to) a combination of:• Physical Location of its users• Logical Location of its sw components• Configuration of its hardware resources

Page 6: MICE: Monitoring and modelIng of Context Evolution

6

BACKGROUND: CONTEXT MODELING

– An approach presented at FASE 2010

– Based on Awareness MANAGERs, a stochastic extension of Harel’s Statecharts• can be associated to any modeling element whose attributes contribute to define the application-

specific context where

• each state (partially) represents the actual context as a set of attribute values.

• transitions are triggered by the occurrence of certain event(s) when certain condition(s) are verified.

• Paramenters : Probabilities are associated to transitions.

• Assumption: Probabilities are exponentially distributed Markov Model (CTMC) Steady State probability vector may be associated to the state space (π probB)

Best PaperAward

Luca Berardinelli, Vittorio Cortellessa, Antinisca Di Marco: Performance Modeling and Analysis of Context-Aware Mobile Software Systems. FASE 2010

DSLsor

ELEMENT::Awareness Manager

attri=v

aattri=vb

AB

Context-relatedELEMENT

attr1…attri …attrn

tr. prob “,” event “/” [condition] “/” action

(π probB)

System Design Model

Page 7: MICE: Monitoring and modelIng of Context Evolution

7

BACKGROUND: CONTEXT MODELING IN MEHAwareness Manager examples for the MeH System…

…and an excerpt of their combination. At any time, the context of MeH is triple of three values

At design-time all the parameter are the transition probabilities (assumed) and the steady state probabilities (calculated).

Page 8: MICE: Monitoring and modelIng of Context Evolution

8

MICE: Moving AMs from design- to run-time

• Problem: collecting contextual data at run-time to continuously update the AMs– Req.1: MICE has to support our Context Modeling approach

– Req.2: The implementation effort should be appropriate w.r.t. the availability of human resources and their skills (few undergraduate/graduate students)

– Req.3: The maintenance effort should be as lower as possible (students usually leave the project after the end of the exam/thesis).

– Req.4: MICE has to reuse COTS as much as possible (it helps in satisfying Req.2 and 3).

Page 9: MICE: Monitoring and modelIng of Context Evolution

9

MICE: Moving AMs from design- to run-time

MICE is a composite and distributed system that includes three main components with the following roles:

• Monitor. It is in charge of collecting the heterogeneous data that are sensed by the context-aware application (e.g., the battery level or the CPU frequency). The raw data are then sent to a remote Context Data Repository.

• Context Data Repository. It collects the contextual data sent by any Monitor and makes them available for further elaborations.

• Modeling Component. It retrieves data from a Context Data Repository and elaborates them to generate context models (i.e. AMs).

Page 10: MICE: Monitoring and modelIng of Context Evolution

10

MICE: Moving AMs from design- to run-time

Monitoring Component(Battery Status Cosm)Context Data

Repository(Cosm Web Service)

HTTPModeling Component

Context Model API(EMF-based API)

MICE

• Monitor: Battery Status (COTS)

• Context Data Repository: Cosm (COTS)

• Modeling Component: Context Model API (in-house)

Page 11: MICE: Monitoring and modelIng of Context Evolution

11

MICE: Moving AMs from design- to run-time

PDA (Android Device)

Context Aware System (MeH Client)

Monitoring Component(Battery Status Cosm)

Battery WiFi Card

Screen

le

vel (

%)

on

/off

on

/off

te

mp

(°C)

pl

ugge

d (1

/0)

https://play.google.com/store/apps/details?id=nfcf.BatteryStatus&hl=en

Keep track of your battery information.

This app runs in the background collecting you battery level, voltage, temperature and plugged state and sends this information to your Cosm account.

Additional data is also collected:- Screen brightness- Network status- Phone Call state- WiFi on/off- Bluetooth on/off- Data transferred

Monitor: Battery Status App (COTS)

Page 12: MICE: Monitoring and modelIng of Context Evolution

12

HTTP

MICE: Moving AMs from design- to run-time

https://cosm.com/how_it_works

Context Data Repository

(Cosm Web Service)

Raw Data (feed)

Cosm-enabled device

Raw Data (feed)

Cosm-enabled deviceCosm-enabled devicefeed

Cosm is a RESTful Web service that, through the HTTP protocol, allows the publication (POST) and retrieval (GET) of sensor-derived contextual data to/from the Web.

The whole heterogeneous contextual data collected from a Cosm-enabled device is organized in feeds. The latter are divided in (typed) datastreams that, in turn, are composed by datapoints, each representing a single value of a datastream at a specific point in time.

Any feed on Cosm belongs to a registered user that may decide to keep them private or public.

Context Data Repository: Cosm (COTS)

Page 13: MICE: Monitoring and modelIng of Context Evolution

13

MICE: Moving AMs from design- to run-time

https://cosm.com/how_it_works

Context Data Repository: Cosm (COTS)

Battery Level: 35 (%)at Aug 15 20:01:15

Plugged: 1 (true)at Aug 15 20:01:15

Data Not Collected

Page 14: MICE: Monitoring and modelIng of Context Evolution

14

MICE: Moving AMs from design- to run-time

http://code.google.com/a/eclipselabs.org/p/context-manager/

Modeling Component (in house)

Modeling Component

Context Model API(EMF-based API)

It includes a

- Parameters Extractor that sets the state-steady probabilities π of the modeled Manager by processing the real data collected by the Monitoring Component.

- Context Manager Editor that allows the modeling of the Managers

They are both based on a Context Model API

Manager(s)

Page 15: MICE: Monitoring and modelIng of Context Evolution

15

MICE: Moving AMs from design- to run-time

Context Model API has been automatically obtained from a Ecore-based AM Metamodel

Page 16: MICE: Monitoring and modelIng of Context Evolution

16

MICE: Moving AMs from design- to run-time

Modeling Component: Context Model API (in-house)

Modeling Component

Context Model API(EMF-based API)

The Modeling Component has been implemented from scratch in Java. It is composed by a Context Manager Editor that allows the modeling of the Managers, plus a Parameters Extractor that sets the state-steady probabilities π of the modeled Manager by processing the real data collected by the Monitoring Component.

The Parameter Extractor retrieves the raw monitored data stored in the Context Repository COTS and then calculates the state-steady probabilities from the sojourn times in the identified awareness states.

http://code.google.com/a/eclipselabs.org/p/context-manager/

Thanks to Giovanni Di Santo (Context Editor, Bachelor Thesis)

Page 17: MICE: Monitoring and modelIng of Context Evolution

17

JVM-compatible Device

PDA (Android Device)

Context Aware System (MeH Client)

Battery WiFi Card

Screen

MICE: Moving AMs from design- to run-time

Monitoring Component(Battery Status Cosm)Context Data

Repository(Cosm Web Service)

Raw Data (feed)

HTTP

le

vel (

%)

on

/off

on

/off

te

mp

(°C)

Modeling Component

Context Model API(EMF-based API)

Raw Data (feed)

MICEfeed

plug

ged

(1/0

)Cosm-enabled deviceCosm-enabled deviceCosm-enabled device

Thanks to Flavia Di Paolo

(co-author)(MICE, Bachelor

Thesis)

MICE at a glance

Manager(s)

Page 18: MICE: Monitoring and modelIng of Context Evolution

18

MICE@WORK: MeH Running Example

The following list summarizes the main steps that have been undertaken to set up the running example (Mice v.1):

• We created a Cosm account;

• We installed, set up and started the BatteryStatus application on two Android devices so that new datapoint were sent by BatteryStatus every 15 minutes;

• We retrieved from Cosm the up-to-date collection of level datapoints of the latest 30 calendar days (as a CSV file).

• We set a user-defined percentage threshold, for example strictly greater than 25%, and coupled each level datapoint with the high power or the low power awareness states, respectively;

Battery Level: 35 (%)at Aug 15 20:01:15

Data Not Collected

25% threshold

High Power

Low Power

MICE v1

Page 19: MICE: Monitoring and modelIng of Context Evolution

19

MICE@WORK: MeH Running Example

• We calculated the sojourn times in the high and low power states by counting the number of couples, each corresponding to a time slot of 15 minutes, assigned to the high and low power awareness states.

• Given the total amount of minutes in a single day (1440) and in a month of 31 days (46400) we calculated the percentage of time spent in high and low power (i) during the latest monitored day at the time of writing and (ii) in the latest monitored month.

MICE v1

Page 20: MICE: Monitoring and modelIng of Context Evolution

20

ONGOING AND FUTURE WORKS

• We are combining different datastreams (e.g., level and plugged) to create more complex Awareness Managers.

MICE v2

Battery Level: 35 (%)at Aug 15 20:01:15

Plugged: 1 (true)at Aug 15 20:01:15

Data Not Collected

25%

High Power

Low Power

Under Charge

Page 21: MICE: Monitoring and modelIng of Context Evolution

21

ONGOING AND FUTURE WORKS

• We are formalizing the proposed context modeling notation to suitably combine ( ◦ ) two or more Awareness Managers, including remote firings (i.e. AM dependencies), into a multi-attribute Context Manager that still remains a valid Markov Model.

• We are combining Context, Design and Analysis Models at run-time. We already combine these different kind of models but at design-time (NFPinDSML@Models 2009)

Page 22: MICE: Monitoring and modelIng of Context Evolution

22

CONCLUSIONS

• We presented MICE, a distributed tool for monitoring and modeling the context evolution;

• It is meant to support an existing Context Modeling and Analysis Approach presented at FASE 2010;

• MICE exploits existing COTS to reduce its implementation and maintenance efforts so making it suitable for undergraduate and graduate students

• MICE is an ongoing work available at http://code.google.com/a/eclipselabs.org/p/context-manager/ Thanks for your attention.

Questions and suggestions are very welcome

Page 23: MICE: Monitoring and modelIng of Context Evolution

23