The Decentralised Coordination of Self-Adaptive Components
Distributed computing systems are moving towards increasingly autonomous operation and management, in which their interacting components can organise, regulate, repair and optimise themselves without human intervention. The emerging field of autonomic distributed computing addresses the challenge of how to design and build distributed computing systems that can manage, heal and optimise themselves given high-level objectives. Adaptive software provides some of the functionality required for building autonomic computing systems, as it allows system behaviour or structure to be changed at run-time to fulfil the high-level objectives. Self-adaptive software is a subclass of adaptive software that autonomously executes adaptation logic, code concerned with monitoring for adaptation conditions and triggering adaptation actions. This thesis proposes that self-adaptive components are a useful building block for autonomic computing systems, as they can autonomously adapt their structure and behaviour at run-time to fulfil specified goals. It also shows how decentralised coordination of self-adaptive components can establish autonomic properties for distributed systems in dynamic and uncertain environments, such as wireless ad-hoc networks or peer-to-peer systems. Self-adaptive software requires programming support for the specification of its adaptation logic in order to avoid tangling adaptation-specific code with functional code. Reflective techniques can help modularise adaptation logic, but existing self-adaptive systems based on reflection only support the specification of adaptation logic that executes synchronously with program execution, even though events triggering adaptive behaviour are often temporally orthogonal to program execution. Also, although it is known that self-adaptive software can evolve and learn its adaptive behaviour over time through the use of information relating to past adaptive behaviour, none of the existing models have the ability to learn improved adaptive behaviour online. Finally, the use of decentralised coordination models to build distributed systems with autonomic properties from self-adaptive components has not been addressed by existing systems. Current reflective programming models for building adaptive software lack support for the separate specification of application-level adaptation logic that can learnand optimise a component's adaptive behaviour. The K-Component model is a component framework for building self-adaptive distributed systems that addresses the aforementioned problems. Adaptation logic for components is specifed in a declarative programming language and encapsulated at run-time as a set of reflective programs that are scheduled asynchronously to program execution. The reflective programs operate on an architecture meta-model and reason about adaptation conditions using events that provide feedback regarding the state of components and connectors. Adaptation logic can be specified using if-then rules or the eventcondition- action paradigm and the unsupervised learning of adaptive behaviour is also supported using reinforcement learning. Collaborative reinforcement learning is introduced as a decentralised coordination model that can coordinate the adaptive behaviour of groups of connected components for the purpose of establishing system-wide autonomic properties in dynamic and uncertain environments. A further contribution of this thesis is an asynchronous model of reflection for adaptive software that decouples the execution of reflective code from base-level code. This work reviews existing models of self-adaptive software from the areas of reflective systems, dynamic software architecture and autonomic computing. It describes the programming model for KComponents, its architecture meta-model, a contract description language, a model of asynchronous reflection and collaborative reinforcement learning. As an evaluation of the model, a load balancing application demonstrates how autonomic distributed systems properties can emerge from the decentralised coordination of self-adaptive components using collaborative reinforcement learning. The K-Component model has been implemented as an extension to CORBA in C++.