ProDSPL: Proactive self-adaptation based on Dynamic Software Product Lines

https://doi.org/10.1016/j.jss.2021.110909Get rights and content

Highlights

  • ProDSPL combines proactive control and DSPL for self-adaptation of software systems.

  • The reconfiguration service for DSPLs is formulated as an optimal control approach.

  • An automatically learnt model of the system is used to anticipate future variations.

  • Valid extended feature model configurations are encoded into linear constraints.

  • ProDSPL reduces time and energy costs of reconfiguration, maintaining the quality.

Abstract

Dynamic Software Product Lines (DSPLs) are a well-accepted approach to self-adaptation at runtime. In the context of DSPLs, there are plenty of reactive approaches that apply countermeasures as soon as a context change happens. In this paper we propose a proactive approach, ProDSPL, that exploits an automatically learnt model of the system, anticipates future variations of the system and generates the best DSPL configuration that can lessen the negative impact of future events on the quality requirements of the system. Predicting the future fosters adaptations that are good for a longer time and therefore reduces the number of reconfigurations required, making the system more stable.

ProDSPL formulates the problem of the generation of dynamic reconfigurations as a proactive controller over a prediction horizon, which includes a mapping of the valid configurations of the DSPL into linear constraints. Our approach is evaluated and compared with a reactive approach, DAGAME, also based on a DSPL, which uses a genetic algorithm to generate quasi-optimal feature model configurations at runtime. ProDSPL has been evaluated using a strategy mobile game and a set of randomly generated feature models. The evaluation shows that ProDSPL gives good results with regard to the quality of the configurations generated when it tries anticipate future events. Moreover, in doing so, ProDSPL enforces the system to make as few reconfigurations as possible.

Introduction

The demand for self-adapting software systems has risen sharply, specially motivated by the growing importance of Cyber–Physical Systems (CPS) operating in complex and changing environments, and the increasing ubiquity possibilities of Information and Communication Technologies (ICT) (Tavčar and Horváth, 2019). Designing self-adaptive systems is a complex task, and has been of great interest in the last years, specially in areas such as mobile computing, robotics or ubiquitous computing (Maggio et al., 2017a). Runtime adaptation mechanisms sometimes are problematic since they tend to be unstable, inefficient and unreliable (Elkhodary et al., 2010). Therefore, in order to overcome some of these problems several approaches have been defined (Bashari et al., 2018, Pascual et al., 2015b, Almeida et al., 2014), being the Dynamic Software Product Lines (DSPL) (Carvalho et al., 2018) one of the most widely used. DSPL are a systematic engineering approach that uses Software Product Lines (SPLs) artefacts to model the dynamic variability of a system. DSPLs model the different adaptations of the system to context changes, either internal or external, as variation points. Examples of context variations that can trigger a system adaptation can be, the continuous variation of resource availability (e.g., battery or memory), the occurrence of system or environment failures, and also the fluctuations of user’s needs (Hallsteinsen et al., 2008, Abbas et al., 2020).

Adopting a DSPL approach requires specifying the dynamic variation points as part of a variability model and a reconfiguration service that performs the system adaptation when necessary. One of the most popular variability models is the feature model (FM), which, in the context of DSPLs, is used to specify a variability space model of a single system at runtime, without needing to enumerate all the possible system configurations. The reconfiguration service determines if the system needs to be adapted to satisfy the quality requirements under different execution contexts. Then, the reconfiguration service, containing the DSPL artefacts, will be continuously monitoring the context and finding out the best possible configuration after each context change at runtime. This new configuration should be the optimal one with respect to an objective criterion (e.g., minimize battery consumption while maintaining a prescribed quality of service). There are many reasoning techniques to select the suitable variant of a system, considering the current configuration, the context change and the DSPL artefacts.

Independently of the reasoning approach used to find the new configuration, DSPLs approaches implement decision strategies that are purely reactive: during the system execution the context is continuously monitored and when a context change occurs, the reconfiguration service react to this change by analysing if there is another configuration that fits better the current conditions trying to find an optimal or quasi-optimal solution for the current context (Capilla et al., 2014). In Cyber–Physical systems the strategy used to generate the new optimal or quasi-optimal configuration should be implemented at runtime, since the high number of unexpected context changes makes impossible to pre-load all possible reconfiguration plans. Dynamic strategies then require the generation of a valid configuration at runtime, and adapting the system accordingly, which can be both time- and resource-consuming tasks (in terms of energy, memory, computation, etc.) that can negatively affect the performance of battery-powered systems.

Therefore, when analysing different DSPL alternatives, the adaptation cost should also be considered in terms of resources involved in reconfiguration, such as energy consumption and also the time needed to analyse and perform an adaptation. Indeed, in some scenarios, the adaptation process can consume a significant amount of execution time. For example, in Wireless Sensor Networks, where most of the devices have usually limited computational resources, the cost of the reconfiguration is usually too high as it contributes to a faster degradation of the device batteries. In medical applications, it is simply not acceptable to stop – or delay – the normal functioning of the system for a reconfiguration, specially if there is a serious problem that should be fixed urgently. For this kind of scenarios, the preferred techniques are those that lessen the number of reconfigurations, but trying to maintain a good quality of service at the same time. Also, performing continuous adaptations makes the system more unstable, because, if the reconfiguration service makes the system jump from one configuration to another, this might reduce the user quality of experience. Then, in these situations, it would be preferable to adopt a proactive strategy in order to reduce the number of adaptations, making the system more stable. Proactive strategies consider not only the current context, but also the system expected evolution over time, so their adaptation solutions tend to stay valid for longer. But the price to pay when we apply a proactive strategy is that sometimes the calculated application configuration has a lower utility or quality compared to the optimal solution or to the solution provided by some reactive approaches. Therefore, the great challenge is to find a proactive strategy whose adaptation solutions are good enough to increase the lifespan of the system while reducing the number of required reconfigurations. By decreasing the number of runtime reconfigurations, the overall adaptation cost is reduced and also the system is more stable.

In this work, we propose ProDSPL, that is a self-optimizing approach that combines DSPL with a control-based proactive decision strategy for dynamically generating optimal configurations in a proactive way. Self-optimizing systems based on Proactive Controllers have been explored in the context of software systems adaptation with successful results (Maggio et al., 2012, Moreno et al., 2017, Angelopoulos et al., 2018), and in this work we explore how well it behaves in conjunction with DSPL artefacts.

ProDSPL formulates the problem of dynamic reconfiguration as a proactive controller (PC) that generates valid configurations of a DSPL at runtime. In the control theory field, this type of adaptation, which is known as Model Predictive Control (MPC), relies on dynamic models learnt from the system observation, and comes with a well-developed theory and myriads of successful applications (Camacho and Bordons, 2007).

The main contribution of this paper is the formulation of the DSPL reconfiguration service as a single-objective optimization problem over a prediction horizon subject to the linear constraints of the DSPL feature model following a proactive approach. This formulation is based on a mapping between extended feature models and linear constraints, which is part of our solution to combine proactive control with DSPL. Although previous works have proposed this kind of mapping (Noorian et al., 2017, Li et al., 2012), they only consider basic feature models. Feature models of this kind do not support numerical features and consider only simple cross-tree constraints (i.e., include or exclude), so they cannot be applied in several real case studies.

Both the time required to generate the configurations and the quality of the solutions found are crucial aspects for the success of a DSPL-driven reconfiguration at runtime. So, the performance and quality of the results obtained by the proactive controller ProDSPL are compared with DAGAME (Pascual et al., 2015b), a reactive approach that uses a DSPL approach with a genetic algorithm for the generation of feature model configurations at runtime. Taking into account the concept of optimality (Guo et al., 2011) (i.e., the ratio between the utility of the solution obtained by an algorithm and the utility of the optimal solution obtained using the exact method), DAGAME is able to obtain solutions with an optimality higher than 87.4% and execution times between 20 and 100 ms. In this paper, ProDSPL performance is evaluated using a simulator of a mobile app developed in Java, in order to make experiments and results reproducible by third parties. The comparison with the purely reactive approach shows good results with regard to the performance and the quality of the configurations generated. The results obtained support in practice our initial hypothesis about the use of a proactive approach. That is, our solution is more sustainable as it contributes to reduce the overall cost – in time and energy – of reconfiguration and leads to more stable systems, while maintaining a satisfactory quality of adaptation.

The remainder of the paper is organized as follows: Section 2 provides background on DSPLs, the decision-making process, and the model predictive control. Section 3 overviews the main activities of our approach, ProDSPL. Section 4 illustrates how to apply our proposal using a Mobile Game as a case study. The experimental results are presented, analysed and compared with DAGAME in Section 5, while the threats to the validity of our study are discussed in Section 6. Section 7 discusses related work. Finally, Section 8 presents some conclusions to the paper.

Section snippets

Dynamic software product lines

DSPL is an approach to self-adaptation that takes concepts from the domain of SPL, including the management of variability through a model. DSPLs redefine existing SPL engineering processes by moving them to runtime, with the goal of adapting the system to the current environment by performing reconfiguration autonomously. While SPLs are able to generate several systems of the same family at design time, a DSPL is able to adapt a single system behaviour at runtime.

Variability of SPLs can be

The ProDSPL approach

We propose ProDSPL to drive the decision-making strategy of a DSPL. ProDSPL is based on the idea of a proactive control approach, and formulates the adaptation problem as an optimization problem over a prediction horizon subject to the linear constraints of the DSPL.

The proposed approach exploits an automatically learnt model of the system, which captures how the system reacts to different feature model alternatives over time, in order to predict what is the impact of the chosen dynamic

ProDSPL in action

In this section, we illustrate how our proposal is applied for adaptation at runtime using as a case study the strategy mobile game presented in Section 2.4.

Experimental results

The aim of experimentation is characterizing the time and estimate the energy required to generate the configurations, the number of reconfigurations needed, and the quality of the proactive ProDSPL solutions in comparison with a reactive approach used in DSPL, DAGAME (Pascual et al., 2015b), which uses a genetic algorithm for the generation of feature model configurations at runtime. We have chosen DAGAME because it has been proven to give quasi-optimal solutions in minimum time, it is a DSPL

Threats to validity

This section discusses briefly the internal validity, construct validity and external validity of our study (Wohlin et al., 2012). The internal validity intends to explore whether the results obtained are influenced or not by other factors. Threats to construct validity concern to the completeness of our study, as well as any potential bias. Finally, external validity analyses whether the results obtained in the experiments can be generalized or not.

One important threat for the internal

Self-adaptation of mobile applications

Self-adaptive systems have been of great interest in the last years, and specially in many areas such as mobile computing, robotics or ubiquitous computing (Angelopoulos et al., 2018, Angelopoulos et al., 2016, Moreno et al., 2017, Mahdavi-Hezavehi et al., 2017). However, the approaches that explore self-adaptation in mobile applications are still scarce, and works in critical scenarios (gaming, emergency, medical) are just starting to emerge. A recent work (Grua et al., 2019) provides a

Conclusions

In this work we have presented ProDSPL, a combination of Proactive control with DSPL for the self-adaptation of software system. Usually, decision-making strategies for DSPL are based on reactive approaches that try to optimize the configuration of the system for the present situation. However, in some scenarios, a reactive strategy could lead to a faster depletion of system resources and even to an unstable behaviour of the system, as each time the configuration is adapted implies a cost in

CRediT authorship contribution statement

Inmaculada Ayala: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Resources, Data curation, Writing - original draft, Writing - review & editing, Visualization. Alessandro V. Papadopoulos: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Data curation, Writing - original draft, Writing - review & editing, Visualization, Funding acquisition. Mercedes Amor: Conceptualization, Investigation, Writing - original draft,

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

This work is supported by the European Union’s H2020 research and innovation programme under grant agreement DAEMON 101017109, by the project TASOVA MCIU-AEI TIN2017-90644-REDT funded by Ministerio de Economía y Competitividad, Spain, by the projects LEIA UMA18-FEDERJA-15 and Rhea P18-FR-1081 (MCI/AEI/FEDER, UE) funded by Junta de Andalucía (co-financed by FEDER funds), Spain, by the project MEDEA RTI2018-099213-B-I00 funded by Ministerio de Ciencia y Competitividad (co-financed by FEDER

Inmaculada Ayala is a post-doctoral research fellow of the Universidad de Málaga. Previously, she has worked as a post-doctoral researcher in the Division of Software Engineering of the School of Innovation and Design of Mälardalens Högskola in Västeras. She obtained her PhD degree in Computer Science from the University of Malaga in 2013. Her research interests include Agent-Oriented Software Engineering, Internet of Things, Model Driven Development and Ambient Intelligence between others. Her

References (53)

  • PascualG.G. et al.

    Self-adaptation of mobile systems driven by the common variability language

    Future Gener. Comput. Syst.

    (2015)
  • WilliamsH.

    Logic applied to integer programming and integer programming applied to logic

    European J. Oper. Res.

    (1995)
  • AlidraA. et al.

    Adapting large pervasive and context-aware systems. a new evolutionary-based approach

    Int.J. Knowl. Based Intell. Eng. Syst.

    (2017)
  • AlmeidaA. et al.

    A branch-and-bound algorithm for autonomic adaptation of multi-cloud applications

  • AngelopoulosK. et al.

    Model predictive control for software systems with cobra

  • AngelopoulosK. et al.

    Engineering self-adaptive software systems: From requirements to model predictive control

    ACM Trans. Auton. Adapt. Syst.

    (2018)
  • BasiliV.R.

    Software Modeling and Measurement: The Goal/Question/Metric ParadigmTech. rep.

    (1992)
  • BoydS. et al.

    Convex optimization

    (2004)
  • BrataasG. et al.

    Performance property prediction supporting variability for adaptive mobile systems

  • BrownG.G. et al.

    Formulating integer linear programs: A rogues’ gallery

    INFORMS Trans. Educ.

    (2007)
  • CamachoE. et al.

    Model predictive control

  • CañeteA. et al.

    Energy efficient adaptation engines for android applications

    Inf. Softw. Technol.

    (2020)
  • CañeteA. et al.

    Mecanismos de reconfiguración eco-eficiente de código en aplicaciones móviles Android

    SISTEDES, JISBD

    (2018)
  • ChenT. et al.

    FEMOSAA: Feature-guided and knee-driven multi-objective optimization for self-adaptive software

    ACM Trans. Softw. Eng. Methodol.

    (2018)
  • ClaypoolM. et al.

    Latency and player actions in online games

    Commun. ACM

    (2006)
  • DinkelakerT. et al.

    A dynamic software product line approach using aspect models at runtime

  • Cited by (13)

    View all citing articles on Scopus

    Inmaculada Ayala is a post-doctoral research fellow of the Universidad de Málaga. Previously, she has worked as a post-doctoral researcher in the Division of Software Engineering of the School of Innovation and Design of Mälardalens Högskola in Västeras. She obtained her PhD degree in Computer Science from the University of Malaga in 2013. Her research interests include Agent-Oriented Software Engineering, Internet of Things, Model Driven Development and Ambient Intelligence between others. Her most significant publications can be found in international journals such as Knowledge-Based Systems, Personal and Ubiquitous Computing or Information and Software Technology.

    Alessandro V. Papadopoulos is an associate professor in computer science at the Mälardalen University, Västerås, Sweden. He received his B.Sc. and M.Sc. (summa cum laude) degrees in computer engineering from the Politecnico di Milano, Milan, Italy, and his Ph.D. (Hons.) degree in information technology from the Politecnico di Milano, in 2013. He is leading the research group on Complex Real-Time Embedded Systems, and his research is funded by a combination of prestigious personal grants, and EU and national projects often in collaboration and co-production with industrial partners. His research interests include cloud computing, real-time systems, autonomic computing and control theory.

    Mercedes Amor is an Associate Professor in the Languages and Computer Science Department at the University of Málaga (Spain). She received the M.Sc. degree in Computer Science in 1998 from the University of Málaga, and her Ph.D. in 2005 from the same University. Her main research is focused on self-adaptation and multi-agent systems.

    Prof. Lidia Fuentes received her M.Sc. degree and a PhD in Computer Science, from the Universidad de Málaga. She has done all her teaching work at the Department Lenguajes y Ciencias de la Computación since 1993, being the first female Full Professor of this department. She is the head of the CAOSD research group (http://caosd.lcc.uma.es). She has an important international profile, as a member of program committees of prestigious international conferences. Examples are ECOOP, SPLC, Modularity/AOSD and OOPSLA. She is currently the most cited female scientific of the Universidad de Malaga.

    Editor: Heiko Koziolek.

    View full text