Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address:

Unleash mobile agents using Jini

Leverage Jini to mitigate the complexity of mobile agent applications

Mobile agents are ubiquitous in today's software applications—from e-commerce to network management to data warehousing. Mobile agent developers implement these solutions in Java for several reasons: First and foremost, Java's built-in object-oriented language features are conducive to agent technology. Second, developers can be extremely productive using Java. Essentially, Java provides tools that simplify and expedite complex software development tasks.

Jini is one such Java tool that allows us to build distributed applications with relative (and I emphasize relative) ease. This article introduces a mobile agent framework based on the Jini architecture. Jini provides a powerful tool in a Java developer's toolbox. Just as robots automate many aspects of manufacturing a computer, Jini automates and abstracts distributed applications' underlying details. These details include the low-level functionality (socket communication, synchronization, and so on) necessary to implement the high-level abstractions (such as service registration, discovery, and use) that Jini provides. Let's begin by looking briefly at agents.

Note: In this article, I do not introduce the Jini framework (see Resources for links to introductory material); I will just review the basics.

Agents

Agent is an overloaded industry buzzword—10 different gurus would give you 10 different definitions of the term. I prefer to talk about agents in terms of high-level functionality. I like the way Stan Franklin and Art Graesser view agents as discussed in their research paper "Is It an Agent, or Just a Program? A Taxonomy for Autonomous Agents" (1996). (Todd Sundsted references this paper in his article "An Introduction to Agents" (JavaWorld, June 1998), an article that makes good on its title's promise.) Instead of providing a rigid (and hence potentially restrictive) definition, Franklin and Graesser identify the following agent properties that enable a classification methodology:

  • Reactive
  • Autonomous
  • Goal-oriented
  • Temporally continuous
  • Communicative
  • Intelligent
  • Mobile


The authors note that an agent might not be a software entity at all, but possibly a robot or even a schoolteacher. In the context of this article and Java development, we can consider an agent a software entity that exhibits some combination of the previous properties.

What can we use mobile agents for? Mobile agents come in a variety of flavors and perform numerous functions:

  • An information agent searches for information residing on remote nodes and reports back to the source
  • A computation agent seeks underutilized network resources to perform CPU-intensive processing functions
  • A communication agent couriers messages back and forth between clients residing on various network nodes


Let's now look at a mobile agent framework that employs the Jini architecture.

Mobile agent framework

This mobile agent framework consists of two main components. The first component is the mobile agents themselves; that is, entities with some job to do. The second component is the mobile agent host(s), the service that provides the mobile agents' execution platform. In a distributed environment, we can have one-to-many agent hosts as well as one-to-many agents. To be an active agent platform, a given node in the system must have at least one active agent host. Figure 1 depicts the framework components.

Resources