Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Solve real problems with aglets, a type of mobile agent

Part 2 of this series explains the significance of mobile agents, such as aglets -- IBM Japan's Java-based, autonomous software agent technology

  • Print
  • Feedback
This month's Under the Hood is the second in a two-part series of articles about aglets, an innovation developed by IBM Japan. Last month I described the inner workings of aglets, this month I'll discuss the ways in which mobile agent technologies, such as aglets, might fit into the Java developer's toolbox.

Aglets: A refresher

An aglet is a Java-based autonomous software agent. (For more information, see Bret Sommers's explanation of agents.) As used here, a software agent is a program that can halt itself, ship itself to another computer on the network, and continue execution at the new computer. The key feature of this kind of software agent is that both its code and state are mobile.

Aglets are autonomous because once you start them, they decide where they will go and what they will do. They can receive requests from external sources, but each individual aglet decides whether or not to comply with external requests. Also, aglets can decide to perform actions, such as travel across a network to a new computer, independent of any external request.

At heart, aglets are mobile

People use the term "software agent" to talk about more than just mobile agents. Two other meanings of the term are intelligent agents and representatives. Intelligent agents are endowed to some degree with artificial intelligence. They may be mobile as well as intelligent, but they don't have to be mobile. A representative is a piece of software that represents you, like an attorney or an assistant. Representatives stand in for you in your absence. Depending on your instructions to them, representatives can make decisions or even consummate deals on your behalf. Representative agents can be mobile or intelligent or both, but they don't have to be mobile.

Aglets can potentially be endowed with artificial intelligence or serve as representatives, but they need not be either. Fundamentally, they are mobile agents: Java programs that can halt execution, travel across the network (with both code and state in tact), and continue execution at another host.

If you build it, they will come: Using mobile agents

Once an infrastructure of mobile agent hosts is established, mobile agents undoubtedly will be built to populate the infrastructure. But what will those mobile agents do? What will justify building the infrastructure in the first place?

Imagine for a moment that a widespread infrastructure of mobile agent hosts has been established on a network near you. How might you use it?

There are many applications for which mobile agents are claimed to be well-suited. Most of these applications tend to involve searching for information on behalf of a user and possibly performing some kind of transaction when appropriate information is encountered.

Here is a list of some of the more commonly mentioned applications for mobile agents:

Data collection from many places
One of the main differences between mobile code, such as applets, and mobile agents is itinerary. Whereas mobile code usually travels just from point A to point B, mobile agents have an itinerary and can travel sequentially to many sites. One natural application of mobile agents, therefore, is collecting information spread across many computers hooked to a network.

An example of this kind of application is a network backup tool that periodically must look at every disk attached to every computer hooked to a network. Here, a mobile agent could roam the network, collecting information about the backup status of each disk. It could then return to its point of origin and make a report.

  • Print
  • Feedback

Resources
  • Previous Under The Hood articles:
  • The lean, mean virtual machine -- Gives an introduction to the Java virtual machine.
  • The Java class file lifestyle -- Gives an overview to the Java class file, the file format into which all Java programs are compiled.
  • Java's garbage-collected heap -- Gives an overview of garbage collection in general and the garbage-collected heap of the Java virtual machine in particular.
  • Bytecode basics -- Introduces the bytecodes of the Java virtual machine, and discusses primitive types, conversion operations, and stack operations in particular.
  • Floating Point Arithmetic -- Describes the Java virtual machine's floating-point support and the bytecodes that perform floating point operations.
  • Logic and Arithmetic -- Describes the Java virtual machine's support for logical and integer arithmetic, and the related bytecodes.
  • Objects and Arrays -- Describes how the Java virtual machine deals with objects and arrays, and discusses the relevant bytecodes.
  • Exceptions -- Describes how the Java virtual machine deals with exceptions, and discusses the relevant bytecodes.
  • Try-Finally -- Describes how the Java virtual machine implements try-finally clauses, and discusses the relevant bytecodes.
  • Control Flow -- Describes how the Java virtual machine implements control flow and discusses the relevant bytecodes.
  • The Architecture of Aglets-- Describes the inner workings of Aglets, IBM's autonomous Java-based software agent technology.