SOFTWARE – PRACTICE AND EXPERIENCE Softw. Pract. Exper. 2010; 40:363–386 Published online 10 February 2010 in Wiley InterScience (www.interscience.wiley.com). DOI: 10.1002/spe.963 An efficient and secure agent code distribution service J. Cucurull 1, , , G. Navarro-Arribas 2 , R. Mart´ ı 1 , S. Robles 1 and J. Borrell 1 1 Department of Information and Communications Engineering, Universitat Aut` onoma de Barcelona, 08193 Cerdanyola, Spain 2 IIIA, Artificial Intelligence Research Institute, CSIC, Spanish National Research Council, 08193 Cerdanyola, Spain SUMMARY Mobile agents (MAs) are autonomous computing entities that dwell in agent platforms and have the ability to move to different locations as needed. They are typically composed of code, data, and a state. The performance of MA migrations is always penalized by the need of carrying these components to each visited location. In contrast to the agent data and state, the agent code is static during the whole agent life. Therefore, optimizing the agent code management, the agent migration performance can be improved. The main contribution of this article is the definition of a global cache service to efficiently and securely deal with the distribution of agent code. An implementation of the service has been developed, and its benefits have been extensively demonstrated by a set of performance tests carried out in different scenarios. Copyright 2010 John Wiley & Sons, Ltd. Received 7 September 2009; Revised 29 November 2009; Accepted 3 December 2009 KEY WORDS: mobile agents; code distribution; XACML contract; REST; performance 1. INTRODUCTION Mobile agents (MAs) [1] are proactive and reactive autonomous entities that have the ability to move between different locations of a distributed system. They live in environments called Agent Platforms (APs) and are typically composed of code, data, and a state. The agent code contains the instructions that the agent will execute during its life. The agent data is information produced, used, and/or modified by the agent during its life. And the agent state is basic information that is necessary to stop and resume the agent execution at a specific point of it (in agent systems developed with interpreted programming languages usually only the agent data is considered; in these cases only weak agent mobility is possible [2]). These components are usually moved in each agent migration. The MA migration performance has been always penalized by the need of carrying the three components from which agents are composed to each visited location. The agent data and state must always be transferred from location to location since they dynamically change. Nevertheless, since the agent code is static during the whole life of the agent, and it is usually larger than the Correspondence to: J. Cucurull, Department of Information and Communications Engineering, Universitat Aut` onoma de Barcelona, 08193 Cerdanyola, Spain. E-mail: jcucurull@deic.uab.cat Contract/grant sponsor: MEC Spanish Ministry; contract/grant numbers: TSI2006-03481, eAEGIS TSI2007-65406- C03-02, ARES—CONSOLIDER INGENIO 2010 CSD2007-00004 Contract/grant sponsor: AGAUR Catalan Agency; contract/grant number: 2005-FI-00752 Contract/grant sponsor: European Social Fund (ESF) Copyright 2010 John Wiley & Sons, Ltd.