Alfonso Fuggetta, Gian Pietro Picco, and
Giovanni Vigna."Understanding Code Mobility".
IEEE Transactions on Software Engineering, vol. 24, no. 5, pp.
342-361.
In the code on demand paradigm, the client component owns the resources needed
for the execution of a service, but lacks the know-how needed to use them in performing the service. The corresponding code component can be
retrieved from a remote server component, which acts as a code repository, and subsequently executed, thus providing enhanced flexibility by allowing the
server to change dynamically the behavior of the client. This is the scheme typically employed by Web applets, or by the parameter passing mechanism in
Java/RMI.
In the remote evaluation paradigm, the client component owns the know-how about the
service that must be executed, but lacks the resources needed to perform the service, which are owned by the server
component. A sort of enhanced client-server interaction takes place, where the client sends a
request to the server, but includes also the code component required to perform the service. After the code component is received on the server, the
interaction proceeds as in the client-server paradigm, with the code component accessing the resources now co-located with it, and sending the results back
to the client. This design solution underlies well known systems like remote shells and SQL servers.
In the mobile agent paradigm, the client component knows how to perform the service but lacks the resources, which are owned by the
server. The client component then autonomously migrates to become co-located with the server, and thus be able to perform the service by exploiting local
access to resources.
Mobile code systems supporting strong mobility enable an executing unit to move as a whole by retaining its
execution state (e.g., the instruction pointer) across migration. Migration is transparent, in that the
executing unit resumes execution on the new host right after the instruction that triggered the migration.
Mobile code systems supporting weak mobility enable the transfer of application code
towards or from a different host. At destination, the code may be run into a newly created
executing unit or it may be linked into an already running one.
Executing units represent sequential flows of computation. Typical examples of
executing units are single-threaded processes or individual threads of a multi-threaded process.
It is the set of bindings to resources that are being shared with other agents.
In most Java implementations, it is constituted by the objects that are
associated to the agent.
It is the ability to resolve the name of a class at run-time by downloading the
class' bytecode from a remote node and linking it on the local one. This
technique is enabled in Java by the fact that the class loader is
programmable.