Luca Berardinelli luca.berardinelli@un ivaq.it Dep. of Computer Science University of Vittorio Cortellessa vittorio.cortellessa@u nivaq.it Dep. of Computer Science University of L’Aquila Antinisca Di Marco antinisca.dimarco@univ aq.it Dep. of Computer Science University of L’Aquila PACO Meeting (Camerino) EXTRA-FUNCTIONAL MODELING & ANALYSIS OF CONTEXT-AWARE MOBILE SOFTWARE SYSTEMS
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Luca Berardinelli [email protected]. of Computer ScienceUniversity of L’Aquila (ITALY)
Vittorio [email protected]. of Computer ScienceUniversity of L’Aquila (ITALY)
Antinisca Di [email protected]. of Computer ScienceUniversity of L’Aquila (ITALY)
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
INTRODUCTION: CONTEXT AWARENESS
Context Awareness: property of software to sense knowledge related to the context
PHYSICAL LOCATION AWARENESS: capability to “sense” the current Physical Location
LOGICAL LOCATION AWARENESS: capability to “sense” the current Logical Location
HARDWARE PLATFORM AWARENESS: capability to “sense” the current Hardware Platform Configuration
04/21/23 5
This is a context definition that fits our purposes• It CAN BE EXTENDED by adding other context dimensions• It CAN BE RESTRICTED for those cases where only few context attributes are necessary (e.g. logical mobility not allowed)
Without modifying the framework structureNon-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
• UML-based Modeling of (i) Users and Services
(ii) Software Architecture,
(iii) Behaviors,
(iv) Hardware Platform
(v) Extra-functional parameters
21/04/23 6
THE FRAMEWORK
Context, a cross cutting concern
Adaptable
Mobile
Configurable
Mobile
Context-specific
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
A LEADING EXAMPLE: E-HEALTH SYSTEM
The eHealth System supports the doctor’s everyday activities providing distributed services, such as the retrieval of information about patients.
The doctor invokes the service using a resource-constrained PDA.
He can move across different locations: his home, the surgery, the patient’s home.
The system performance can be affected by the doctor’s physical location and by the hardware configuration of the doctor’s PDA.
04/21/23 7
The system performance is affected by the context
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
E-HEALTH: UML DESIGN MODEL AT A GLANCESoftware Architecture (Component Diagram)
Hardware Platform (Deployment Diagram)
Service Behavior (Sequence Diagram)
Services (Use Case Diagram)
Static <<deployment>>
The doctor can display the medical
history of a patients (text and images)
hw configurations
04/21/23 8Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
DESIGN MODEL
THE FRAMEWORK: CONTEXT MODELING
The proposed framework introduces statecharts to manage the context evolution
Awareness MANAGER:Is associated to a model element that is “context-related”
Is a stochastic statechart where
A state represents the (set of) attribute(s) value(s) of the context-related model element
Transitions represent the events triggering changes in attribute values
Probabilities are associated to transitions
Is able to interact with other managers through remote firing
Defines a Variable that indicates its current state (e.g. $manager = ‘A’ , $manager = ‘B’)
04/21/23 9
MANAGER
A Bp
1-p
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
E-HEALTH: CONTEXT MODELING
Component Diagram Services (Use Case Diagram)Client :: LOGICAL
MOBILITYDoctor :: PHYSICAL MOBILITY
Deployment Diagram
Dynamic
BATTERY :: HW CONFIGURATION
CPU:: HW CONFIGBinding between hardware resources
and physical placesBinding between software resources
and hardware platform
10
homesurgery
remote firing
Hw platform
Physical Places
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems04/21/23
DESIGN MODEL
THE FRAMEWORK : BEHAVIOR ADAPTATIONAdaptation:
capability to change software behavior w.r.t. changes in the sensed context.
We enable adaptation by allowing the system to choose among different implementations j of the same service i
04/21/23 11
Given the context description, how to represent “if context is” conditions?
CONTEXT MANAGER (Steady State Prob)HS OS SS PS HR OR SR PR
0.1 0.2 0.1 0.1 0.1 0.2 0.1 0.1
@SURGERY = 0.85@OPEN AIR= 0.1216
@OPEN AIR = 0.4@every other place = 0.2
Basic High Mobility
04/21/23 20
For each superstate we generate and solve a different Analysis Model and weigh the resulting indices with the steady state probabilities
Basic and High Mobility scenarios induce the same superstates and supertransitions but different transition probabilities that lead to different steady state probabilties
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
CONTEXT MANAGER CONTEXT MANAGER
THE FRAMEWORK: MODEL-DRIVEN ANALYSIS
21/04/23 21Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
performance analysis
Queuing Networks
Execution Graphs
Reliability AnalysisAvailability Analysis
Petri Nets
…
Fault Tree
LOG
PHY HW’
services
Steady StateProbability
m2m transformation
THE FRAMEWORK: PERFORMANCE ANALYSIS
SW resource demands
UML Model
+MARTE
sw2hw conversion factorssw2hw conversion factors
= Context–specific performance indices (e.g. Response Time)
Service Time of hw resources (e.g. CPU,DISK)
21/04/23 22
LOG
PHY HW’
services
Steady StateProbability
Execution Graphs (no resource contention)
SDs ▶DD ▶
x
=HW resource demands
x
<<nfp>>ServiceTime : NFP_DataTxRate =1bit/μs
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
E-HEALTH: PERFORMANCE ANALYSIS
04/21/23 23
CONTEXT MANAGER
MAX Response Time82.07 sec
MAX Response Time82.07 sec
MIN Response Time1.17 sec
MIN Response Time1.17 sec
Average:Basic : 14.59 sec
High Mobility: 26.32 sec
Lower Average Response Time in Basic Scenario due to different Doctor’s Physical Mobility: more time spent @Surgery with faster internet connection
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
E-HEALTH: RELIABILITY ANALYSIS
04/21/23 24Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
• RELIABILITY : The probability of a system working within specs throughout an interval of time without system-level repair.
• RELIABILITY ON DEMAND : The probability of a system working within specs for a certain number of invocation without system-level repair.
THE FRAMEWORK: RELIABILITY ANALYSIS
UML Model
+MARTE
21/04/23 25
LOG
PHY HW’
services
Steady StateProbability
UCD ▶CD ▶SDs ▶DD ▶
Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
• Sk = service k•i = failure prob of component i •bpi= busy periods (i.e. activation) of component i •(i,j) = failure prob of connector among connectors i and j •int(i,j) = interactions (# of exchanged messages) between components i and j
Components Reliability in context
Connectors <i,j>Reliability in context
DD ▶
UCD ▶
CD ▶
SDs ▶
E-HEALTH: RELIABILITY ANALYSIS
04/21/23 26Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
+ COMPONENT FAILURE PROBABILITY (DAM profile)+ IDENTIFICATION OF LOGICALLY MOBILE COMPONENTS (Context Profile)
E-HEALTH: RELIABILITY ANALYSIS
04/21/23 27Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
RELIABILITY ON DEMAND : Probability of a system working within specs throughout for a certain number of invocations without system-level repair
COmponent-Based Reliability Analysis
21/04/23 30Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
Probability of System Failure (Reliability on Demand)
CONCLUSIONS AND FUTURE WORK
• We introduced a framework for modeling and analyzing performance of context-aware mobile systems
• Context-awareness is a composite/cross-cutting concern:– context dimensions can be added/removed/ignored using stochastic
statecharts and “if context is” conditions
• UML-based realization: extensible with (standard) profiles to other UML-based model-driven NFPs analyses
• [Future]: we are working on complex composition of managers
• [Future]: Modeling Adaptation@runtime where context state changes during service execution.
04/21/23 31Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems
REFERENCES• L. Berardinelli, V. Cortellessa, and Antinisca Di Marco,
" An Unified Approach to Model Non-Functional Properties of Mobile Context-Aware Software ", Proc. of the 2nd International Workshop on Non-functional System Properties in Domain Specific Modeling Languages (NFPinDSML 09 @ MODELS 2009)
• L. Berardinelli, S. Bernardi, V. Cortellessa, and J. Merseguer, "UML Profiles for Non-Functional Properties at Work: Analyzing Reliability, Availability and Performance", Proc. of the 2nd International Workshop on Non-functional System Properties in Domain Specific Modeling Languages (NFPinDSML 09 @ MODELS 2009)
• L. Berardinelli, V. Cortellessa, and Antinisca Di Marco, " Performance Modeling and Analysis of Context-Aware Mobile Software Systems ", Fundamental Approaches to Software Engineering, 13th International Conference, FASE 2010, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2010, Paphos, Cyprus, March 20-28, 2010. Proceedings (FASE 2010 @ ETAPS 2010, EASST Award Paper)
04/21/23 32Non-Functional Modeling and Analysis of Mobile Context-Aware Sw Systems