Voyager: The Agent SuperORB Graham Glass ObjectSpace, Inc Abstract WorldAPI -------- One of the toughest problems facing the programmers of tomorrow is: "How can my applications efficiently access the tremendous amount of information and services available on the net?" The term "services" is used to distinguish the problem from simple Yahoo-style retrieval - many useful operation cause actions to occur. For example, an application might want to: 1. find the latest stock price of a particular company 2. obtain the zip code of a particular county 3. sell stock 4. purchase tickets to a concert 5. calculate a fourier transform 6. change the temperature in a house 7. obtain a biography of particular person Currently, every one of these operations would require a great deal of tedious custom work. For example, let's say you want to get the zip code of a particular county. There are several Web sites on the Internet that contain this information in various formats. To access this information from an application, a programmer would have to perform the following steps: Find the best web site using a service such as Yahoo. Connect to this site using a URL or socket connection. Read the web page as HTML. Parse the web page and extract this information. Return it to the application. The problem becomes worse when multiple sites contain the same or slightly differing information. Ideally, the application should access the site with the best performance, and switch between competing sites when necessary. One solution to this problem is to create a single api (applications programming interface) that allows programs in any language to access the world's resources as if they were a single entity. Programs would be able to retrieve information and request services without knowing who is answering and how the service was being invoked (CORBA, ActiveX, plain sockets, etc.). ObjectSpace is creating such an interface and has given it the codename WorldAPI. Voyager ------- ObjectSpace is currently keeping the architecture of WorldAPI under wraps. However, one aspect of the architecture that it is publicly disclosing is its heavy use of mobile agents. These agents are being used to dynamically move knowledge of the world's resources around the global network to facilitate intelligent caching and parallel processing. The ObjectSpace mobile agent framework is written in Java and is called Voyager. Voyager is not just a facility for creating an agent that moves around and performs pre- programmed tasks. It is an easy-to-use superset of traditional ORB technology that includes the following features: Agents may be created anywhere on the network. You can send messages to an agent using the standard Java syntax. Voyager performs all of the necessary marshalling and network routing to perform remote method invocation. Synchronous, asynchronous, and deferred synchronous (promise) methods calls are supported. A remote method can be terminated after it has been sent. You can create messages dynamically in a manner similar to the Corba DII. Objects may be queried for their interface. Voyager will use the CORBA 2.0 IIOP for communications so that it can communicate with CORBA 2.0 objects. Exceptions that occur remotely are marshalled and then thrown locally in a manner that is transparent to the Java programmer. Objects can be moved or can move under their own control. Message delivery works transparently even if the sender and receiver are simultaneously moving. Agents are automatically persistent. Voyager has a robust distributed garbage collection system that is heartbeat-based and performs dynamic heartbeat optimization to reduce the need for heartbeats on an as-needed basis. Any Java object can be instantiated and controlled remotely. It does not need to change its interface or support special methods to be Voyager-enabled. Stub generation is done automatically from the .class files. You do not need to have access to the original source code. Both connection (TCP) and connectionless (UDP) communications are supported, in any combination. Voyager comes complete with a distributed naming service, multicast support, fault- tolerant group communications, and an events system. You may dynamically attach objects to an agent. These objects can handle a message in place of or in addition to the agent. For example, you can attach a Probe object to an agent that allows you to see and log all messages that an Agent receives, or a Replicator object that replicates all message to copies of the agent. As an agent moves, the attached objects can elect to automatically move with the agent. Voyager supports remote thread priorities. Voyager will also include a C++ toolkit that allows C++ programs to create and control agents from the C++ programming language. The C++ toolkit, tentatively named Agent, will include a high-performance cross-platform multi-threaded agent ORB.