Achieving dynamic adaptation via management and interpretation of runtime models

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

Abstract

In this article, we present a generic model-centric approach for realizing fine-grained dynamic adaptation in software systems by managing and interpreting graph-based models of software at runtime. We implemented this approach as the Graph-based Runtime Adaptation Framework (GRAF), which is particularly tailored to facilitate and simplify the process of evolving and adapting current software towards runtime adaptivity. As a proof of concept, we present case study results that show how to achieve runtime adaptivity with GRAF and sketch the framework's capabilities for facilitating the evolution of real-world applications towards self-adaptive software. The case studies also provide some details of the GRAF implementation and examine the usability and performance of the approach.

Introduction

Self-adaptive software (SAS) is a software system that is able to modify its own behavior in response to changes in its operating environment (Oreizy et al., 1999). One of the main advantages of SAS is its ability to manage the complexity that stems from highly dynamic and nondeterministic operating environments. However, in practice, implementing self-adaptive and autonomic behavior can lead to an increase in overall system complexity (e.g., due to a complex adaptation logic that needs to be embedded into the system), as well as subsequent future maintenance costs.

In software engineering, modeling is as an effective strategy for managing system complexity (Ludewig, 2003) (e.g., by eliminating or hiding unnecessary details). To tackle the complexity issue in the context of SAS, the construction of precise and accurate models of software that can support various aspects of adaptation is essential (Cheng et al., 2009, Andersson et al., 2009). However, modeling in the SAS domain is a hard task, mainly because of the highly dynamic nature of SAS systems and their operating environments. Difficulties arise especially in the area of model-centric runtime adaptation, where models need to be managed at runtime (Garlan and Schmerl, 2004, Morin et al., 2009).

In order to effectively use models at runtime, we propose a model-centric architecture for SAS, in which adaptation is achieved through managing and interpreting a dynamic runtime model of software, instead of directly changing the software system. This approach explicitly separates software and its common business logic from the adaptivity-related concerns such as runtime models and adaptation logic. We realize our approach as the Graph-based Runtime Adaptation Framework (GRAF) (Derakhshanmanesh et al., 2011), which utilizes TGraphs (Ebert et al., 2008) and its accompanying technologies, as the enabling technology, for modeling and manipulating runtime models.

When designing GRAF, our primary goal was to show that runtime adaptivity can be achieved by applying techniques that are common and well-established in the model-driven domain. Our focus was set on the use of software models at runtime in the technical context of a reflective architecture (Buschmann et al., 1996) that can support the evolution of existing software towards SAS. Hence, the applied set of operations on runtime models consists of (i) querying, i.e., gathering change information from the meta-layer, (ii) transforming, i.e., adapting the meta-layer, and (iii) interpreting as a means of reflecting changes from the meta-layer to the executing software parts in the underlying base-layer.

Our proposed model-centric approach is supported by a number of case studies that serve as a proof of concept, show by example, how to achieve runtime adaptivity with GRAF, and sketch the framework's capabilities for facilitating the evolution of real-world applications towards a self-adaptive software system. The case studies support understanding the benefits and drawbacks of fine-grained adaptation using GRAF, i.e., adaptation at the level of fields and methods, and present our proposed non-intrusive approach for preparing the required adaptable software and its runtime model.

This article is organized as follows: Section 2 elaborates on the concept of models at runtime in SAS with an emphasis on the design considerations and motivating factors that drive this work. Section 3 gives a comprehensive overview of GRAF's model-centric architecture together with its runtime behavior. Section 4 gives an overview of the technologies that are involved in the framework's implementation. Section 5 puts GRAF in a migration context and illustrates how to prepare adaptable software by evolving non-adaptive software. Section 6 presents the case studies of applying GRAF to two real-world application domains: computer gaming and Internet telephony. Section 7 covers the related work. Finally, we conclude this paper in Section 8 and outline possible future research directions.

Section snippets

Design considerations

There is a multitude of approaches to achieve runtime adaptivity by incorporating runtime models (Garlan and Schmerl, 2004, Morin et al., 2009, Vogel and Giese, 2010, Blair et al., 2009). To make our design considerations more clear, we initially present an introduction to model-centric runtime adaptivity in the context of computational reflection (Maes, 1987). Thereupon, we give an overview on the influences from different areas that had an impact on our work and especially on the framework's

Architecture description

The overall structure of GRAF-based SAS is separated into two main subsystems: (i) the adaptable software and (ii) the adaptation framework. Both subsystems communicate with each other via predefined interfaces. Subsequently, the internal structure of each subsystem is introduced in detail and the connecting interfaces are described. In addition, the involved components are discussed in terms of their functionality, tasks, and responsibilities.

Realization

So far we have introduced the architecture for GRAF-based SAS in terms of its static structure and its runtime behavior. In this section, we describe a prototypical implementation and the technologies involved.

We created the first version of GRAF to support the evolution of existing software towards adaptivity. Our goal was to make as little changes as possible to the legacy system. Furthermore, the functional characteristics of the adaptable software should be identical with the legacy system

Preparing adaptable software

The process of migrating an existing Java software towards SAS starts with analyzing each adaptation requirement in order to specify the program elements that must be provided by the adaptable software. We refer to these elements as adaptability factors. They communicate with the adaptation framework to fulfill the requirement. When migrating an existing system towards runtime adaptivity, we need a mapping between runtime model elements and their respective source code elements. Hence, the

Case studies

The case studies performed in the context of GRAF were mainly guided by the following research questions:

  • RQ1: What is the impact of different preparation techniques for adaptable software on the performance of SAS?

  • RQ2: What are the benefits and drawbacks of GRAF-based SAS?

We designed and implemented two case studies to answer these questions. The first case study demonstrates GRAF's ability to support both parameter and compositional adaptation in a simple scenario within the voice-over-IP

Related work

There are several successful projects related to runtime adaptation frameworks (Salehie and Tahvildari, 2009). In this section, we focus on related projects, frameworks, and technologies, and briefly highlight their features.

Rainbow. The Rainbow framework (Cheng et al., 2004) uses an abstract architectural model to monitor the runtime properties of an executing system. In comparison to GRAF, it has a similar model-centric architecture. Certain components of Rainbow are reusable and the

Conclusions and future work

In theory, model-centric approaches are able to reduce the complexity of engineering and maintaining SAS, by providing partial and customized representations of the software, tailored to suit the needs of adaptation. However in practice, managing runtime models, i.e., creating them, verifying adaptation steps, reflecting changes, and maintaining consistency may add additional complexity and overhead. This can put the usability and cost–benefit ratio of model-centric approaches to SAS under

Mehdi Amoui received his PhD from University of Waterloo on Evolving Software System for Self-Adaptation, in 2012. He is currently a postdoctoral fellow at University of Waterloo, working as a researcher/consultant on the Statistical Decision Model for System test (SDMS) project, Software Verification & Validation group, Blackberry Internet Services department, at Research in Motion (RIM). He holds masters degree in Artificial Intelligence and Robotics from University of Tehran, where he worked

References (39)

  • J. Andersson et al.

    Modeling dimensions of self-adaptive software systems

    Software Engineering for Self-adaptive Systems

    (2009)
  • R. Asadollahi et al.

    StarMX: a framework for developing self-managing Java-based systems

  • G. Blair et al.

    Models@ run.time

    Computer

    (2009)
  • J. Bruhn et al.

    Comprehensive support for management of enterprise applications

  • F. Buschmann et al.

    Pattern-oriented Software Architecture, vol. 1: A System of Patterns

    (1996)
  • S. Cheng et al.

    Rainbow: architecture-based self-adaptation with reusable infrastructure

    Computer

    (2004)
  • Cheng

    Software engineering for self-adaptive systems: a research roadmap

  • Derakhshanmanesh, M., 2010. Leveraging model-based techniques for runtime adaptivity in software systems. Master's...
  • M. Derakhshanmanesh et al.

    GRAF: Graph-based Runtime Adaptation Framework

  • J. Ebert et al.

    Reverse engineering using graph queries

  • J. Ebert et al.

    Graph technology in reverse engineering, the TGraph approach

  • F. Fleurey et al.

    A domain specific modeling language supporting specification, simulation and execution of dynamic adaptive systems

  • Fraps

    Realtime Video Capture & Benchmarking

    (2011)
  • D. Garlan et al.

    Using architectural models at runtime: research challenges

  • R. Gayraud et al.

    SIPp: Traffic Generator for the SIP Protocol

    (2010)
  • P. Grace et al.

    A reflective framework for fine-grained adaptation of aspect-oriented compositions

  • T. Horn et al.

    The GReTL transformation language

  • IBM

    An architectural blueprint for autonomic computing

    Autonomic Computing

    (2006)
  • IBM Rational

    Rational Software Architect

    (2010)
  • Cited by (35)

    View all citing articles on Scopus

    Mehdi Amoui received his PhD from University of Waterloo on Evolving Software System for Self-Adaptation, in 2012. He is currently a postdoctoral fellow at University of Waterloo, working as a researcher/consultant on the Statistical Decision Model for System test (SDMS) project, Software Verification & Validation group, Blackberry Internet Services department, at Research in Motion (RIM). He holds masters degree in Artificial Intelligence and Robotics from University of Tehran, where he worked on the application of soft-computing techniques for automatic co-evolution of software design and test data. His main research interests include software evolution, self-adaptive software systems, bio-inspired computing, and software quality.

    Mahdi Derakhshanmanesh works as a Research Assistant and Ph.D. candidate at the University of Koblenz-Landau, Germany. He received a Bachelor of Science degree in Computer Science from the Johannes-Gutenberg University of Mainz in 2009 and a Master of Science degree in Computer Science from the University of Koblenz-Landau in 2010. His current research is focused on the engineering of flexible and reusable software supported by models, including topics like self-adaptive software and software product lines.

    Jürgen Ebert holds the Chair of Software Engineering at the University of Koblenz-Landau since 1982. His research areas include software engineering focusing on modeling, software architecture, and construction of generic tools especially using graph based methods. In the last decade, he published primarily in the area of graph technology, metamodelling, metaCASE and software reengineering.

    Ladan Tahvildari is an Associate Professor in the Department of Electrical and Computer Engineering at the University of Waterloo and the founder of the Software Technologies Applied Research (STAR) Laboratory. Together with her research team, she investigates methods, models, architectures, and techniques to develop software systems with a higher quality in a cost effective manner. She served as a guest co-editor for the IEEE Transactions on Software Engineering issue July/August 2009. She has also been on the program and organization committees of many international IEEE/ACM conferences. She was the publications chair of the IEEE/ACM ICSE 2009 in Vancouver and the program co-chair of the IEEE ICSM 2007 in Paris. Her accomplishments have been recognized by various awards. Recently, she has been honoured with the prestigious Ontario's Early Researcher Award (ERA) to recognize her work in self-adaptive software. She is a Senior Member of the IEEE.

    This article is a revised and expanded version of a paper accepted at the 6th International Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS 2011), Honolulu, Hawaii, May 2011.

    View full text