Strong Agent Mobility for Aglets based on the IBM JikesRVM Giacomo Cabri, Luca Ferrari, Letizia Leonardi, Raffaele Quitadamo Dipartimento di Ingegneria dell’Informazione – Università di Modena e Reggio Emilia Via Vignolese, 905 – 41100 Modena – ITALY E-mail: { cabri.giacomo, ferrari.luca, leonardi.letizia, quitadamo.raffaele}@unimo.it ABSTRACT Mobility enables agents to migrate among several hosts, becoming active entities of networks. Java is today one of the most exploited languages to build mobile agent systems, thanks to its object-oriented support, portability and network facilities. Nevertheless, Java does not support strong mobility, i.e., the mobility of threads along with their execution state; thus developers cannot develop agents as real mobile entities. This paper reports our approach for Java thread strong migration, based on the IBM Jikes Research Virtual Machine, presenting our results and proposing an enrichment of the Aglets mobile agent platform in order to exploit strong agent mobility. 1. INTRODUCTION Agents are autonomous, proactive, active and social entities able to perform their task without requiring a continue user interaction [22]; thanks to the above features, the agent-oriented paradigm is emerging as a feasible approach to the development of today’s complex software systems [17]. Moreover agents can be mobile, which means they can migrate among different sites/hosts during their execution. Mobility is an interesting feature for agents, since they are able to move among networks to find out data and information, to perform load balancing activities, and so on. The exploiting of mobile agents can simplify different issues in the design and implementation of applications and can enable developers to quickly build distributed and parallel systems. Thanks to its portability and network facilities, Java is today the most exploited language to develop mobile agents, and in fact several Java-based Mobile Agent Platforms (MAP) exist [16, 2, 26]. Unfortunately, current standard Java Virtual Machines (JVMs) do not support thread migration natively. With regard to mobility, we distinguish strong mobility, which enables the migration of code, data and execution state of execution units (for instance, threads), from weak mobility, which migrates only code and data [14]. From the complexity point of view, weak mobility is quite simple to implement using well-established techniques like network class loading or object serialization [25]. However, weak mobility systems, by definition, discard the execution state across migration and hence, if the application requires the ability to retain the thread of control, extra programming effort is required in order to manually save the execution state. The transparency of the migration offered by strong mobility systems has instead a twofold advantage: it reduces the migration programming effort to the invocation of a single operation (e.g. a migrate() method), and requires a size of the migrated code smaller because it does not add artificial code. Despite these advantages, most of the mobile agent systems support only weak mobility and the reason lies mainly in the complexity issues of strong mobility and in the insufficient support of existing JVMs to deal with the execution state. It is a common idea that strong mobility should be convenient only in load balancing contexts or when thread persistence is needed to build fault-tolerant applications [7]. Moreover, a weakly mobile system gives the programmer more control over the amount of state that has to be transferred, while an agent using strong migration may bring unnecessary state, increasing the size of the serialized data. To overcome many of these limitations, this paper proposes an approach to support strong thread migration for Java MAPs, based on the IBM JikesRVM [4], which is a Java virtual machine with very interesting features. Our approach significantly differs from other proposals, since it requires neither any modification to the JVM, nor it exploits any pre-processing, but it simply defines an appropriate Java library. The paper is organized as follows: section 2 presents the state of the art, explaining the existing approaches and pointing out their limitations. Section 3 introduces the features of JikesRVM and explains how they can be exploited to build a library for supporting strong mobility. Section 4 presents the Aglets platform and shows how strong mobility can be designed and implemented in such a platform by using our strong mobility library. Finally, Section 5 reports some first performance evaluation tests and Section 6 concludes the paper. 2. STATE OF THE ART The approach presented in this paper aims at implementing strong thread migration in Java, which is not a new idea. Several approaches have been proposed so far and they can be, typically, split into two categories, depending on the fact that they require to modify the JVM (JVM-level approach) to support an advanced thread management or exploit some kind of bytecode instrumentation (Application-level approach) to track the execution state of each thread. Approaches that modify the JVM (such as Sumatra [1], ITS [8], Merpati [27], Jessica2 [31], JavaThread [7] and NOMADS [28]) often introduce the problem of the management of the virtual 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, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. SAC’06, April, 23-27, 2006, Dijon, France. Copyright 2006 ACM 1-59593-108-2/06/0004…$5.00 90