Coordinating Self-Adaptive Components for Emergent Distributed ...

1 downloads 0 Views 35KB Size Report
{Jim.Dowling }@cs.tcd.ie. Abstract. There are many research challenges in building complex distributed systems with self- organising behaviour and emergent ...
Coordinating Self-Adaptive Components for Emergent Distributed System Behaviour and Structure Jim Dowling Distributed Systems Group Trinity College Dublin {Jim.Dowling }@cs.tcd.ie

Abstract. There are many research challenges in building complex distributed systems with selforganising behaviour and emergent structures from simple coordinating computational entities that have minimal shared and no global state. We argue that the design of such systems should be based firstly around experimentation but also can be greatly aided by the study of biological and social systems that display complex behaviour. This short paper introduces the K-Component Model and discusses how self-organising behaviour can emerge from the coordination of self-adaptive components, even though each component has no global knowledge and adapts their behaviour and structure relative to only local context information and programmer-specified goals.

1

Introduction

In recent years, there has been a marked trend towards using decentralised algorithms and techniques to engineer large scale distributed systems, with areas such as peer-to-peer grid computing gaining in popularity. It has been argued our ability to manage and structure the complexity of large scale distributed systems in a centralised manner, e.g. using problem decomposition and modularisation, is reaching its limits [KE02], since these centralised mechanisms become unwieldy and impractical as they require too much global knowledge. An alternative approach to building distributed systems is the bottom-up approach where a system consists of a collection of entities or agents where decisions are totally or partially taken by these entities. The stereotypical example of a complex distributed system from the world of biology is the colony of ants [Car98]. Without any central co-ordination (since there is no ant in a social insect colony with the equivalent organisational power of a system architect!), the colony will display emergent behaviours (e.g. finding optimal paths to sources of food) and structures (e.g. organised piles of dead ants appear around the nest site). There is no global view and “intelligent” global behaviour and functionality emerges from local interactions. The benefits of self-organising behaviour to distributed systems, such as ad hoc networks and peer-topeer systems, include improved robustness and scalability, self-regulation, the lack of centralised points of failure or attack and the possibility of the evolution of the system through evolving the local rules of the entities.

2

Self-Organising Distributed Systems

The theory of distributed and self organised systems is based on the fact that a population of independent and autonomous entities described in terms of rules and interacting only locally may produce global behaviour. John Holland calls such a system a complex adaptive system [Holl96]. The system is said to have properties of self organisation. Simple rules can lead to order, of a particularly stable kind, but some sets of simple rules can also instead lead to variability, and even chaos, hence the need for experimentation in defining those rules. The origins of the study of self-organising systems goes back to Poincaré who discovered that even a completely causal system (a system where the behavioural rules are perfectly known) could have indeterminate behaviour [Pav03]. More recently Stephan Wolfram advocated the role of experimentation and observation when designing such systems as he showed that we cannot know in

advance the global behaviour that will emerge from simple rules [Wolf02]. Genetic and evolutionary computing have designed approaches to automate the experimentation with different rules and discovery of “fitter” rules [KE02], but we advocate a biologically inspired approach to discovering useful rules based on the study and modelling of mechanisms in biological systems where global behaviour emerges from simple local rules. Examples of such distributed systems that take their inspiration from biological mechanisms include: • Stigmergic Routing in AntNet is based on how ants uses pheromone trails to find optimal paths to food sources [Ant98] • Autonomic computing [IBM01] holds the goal of building self-repairing, -optimising and –monitoring systems and is based on the Autonomic Nervous System • Embryonics has been used as a metaphor for building a for fault tolerant systems [Tyr00] • Flocking behaviour in birds for the graphical simulation of flocking and shoaling [Rey87] The rules governing flocking behaviour by birds is a good example of how a small set of rules were discovered by examining the behaviour of birds in motion. These rules use only local context information about neighbouring birds and were then refined through experimentation to change a random assembly of interacting agents into a cohesive group with emergent the behaviour and structure of flocking, just like flocks of birds or shoals of fish: 1. Separation: steer to avoid bumping into local flockmates. 2. Alignment: steer towards the average heading of local flockmates. 3. Cohesion: steer to move toward the average position of local flockmates.

3

Related Work and Research Challenges

So what kind of impact have the notions of autonomous agents, cooperative behaviour using only local information, inter-agent communication and rule-based behaviour had in the mainstream domain of distributed computing? Well, the area of multi-agent systems has been active in this area for quite some time [Syc96] and distributed agent computing [DA03] is a relatively new field that attempts to reconcile the fields of distributed computing and multi-agent systems, but in general there has been little success in deploying large-scale distributed systems using either of these approaches. It is our belief that the main limitations to the adoption of agent-based approaches and consequently the major research challenges are to: • Integrate existing distributed systems standards and platforms with agent technology • Increase the availability of information external to applications (i.e. context information from middleware, network connections, sensors, etc) to enable more intelligent agent behaviour • Centralise the role of experimentation and the study of existing complex biological and social systems for both the discovery and tuning of rules that produce self-organising system behaviour

4

K-Component Model

The K-Component model is a programming language and framework that allows programmers to specify and deploy components integrated with context-adaptive agents. Components are specified using a subset of IDL-3, called K-IDL, while their context-adaptive behaviour is specified in a separate Adaptation Contract Description Language (ACDL) [DC01]. The ACDL uses context events, assertions about the state of components, connectors, the middleware and the environment, to provide feedback to agent programs that can adapt the application structure and behaviour at runtime. Due to their numerical representation the context events can be stored as a context history for analysis using statistical and machine learning techniques. The ACDL has a declarative programming model for specifying rules governing the adaptive behaviour of components [DC01]. The K-Component implementation consists of a framework written in C++, a K-IDL compiler that extends Orbacus’ IDL compiler and a configuration tool for writing and deploying context-adaptive behaviour as adaptation contracts. As it is built using C++, K-Components are suitable for resourceconstrained environments such as ad hoc networks.

A K-Component is an extension of a traditional CORBA object with an autonomous agent that can adapt the application behaviour and structure in response to events delivering context information, see Figure 1. Local context information can be acquired from connected components and middleware, while the environment (e.g. through sensors or stigmergic communication) can be used to acquire shared context information. Context information can also be predicted by applying statistical and machine-learning techniques to analysing context histories and predicting future context states. The adaptation logic describes the self-adaptive behaviour of the application and is concerned with monitoring events and performing adaptations on the application structure and behaviour. It is encapsulated in meta-level programs that execute concurrently with the CORBA application execution. The mechanism for executing adaptation logic is called asynchronous reflection and differs from traditional synchronous reflective object models where reflective computation is implemented as a pre-operation by intercepting object-model operations. Asynchronous reflective computation is in fact a post-operation that monitors context events in the system and reacts to variations in the programmer specified goal-states by performing programmer specified adaptations on the application. In the current implementation, the reflective code in a K-Component is encapsulated in a separate thread that executes (1) at configurable time intervals and (2) in exceptional system conditions. The idea is that if the system is functioning in an expected manner, the reflective computation only needs to execute periodically to monitor the system, but if the system enters unexpected states, then reflective computation is scheduled immediately to try and interpret and adapt to the changed context.

Provided Interface

Uses Interface

Context History

Emits Adaptation Event

Consumes Adaptation Event

Prediction Engine(s)

Monitoring and Adaptive Behaviour Adaptation of Structure or Stratgey

Context Info

Component Middleware

K-Component

Figure 1 - A Context-Adaptive K-Component In the following example of a gaming ecosystem for an ad hoc network, it is shown how K-Components can co-ordinate their context-adaptive behaviour without any centralised control or management. The examples cover 2 different types of component adaptation: 1. Independent adaptation of components based on only local context information 2. Independent adaptation of components based on shared context information (i.e. stigmergic coordination) These different types of context-adaptation can exhibit the following complex emergent properties introduced by Bonabeau et al. [BDT00]:

• • • •

Property 1: Emergent behaviour through distributed interactions Property 2: Self-organising behaviour towards some equilibrium through negative feedback Property 3: Convergent behaviour towards some optimal solution through positive feedback Property 4: Self-organising behaviour around some equilibrium through both positive and negative feedback

5

A Gaming Ecosystem for a Mobile ad hoc Environment (GEME)

Ecosystems are examples of complex adaptive systems [Pav03] and the GEME system has not yet been implemented. The GEME is a physical world gaming space where gamers engage in jousting sessions facilitated by their wireless devices operating in ad hoc mode. Games are played via wireless communication and each player (user-guided adaptation) and the game itself (self-adaptation) can set up policies for the selection of games, team-mates and competitors. Games will be written using the KComponent programming model as CORBA objects whose context-adaptive behaviour is written separately as adaptation contracts. The adaptation contracts compile into agents that monitor context information on who the local neighbours are using broadcast, the player’s context history and any shared environmental information nearby, see Figure 2. The agents can take decisions on the optimal game to join, and which players to play with or against. As the agents execute asynchronously their rules can also include rules to monitor properties such as wireless connectivity or game progress and if certain conditions (goals) are met they can take reactive decisions to change the current game or join a different team, etc. Shared Environmental Context

Player A's Context History

Player W in Game B

2. Find "best" player given current context Adaptation Contract 1. Broadcast to find available players Player X in Game A

Player Z in Game A

3. Reconfigure connection to current "best" partner Player Y in Game A

Digital Gaming Ecosystem

Figure 2 - Context-Adaptive Selection of Optimal Gaming Partner in the GEME Given a critical mass of players, it is our belief that a network economy will develop in the GEME and global structures and behaviours will emerge such as: 1. Players will be assigned to play against geographically proximate players due to poor network latency resulting in the emergence of hot-spots of gaming activity (Property 3) 2. Game context history and user profile history will allow groups or cliques of players of relatively similar profiles to emerge in multi-player games. These groups will have markedly different characteristics such as average game duration, intensity, etc (Property 1) 3. Fixed wireless nodes in the GEME physical space can allow wireless devices to share context information about game activity (e.g. who the best players are, when games are often busy, etc), thus helping users make decisions on which games to play and reinforcing busy arrival times (assuming players want to play when others are present!). This feedback information will encourage gamers to converge on similar gaming patterns, e.g. many players turning up at similar times for games (Property 3).

The main problem in the design of the GEME is the “discovery” of the exact rules for adapting the gamer’s choice of playing partner and competitor that will produce emergent complex adaptive behaviours (such as robustness, load-balancing, etc). Most versions of the rules will produce variable or chaotic behaviour, but some versions will produce stable, emergent behaviours under particular conditions. The process of finding the best rules is, as discussed earlier, primarily a trial and error process that can be aided by the study and modelling of human social systems. Human social systems are in fact an example of a complex adaptive system [Hol96], and even though the GEME application has not yet been built and evaluated, we are able to base our predictions of the emergent properties in the GEME on the study of a thriving gaming culture here at the DSG group in Trinity College Dublin.

6

Conclusion

Distributed systems built from simple interacting components with no global state can possess complex adaptive behaviours (non-predictability and emergence, etc.). This paper described how the K-Component model can be used to specify and build a distributed system with emergent, self-organising structure and behaviour using only local context information and self-adaptive behaviour. It is our belief that experimentation with context-adaptive behaviour and basing models on existing biological and social systems are important aids to building complex adaptive distributed systems with self-organising behaviour and structure.

References [Ax84] Robert Axelrod, “The Evolution of Cooperation”, BasicBooks, ISBN 0-465-02122-2, 1984. [Car98] Gianni Di Caro, Marco Dorigo, “AntNet: Distributed Stigmergetic Control for Communications Networks”, Journal of Artificial Intelligence Research 1998. [BDT00] Eric Bonabeau, Marco Dorigo, Guy Theraulaz, „ Swarm Intelligence: From Natural to Artificial Systems”, Oxford University Press, ISBN: 0195131592, 1999. [DC01] Jim Dowling and Vinny Cahill, "The K-Component Architecture Meta-Model for Self-Adaptive Software", In Proceedings of Reflection 2001, LNCS 2192. [Hol96] John Holland, “Hidden Order: How Adaptation Builds Complexity”, ISBN: 0201442302, 1996. [KE02] James Kennedy and Russel C. Eberhart, “Swarm Intelligence”, Morgan Kaufmann, 2001. [Pav03] Bernard Pavard & Julie Dugdale, “An Introduction to Complexity in Social Science”, Online Tutorial: http://www.irit.fr/COSI/training/complexity-tutorial/complexity-tutorial.htm. [Rey87] Craig Reynolds, “Flocks, Herds, and Schools: A Distributed Behavioural Model”, ACM SIGGRAPH 1987. [Syc96] Katia Sycara, et al. “Coordination Of Multiple Intelligent Software Agents”, International Journal of Cooperative Information Systems 1996. [Tyr00] Cesar Ortega-Sanchez, Andrew M. Tyrrell: “Embryonics: A Bio-Inspired Cellular Architecture with FaultTolerant Properties”, Journal of Genetic Programming and Evolvable Machines 1(3): 187-215 (2000). [WB03] Niek Wijngaards and Frances Brazier, “Distributed Agent Technology”, http://dsonline.computer.org/agents/ [Wolf02] Stephan Wolfram, “A New Kind of Science”, Wolfram Press 2002.

Suggest Documents