O'Reilly logo

Mobile Agents by Wilhelm R. Rossak, Peter Braun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.3 Agent Model 221
Reply A reply is an SATP message that is sent from the receiver agency to the
sender agency as answer to a request.
Request A request is an SATP message that is sent from a sender agency to a
receiver agency.
Transaction A migration strategy might consist of several transfers. Because
a migration strategy must be an atomic process, which is either exe-
cuted completely or not at all, Kalong provides transaction management
according to a Two Phase Commit (2PC) protocol.
Transfer A transfer is the process of sending agent information from a single
sender agency to a single receiveragency. If the transfer includes an agent’s
state information, then it is a migration.
URL Each agency must have one or many addresses in the form of a URL.
Kalong does not require a specific format of URLs, because addresses are
only forwarded to the network adapter.
6.3 Agent Model
6.3.1 Agents and Agent Contexts
In Kalong, an agent must be a Java object of type Serializable or any
subclass, because an agent’s object state must be marshaled to be sent to a
destination agency. The object state contains all the agent’s attributes, which
must also be serializable.
Agent Names
An agent must have a globally unique name that does not change during its
lifetime. To be globally unique means that there must never be two agent
instances with the same name in the entire agent system. Kalong does not
specify how to obtain such a name and does not define any structure for
a name, except that a name must be codeable into a Java String object.
Kalong can only verify that no two agent instances with the same name
exist when new agents are registered with Kalong and when agents migrate
in. The agent manager is responsible for guaranteeing uniqueness with an
appropriate algorithm for generating agent names.
222 Chapter 6 Specifications of the Kalong Mobility Model
Data Items
Besides the agent’s object state, agents also have an external state, which
is defined as a set of ser ializable Java objects that are accessible by the
agent but are not part of the object state. Each element of the external
state must have a unique name to be stored and accessed by its owner.
A name must be codeable as a Java String object. Data items of the exter-
nal state must not be accessible to other agent instances. A single data item
should not be shared with another agent instance, because it is copied when it
migrates.
Each data item has a status that can be defined or undefined. If a data
item is transferred to another agency, it is locally set to undefined and set
to defined at the destination agency. Thus, it is possible to let data items
remain at the home agency even if the agent has migrated to another agency.
The agent can request those data items from its home agency later. Kalong
must ensure that a data item currently set to undefined is never read or
written by the agent manager.
Another potential problem is that a data item could be uploaded to the
wrong agency. For example, data items could be overwritten accidentally at
a home agency, when the agent has already defined a mirror agency. Addi-
tionally, we have to consider a security problem. A malicious agency might
send forged data-upload messages to a home or mirror agency and thereby
manipulate data items. The problem could also occur if a malicious agency
requests a data item from a home agency. If the state of this data item is set
to undefined at the home agency, the agent will not be able to download
the same data item later.
Unfortunately, we cannot solve this problem completely; we cannot pro-
tect the home agency against malicious access. However, we can provide a
two-step technique that will allow the agent to notice a malicious access and
be able to react.
1. Downloading and uploading data items always changes the state of
the data item. If a data item is downloaded, then its state is set to
undefined at the home agency. If the agent later tries to download this
data item again, it receives an error message.
2. If a malicious server loads a data item, modifies it, and then uploads it
again, the state is set to defined at the home agency. The agent would
not notice the manipulation in this case. Therefore, we introduce a

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required