3 Mobile agents using the global store

Our mobile agent platform uses the global store abstraction to offer a simple API for agent mobility. The agent platform provides fault tolerance, agent mobility without site dependencies, and permits home communication without any dependencies in a general and uniform way. An agent can create any number of global store. One global store for its own state, with which it can migrate. We use one global store shared between agents, for communication: that global store can be used to implement Send & Receive operation in a few lines of code. Our agents have the following properties:

The interface functions to use the mobile agents module are the following:


MA={New Agent.agent init(NewObj AgentStore)}

Creates a new agent with its own store. Agent.agent is the agent class and NewObj is the returned procedure to create new objects in the agent store. The second returned parameter AgentStore is a reference to the agent store.


{MA run(F)}

An agent is a set of subtasks where a subtask is a computation that uses the resources at a single site. A substak is modeled by the functor F. The call run(F) executes F in the agent home site i.e.the site where the call MA={New Agent.agent init(NewObj AgentStore) is executed. F must export the two following fields: AgentStore and NewObj. A agent(ill_formed_functor) exception is raised if the AgentStore and NewObj are undefined.


{MA run(IPhostaddress F)}

Move the agent MA to host IPhostaddress and execute the functore F remotely. F has the same form restriction as the functor F parameter of the run call.


{MA movehome()}

Move the agent MA to its home site


{MA send(Message)}

The executed send call sends asynchronously a message to MA.


{MA receive(Message)}

The executed receive call receives a message Message at MA from other agents.

Ilies Alouini
Version 1.1.1 (20000902)