Abstract: Modern, complex software systems (e-commerce, IT, critical infrastructures, etc.) are increasingly required to continue operation in the face of change to self-adapt to accommodate shifting user priorities, resource variability, changing environments, and component failures. While manual oversight benefits from global problem contexts and flexible policies, human operators are costly and prone to error. Low-level, embedded mechanisms (exceptions, time-outs, etc.) are effective and timely for error recovery, but are local in scope to the point-of-failure, application-specific, and costly to modify when adaptation objectives change. An ideal solution leverages domain expertise, provides an end-to-end system perspective, adapts the target system in a timely manner, and can be engineered cost-effectively. Architecture-based self-adaptation closes the "loop of control," using external mechanisms and the architecture model of the target system to adapt the system. An architecture model exposes important system properties and constraints, provides end-to-end problem contexts, and allows principled and automated adaptations. Existing architecture-based approaches specialize support for particular classes of systems and fixed sets of quality-of-service concerns; they are costly to develop for new systems and to evolve for new qualities. To overcome these limitations, we pose this thesis: We can provide software engineers the ability to add and evolve self-adaptation capabilities cost-effectively, for a wide range of software systems, and for multiple objectives, by defining a self-adaptation framework that factors out common adaptation mechanisms and provides explicit customization points to tailor self-adaptation capabilities for particular classes of systems, for multiple quality-of-service objectives. Our approach, embodied in a system called Rainbow, provides an engineering approach and a framework of mechanisms to monitor a target system and its environment, reflect observations into the system's architecture model, detect opportunities for improvements, select a course of action, and effect changes. The framework provides general and reusable infrastructures with well-defined customization points, a set of abstractions, and an adaptation engineering process, focusing engineers on adaptation concerns to systematically customize Rainbow to particular systems. To automate system self-adaptation, Rainbow provides a language, called Stitch, to represent routine human adaptation knowledge using a core set of adaptation concepts.
Abstract: The expansion of computing infrastructure has opened the possibility of a world in which users can compute everywhere. Despite such advances, computing resources are often scarce and changing, limiting a user's ability to take advantage of the applications and devices, and requiring changes to the application runtime settings. Currently, the burden of managing the computing environment (devices, applications, and resources) falls on the user. A user must manually start applications and adjust their settings according to the available resources. Assigning such chores of configuration to the user has a number of disadvantages. First, it consumes user's precious cognitive resources. Second, effectively managing the environment requires skills that a typical user might not have. Third, even with adequate low-level expertise, managing the environment optimally (or even adequately) can be difficult. Ideally, the computing needs of a user are seamlessly matched with the capabilities of the environment: devices, applications, and available resources. The user should enjoy the best possible application quality, without worrying about managing the low-level computing mechanisms. In this dissertation, we describe a novel approach that substantially automates the control of the configuration of the environment for a user's task: finding and starting applications, configuring their runtime settings, and allocating possibly limited resources. Our approach simultaneously satisfies two important requirements: utility and practicality. Utility ensures that configuration decisions take into account user's preferences for specific applications and quality of service. Practicality ensures that configuration has low runtime overhead in terms of the latency of configuration decisions and its usage of resources. First, we model configuration analytically as a problem of optimizing user's utility based on three inputs: (1) user's preferences, (2) application capability, and (3) resource availability. Formally, automating the control of the configuration requires solving an optimization problem, and then using the optimization solution to control the environment. Next, we design a software infrastructure that is based on the analytical model. The infrastructure implements efficient algorithms to solve the problem of configuration, eliminating the need for manual configuration. We validate our approach using experiments and simulation, demonstrating that the infrastructure satisfies the requirements of utility and practicality while substantially automating configuration.