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

Agents: Not just for Bond anymore

Learn what agents are and how to create them using IBM's Aglet Workbench

  • Print
  • Feedback

Page 4 of 6

Agents vs. distributed objects vs. messaging-oriented middleware

Distributed Systems Architectures

Distributed objects architecture



By now, most Java programmers are familiar with distributed objects and how they can be used to partition a system across several machines, as shown in the diagram Distributed objects architecture. Java RMI (remote method invocation) and several implementations of the CORBA specification are available to Java programmers. Using distributed objects, the Java programmer can invoke methods on objects residing on other machines as easily as invoking methods on local objects.

In addition to distributed objects, other distributed computing models can be used to segment systems over a network. Messaging-oriented middleware (MOM), yet another buzzword, acts similarly to traditional RPC (remote procedure call) systems, but with a twist. MOM, whose architecture is described in the diagram Messaging-oriented middleware architecture consists of messages that are brokered by one or more "post offices," which then forward these messages to interested parties. This model is advantageous in that it can support systems of temporarily disconnected clients (such as notebook computers or machines with low-reliability network connections).

Distributed Systems Architectures

Messaging-oriented middleware architecture



Mobile agents differ from both of these distribution mechanisms: With mobile agents, executable content is moved across the wire. In this regard, a mobile agent can be considered a distributed object that moves. Indeed, the Object Management Group's Mobile Agent Facility is in the process of determining how agents fit into the world of CORBA. It is hoped that OMG's work, as well as that of other standards bodies, will result in a set of common concepts, communication mechanisms, and protocols for agent-based applications. More information about these efforts can be found in the Resources section.

Agent applications

Deciding which distributed computing paradigm to use depends on the application you are attempting to build. Each has advantages over the others for a given problem domain. This section outlines some parameters that you can use to determine whether a particular application lends itself to an agent-based implementation. This list of parameters is by no means exhaustive (or authoritative), but it can provide the basis for an architecture discussion.

User passivity/data timeliness
Applications that demand immediate reaction to incoming streams of real-time data, regardless of whether the users are at their desk or not, fit well into an agent-based architecture. This is perhaps the classic application of agents, whereby the agent acts as a digital proxy for a human user, interacting with incoming data streams on the user's behalf. A good example of such an application is outlined below in the section on distributed searching.


Multi-staged/multi-processed calculations
Cumbersome calculations often can be broken into discrete units for distribution among a pool of servers or processors. Each of these discrete units can be assigned to an agent, which is then dispatched to an "agent farm," where the work is actually performed. Upon completion, each agent can return home and the results can be aggregated and summarized. An example of such an application appears below in the virtual supercomputer section.


Untrusted collaborators
Mobile agents can collaborate with other agents by meeting in pre-specified "neutral turf." These agents could be from different product groups within the same organization or even from different, possibly competing, companies. Like distributed objects, agents communicate through well-defined interfaces and are usually protected from intrusion or inspection by other agents by the agent host. Unlike distributed objects, however, a compromised agent rarely poses a security threat to the owner's network, since the agent does not have access to internal network resources until it returns home. Even then, it can be barred access to networked resources by the agent host.


Low-reliability/partially-disconnected networks
In systems with low-reliability or frequently disconnected networks, agents can save network retries by moving the executable content to the data source rather than repeatedly attempting network connections to the data source. An example of such an environment is one in which a majority of users rely on notebook computers networked via dial-up connections. Prior to disconnecting from the network, agents can be sent to a server to perform offline calculations. Upon reconnecting, the agents can be recalled to the notebook machine for local execution and a manipulation.


Agent services and tools

A variety of product and services companies offer agent-based solutions. Most of these advertise the ability to sift through newsfeeds and Web sites for information, retrieving interesting content offline for rapid perusal. PointCast and BackWeb exemplify this model in product offerings of the same names. My Yahoo! offers similar functionality as a service. The FireFly network takes this model a step further by attempting to introduce people with similar interests in music and video through online chat and discussion groups.

  • Print
  • Feedback

Resources