Cooperating Mobile Agents [chapter]

Sukumar Ghosh, Anurag Dasgupta
2012 Mobile Agents in Networking and Distributed Computing  
This article discusses four different applications where mobile agents cooperate with one another to accomplish a task in a network of processes. These applications range from topology discovery and distributed data structure implementation to fault diagnosis and system stabilization. Introduction A mobile agent is a piece of code that migrates from one machine to another. The code (often called the script), which is an executable program, executes at the host machine where it lands. In
more » ... to the code, agents carry data values or procedure arguments or results that need to be transported across machines. Compared to messages that are passive, agents are active, and can be viewed as messengers. Mobile agents are convenient tools in distributed systems, both at the applications layer and as well as at the middleware level. The promise of mobile agents in bandwidth conservation or disconnected modes of operation is now well accepted. Deploying multiple mobile agents cooperating with one another can add a new dimension to distributed applications. While parallelism is the obvious advantage, the issues of load balancing, agent rendezvous, and fault tolerance play major roles. Among numerous possible applications, we highlight the following four problems, each with a different flavor of cooperation. Mapping of an unknown network. Network mapping is also known as the topology discovery problem. Making such a discovery using a single mobile agent is equivalent to developing an efficient algorithm for graph traversal. With multiple agents, the challenge is to develop an efficient cooperation mechanism so that the discovery is complete in the fewest number of hops and redundant traversals are avoided. Concurrent reading and writing. A distributed data structure has different components mapped to host machines at different geographic locations. As multiple agents concurrently access such a distributed data structure, the reading agent the writing agent need to be properly synchronize their operations so that the semantics of data sharing are preserved. Black hole search. A black hole is a node that can potentially capture a visiting agent and thus, disrupt an application. Although it implies a malicious intent on the part of the host, a black hole can be as simple as a crashed node. If black holes can be located, then traversal paths can be rerouted without incurring further loss of mobile agents. Stabilization. Transient failures occasionally corrupt the global state of a distributed system, and stabilization is an important technique for restoring normal operation. To stabilize a network, a mobile agent patrols the network, and plays the role of traveling repairperson. Multiple agents can expedite the process of stabilization, but in doing so, some synchronization issues need to be resolved. We will address how multiple agents can be deployed for maximum speedup of a stabilizing application. This article has seven sections. Section 2 describes the model and the notations. Sections 3 through 6 address the four problems highlighted above. Finally, Section 7 contains some concluding remarks. The model We represent a distributed system by a connected undirected graph G = (V, E), where V the set of nodes representing processes, and E is the set of edges representing channels for interprocess communication. Basic interprocess communication uses messages that are received in the same order in which they are sent. Processes do not have access to a global clock. Whenever appropriate, we will represent the program for each process of a set of rules. Each rule is a guarded action of the form g → A, where g is a boolean function of the state of that process and those of its neighbors received via messages, and A is an action that is executed when g is true. An action by a process involves several steps, these include: receiving a message, updating its own state, and sending a message. The execution of each rule is atomic, and it defines a step of the computation. When more than one rule is applicable, any one of them can be chosen for execution. The scheduler is unfair. A computation is a sequence of atomic steps. It can be finite or infinite. Definition. A global state of the system is a tuple (s(0), s(1), . . . , s(n)), where s(i) is the state of process i, together with the states of all channels. Each agent is launched by an initiator node that is also called the agent's home. An agent consists of the following six components: 1. The identifier id (also called a label), usually the same as the initiator's id. The id is unnecessary if there is a single agent, but is essential to distinguish between multiple agents in the same system. 2. The agent program: this program is executed when the mobile agent lands on a host machine. 3. The briefcase B containing a set of data variables. It defines the state of the agent computation, as well as some key results that have to be carried across nodes. 4. The previous process PRE visited by the agent 5. The next process to visit NEXT that is computed after every hop 6. A supervisory program for bookkeeping purposes. Each hop by an agent is completed in zero time. The agent computation is superimposed on the underlying distributed computation executed by the network of processes. The state of the agent is defined by its control and data variables, and the state of the distributed system consists of the local states of all the processes. When an agent executes a step, it changes its own state, and also potentially changes the state of the host on which it executes that step. Unless specified otherwise, the visit of an agent at any node will be treated as an atomic event. Finally, an agent model that involves multiple agents can be either static or dynamic. In the static model, the number of agents and their homes are known at the beginning of the application, and they remain unchanged throughout the entire life of the application. In the dynamic model, an agent can spawn child agents, or kill them whenever necessary. Unless specified otherwise, we will consider the static model only.
doi:10.1002/9781118135617.ch5 fatcat:wifipc6og5hh3oqcenhemqmrfq