Software Update via Mobile Agent Based Programming Lorenzo Bettini Rocco De Nicola Michele Loreti Dipartimento di Sistemi e Informatica, Universit ` a di Firenze Via Lombroso 6/17, 50134 Firenze, Italy Abstract We describe a system that permits maintaining the software in- stalled on several heterogeneous computers distributed over a net- work by taking advantage of the mobile agent paradigm. The appli- cations are installed and updated only on the central server. When a new release of an application is installed on the server, agents are scattered along the network to update the application on the clients. To build a prototype system we use X-KLAIM, a program- ming language specifically designed to program distributed sys- tems composed of several components interacting through multiple tuple spaces and mobile code. Keywords Mobile Agents, Mobile Code, Distributed Software Update. 1. Introduction A typical way of updating software in a network is to store the applications and the updates in a central server; the clients can then download the latest version of the software (pull strategy), and manually update their own computers. In this paper, we describe how to use mobile agents [7, 13] to develop a prototype system that permits automatically maintain- ing the software installed on several heterogeneous computers dis- tributed over a network. The applications are installed and updated only on the central server, where clients register for applications. When a new release of an application is installed on the server, some agents are scattered along the network to update the applica- tion on the clients. These mobile agents implement a push strategy: subscribed customers are provided with the latest software as soon as it is available. In order to build a prototype system support- ing the movement of agents to different machine and the update of software we use X-KLAIM, a programming language specifi- cally designed to program distributed systems composed of several components interacting through multiple tuple spaces and mobile code. We chose to use X-KLAIM because it has many features that make implementing a distributed applications easy and also This work has been partly supported by MURST Projects SALADIN and TOSCA, and by Microsoft Research Ltd. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. SAC 2002, Madrid, Spain c 2002 ACM 1-58113-445-2/02/03 $5.00. supports strong mobility (a key concept in mobile agent program- ming). In the literature concerning mobility (see e.g. [12, 8, 9] and the references therein) one often reads that the main advantage of us- ing mobile agents is that they make distributed applications more efficient because they reduce network communications and interac- tions. Indeed when applications over a global network rely on com- munication protocols that require multiple interactions, network is heavily exploited; this often results in high network traffic and, in absence of dedicated and fast communication channels or private subnets, the performance decreases significantly. However, reduced network communication is not always the principal motivation of using mobile agents. There are some re- sults about mobile agent performance [2, 11] showing that a mo- bile agent may require more network traffic than other paradigms, mainly because of the data and code that have to be transported during the migration from one site to another. Indeed, the application proposed here is only marginally con- cerned with traffic efficiency, we are instead interested in the de- sign of distributed applications. In fact we think that the mobile agent paradigm has some good points for dealing with distributed maintenance: the designer of the updating procedure can use mobile agents to run the program completely locally on the machine where the installation has to take place. Thus, such an agent is not much different from a procedure built for updating lo- cal applications and the same code can be easily adapted (or completely reused) also for updating the applications over a network; mobile agents for updating programs guarantee also greater flexibility: a new release of an application often requires modifying also the installation procedure. This can be made transparent to the end user: the update agent can carry all the needed information for the installation; mobile agents can encapsulate transactions, which take place locally, with no other network connection, apart from that needed to send the agent to a remote computer. The rest of the paper is organized as follows: Section 2 intro- duces the X-KLAIM programming language, and Section 3 de- scribes the system for software maintenance via mobile agents and a possible implementation in X-KLAIM. Section 4 concludes the paper. 2. An overview of X-Klaim X-KLAIM (eXtended KLAIM) [4] is an experimental program- ming language specifically designed to program distributed sys- tems composed of several components interacting through multiple