Agents Tutorial

Goal

The goal of this lab is to develop a simple, tutorial application which makes use of mobile agents in Java. The aim of the application is to obtain information about a remote server's configuration, as encoded in its Java Properties. Such properties can be read on a local system by using the getProperties method of the System class. You should look in the Java API documentation to find out about which properties can be read.

Now that you have learnt how to use RMI, you might like to get some hints by looking at the corresponding tutorial based on RMI, which is available at: Lab 3.

However, in the current lab you will have to implement the application in the agent system known as Jade, which allows you to program everything in Java. This means that, instead of making an RMI call to the server whose properties you want to investigate, you should send a mobile agent to the server, with a description of which properties are to be read. At the server, the agent should get hold of the values of these properties and return to the originator of the query with these values.

What you need to do

To carry out this lab, you first need to install the JADE Agent system on your computer. Jade agents are implemented as an extension of Java, and the system contains a set of Java source and jar files. The most recent version of Jade is 4.0.1, and this can be downloaded from the site: http://jade.cselt.it/download.php

Before you can perform the download, you will need to accept the license conditions and provide your e-mail address. You then have access to the download page itself, and are recommended to fetch the .ZIP file jadeAll.zip (whose full name is in fact JADE-all-4.0.1.zip) into your root directory. You can do this as an ordinary user in one of the databars, or use any other computer which has Java 5 or newer installed.

When unpacked, the ZIP file expands into a number of smaller ZIP files, each of which can be unpacked to produce a number of files and sub-directories within a main directory called jade. The bin sub-directory contains the executables; the src sub-directory contains the source code for the entire system. A series of simple examples of the use of Jade can be found in the various sub-directories of the directory src/examples.

The latest version of the Jade user manual can be found in the doc sub-directory, but it is also available on-line via the link given below. You are strongly recommended to read the manual before trying any experiments, as it tells you how to set up your system.

For a general introduction to Jade, consult the Primer and Tutorial written by Jean Vaucher and Ambroise Ncho, to which a link is given below. This Primer also includes a useful, easy-to-follow set of instructions for setting up the system.

Please note that the syntax for the jade.Boot commands has changed between version 3.X and 4.X.
To execute without a GUI, you have to add "-agent" in front of the list of agents, and the agents now have to be delimited by ";" and not " " (running under Unix/Linux remember to use "\;").

You are recommended to try out some of the ready-made examples before attempting to implement a Jade version of SystemInfo.

As this is a "tutorial" lab, there is no need to hand in a write-up of your results. The next lab will, of course, be a more serious challenge.

Useful Links


Robin Sharp.
Last modified 20110312 by Bo Holst-Christensen