mice: monitoring and modeliing the context evolution

22
Luca Berardinelli [email protected] Flavia Di Paolo [email protected] An3nisca Di Marco [email protected] Dipar4mento di Ingegneria e Scienze dell’Informazione e Matema4ca (DISIM) University of L’Aquila (ITALY) MICE: Monitoring and modelIng the Context Evolu4on Lyon 10/09/2012

Upload: fet-aware-project-self-awareness-in-autonomic-systems

Post on 12-Jan-2015

192 views

Category:

Education


0 download

DESCRIPTION

Presentation by Luca Berardinelli, Antinisca Di Marco and Flavia Di Paolo at the 2nd Awareness Workshop on Challenges for Achieving Self-awareness in Autonomic Systems @ SASO 2012, Lyon, France

TRANSCRIPT

Page 1: MICE: Monitoring and modelIing the Context Evolution

Luca  Berardinelli      [email protected]  

Flavia  Di  Paolo  [email protected]    

An3nisca  Di  Marco  [email protected]  

Dipar4mento  di  Ingegneria  e  Scienze  dell’Informazione  e  Matema4ca  (DISIM)  University  of  L’Aquila  (ITALY)  

MICE:  Monitoring  and  modelIng  the  

Context  Evolu4on  Lyon  

10/09/2012  

Page 2: MICE: Monitoring and modelIing the Context Evolution

•  Keywords  •  Mo4va4ons  and  Mo4va4ng  Example  

•  Background:  our  context  modeling  and  analysis  approach  

•  The  MICE  Tool  

•  Ongoing  and  Future  Works  

•  Conclusions  

2  

OUTLINE  

Page 3: MICE: Monitoring and modelIing the Context Evolution

Context:    The  heterogeneous  informa3on  that  the  soXware  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  soXware  system  to  sense  the  context  in  which  it  is  execu4ng  and  to  change  the  behavior  in  response  to  changes  of  the  sensed  context.  

 

Context  Evolu3on:    The  set  of  changes  in  the  sensed  context  and  their  possible  (cause-­‐effect)  rela4onships.    

3  

KEYWORDS  

Page 4: MICE: Monitoring and modelIing the Context Evolution

MOTIVATIONS  

•  The  Goal:    –  Valida,on  and  refinement  of  (context)  models  at  run-­‐,me,  as  the  basis  for  

•  Predic/ve  Analysis  of  QoS:  predic4ng  the  QoS  of  a  context-­‐aware  soXware  system  within  ranges  of  parameters  that  are  not  (yet!)  experienced  in  prac4ce;  

•  Proac/ve  Context  Evolu/on:  provinding  in  advance  QoS  informa4on  so  that  the  system  adapta4on  is  not  blindly  taken,  but  it  can  be  QoS-­‐aware  

•  Our  Contribu,on:    –  MICE  (Monitoring  and  modelIng  the  Context  Evolu4on),  a  suppor4ng  tool  

for  our  context  modeling  and  analysis  approach.  

4  

Page 5: MICE: Monitoring and modelIing the Context Evolution

MOTIVATING  EXAMPLE  

5  

PlaBorm  Layer  

PDA  Wireless  Network  

TCP/IP  

Mobile  eHealth  Doctor  Pa3ent  Service  Layer  

Request  Pa3ent  Info  Send  Alarm  

Service  Manager  

Component  Layer  

Doc  GUI   Server  App   Beeper  Client  Doc  Client  

home  

surgery  open  air  

pa3ent’s  home  

Mobile  eHealth  (MeH)  is  a  mobile,  component-­‐based  applica4on  for  assis4ng  doctors  in  their  everyday  ac4vi4es  through  services  running  on  their  PDAs.  

MeH  Context  may  be  (but  not  limited  to)  a  combina3on  of:  •   Physical  Loca4on  of  its  users  •   Logical  Loca4on  of  its  sw  components  •   Configura4on  of  its  hardware  resources  

Page 6: MICE: Monitoring and modelIing the Context Evolution

BACKGROUND:  CONTEXT  MODELING  

–  An  approach  presented  at  FASE  2010      

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

applica4on-­‐specific  context  where  

•  each  state  (par4ally)  represents  the  actual  context  as  a  set  of  ajribute  values.  

•  transi,ons  are  triggered  by  the  occurrence  of  certain  event(s)  when  certain  condi4on(s)  are  verified.      

•  Paramenters  :  Probabili3es  are  associated  to  transi4ons.  

•  Assump3on:  Probabili3es  are  exponen3ally  distributed  à  Markov  Model  (CTMC)  à  Steady  State  probability  vector  may  be  associated  to  the  state  space  (π  probB)  

6  

Best  Paper  Award  

Luca  Berardinelli,  Vijorio  Cortellessa,  An4nisca  Di  Marco:  Performance  Modeling  and  Analysis  of  Context-­‐Aware  Mobile  SoXware  Systems.  FASE  2010  

DSLs  or  

ELEMENT::Awareness Manager

attri=va attri=vb

A B

Context-­‐related  ELEMENT  

a@r1…aCri  …a@rn  

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

(π probB)

System  Design  Model    

Page 7: MICE: Monitoring and modelIing the Context Evolution

BACKGROUND:  CONTEXT  MODELING  IN  MEH  

7  

Awareness  Manager  examples  for  the  MeH  System…  

…and  an  excerpt  of  their  combina4on.  At  any  4me,  the  context  of  MeH  is  triple  of  three  values  

At  design-­‐4me  all  the  parameter  are  the  transi4on  probabili4es  (assumed)  and  the  steady  state  probabili4es  (calculated).  

Page 8: MICE: Monitoring and modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    •  Problem:  collec4ng  contextual  data  at  run-­‐4me  to  con4nuously  update  the  AMs  –  Req.1:  MICE  has  to  support  our  Context  Modeling  approach  –  Req.2:  The  implementa4on  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  aXer  the  end  of  the  exam/thesis).    

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

 

8  

Page 9: MICE: Monitoring and modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    MICE  is  a  composite  and  distributed  system  that  includes  three  main  components  with  the  following  roles:  

•      Monitor.  It  is  in  charge  of  collec4ng  the  heterogeneous  data  that  are  sensed  by  the  context-­‐aware  applica4on  (e.g.,  the  bajery  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  elabora4ons.  

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

9  

Page 10: MICE: Monitoring and modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    

10  

Monitoring  Component  (Ba@ery  Status  Cosm)  Context  Data    

Repository  (Cosm  Web  Service)  

HTTP  Modeling  Component  

Context  Model  API  (EMF-­‐based  API)  

MICE  

•      Monitor:  Bajery  Status  (COTS)  

•      Context    Data    Repository:  Cosm  (COTS)  

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

Page 11: MICE: Monitoring and modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    

11  

PDA  (Android  Device)  

Context  Aware  System    (MeH  Client)  

Monitoring  Component  (Ba@ery  Status  Cosm)  

BaYery   WiFi  Card  

Screen  

ßlevel  (%)  

ßon

/off  

ßon

/off  

ßtemp  (°C)  

ßplugged  (1/0)  

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

Keep  track  of  your  bajery  informa4on.    This  app  runs  in  the  background  collec4ng  you  bajery  level,  voltage,  temperature  and  plugged  state  and  sends  this  informa3on  to  your  Cosm  account.    Addi4onal  data  is  also  collected:  -­‐  Screen  brightness  -­‐  Network  status  -­‐  Phone  Call  state  -­‐  WiFi  on/off  -­‐  Bluetooth  on/off  -­‐  Data  transferred  

Monitor:  Bajery  Status  App  (COTS)  

Page 12: MICE: Monitoring and modelIing the Context Evolution

HTTP  

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    

12  

hjps://cosm.com/how_it_works  

Context  Data    Repository  (Cosm  Web  Service)  

ßRaw  Data  (feed)  

Cosm-­‐enabled  device  

Raw  Data  (feed)à  

Cosm-­‐enabled  device  Cosm-­‐enabled  device  feedà

 

Cosm   is   a  RESTful  Web   service   that,   through  the   HTTP   protocol,   allows   the   publica4on  (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   lajer   are   divided   in  (typed)   datastreams   that,   in   turn,   are  composed  by  datapoints,   each   represen4ng  a  single  value  of  a  datastream  at  a  specific  point  in  4me.      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 modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    

13  

hjps://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 modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    

14  

hjp://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  probabili4es  π    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 modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    Context  Model  API  has  been  automa4cally  obtained  from  a  Ecore-­‐based  

AM  Metamodel  

15  

Page 16: MICE: Monitoring and modelIing the Context Evolution

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    

16  

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  probabili3es  π    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  probabili4es  from  the  sojourn  4mes  in  the  iden4fied  awareness    states.      

hjp://code.google.com/a/eclipselabs.org/p/context-­‐manager/  

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

Page 17: MICE: Monitoring and modelIing the Context Evolution

JVM-­‐compa4ble  Device  

PDA  (Android  Device)  

Context  Aware  System    (MeH  Client)  

BaYery   WiFi  Card  

Screen  

MICE:  Moving  AMs  from  design-­‐  to  run-­‐4me    

17  

Monitoring  Component  (BaCery  Status  Cosm)  Context  Data    

Repository  (Cosm  Web  Service)  

ßRaw  Data  (feed)  

HTTP  

ßlevel  (%)  

ßon

/off  

ßon

/off  

ßtemp  (°C)  

Modeling  Component  

Context  Model  API  (EMF-­‐based  API)  

Raw  Data  (feed)à  

MICE  feedà

 

ßplugged  (1/0)  

Cosm-­‐enabled  device  Cosm-­‐enabled  device  Cosm-­‐enabled  device  

Thanks  to    Flavia  Di  Paolo    (co-­‐author)  

(MICE,  Bachelor  Thesis)  

MICE  at  a  glance  

Manager(s)à

 

Page 18: MICE: Monitoring and modelIing the Context Evolution

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  BaYeryStatus  applica4on  on  two  Android  

devices  so  that  new  datapoint  were  sent  by  BajeryStatus  every  15  minutes;  

•  We  retrieved  from  Cosm  the  up-­‐to-­‐date  collec4on  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,  respec4vely;  

18  

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 modelIing the Context Evolution

MICE@WORK:  MeH  Running  Example    •  We  calculated  the  sojourn  3mes  in  the  high  and  low  power  states  by  

coun4ng  the  number  of  couples,  each  corresponding  to  a  4me  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  3me  spent  in  high  and  low  power  (i)  during  the  latest  monitored  day  at  the  4me  of  wri4ng  and  (ii)  in  the  latest  monitored  month.  

19  

MICE  v1  

Page 20: MICE: Monitoring and modelIing the Context Evolution

ONGOING  AND  FUTURE  WORKS    •  We  are  combining  different  datastreams  (e.g.,  level  and  plugged)  to  

create  more  complex  Awareness  Managers.  

20  

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 modelIing the Context Evolution

ONGOING  AND  FUTURE  WORKS    •  We  are  formalizing  the  proposed  context  modeling  nota3on  to  suitably  

combine  (  ◦  )  two  or  more  Awareness  Managers,  including  remote  firings  (i.e.  AM  dependencies),  into  a  mul4-­‐ajribute  Context  Manager  that  s4ll  remains  a  valid  Markov  Model.  

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

21  

Page 22: MICE: Monitoring and modelIing the Context Evolution

CONCLUSIONS    •  We  presented  MICE,  a  distributed  tool  for  monitoring  and  

modeling  the  context  evolu4on;  

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

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

•  MICE  is  an  ongoing  work  available  at  hjp://code.google.com/a/eclipselabs.org/p/context-­‐manager/  

 

22  

Thanks  for  your  a@en/on.  Ques/ons  and  sugges/ons  are  very  welcome