MobileAgents

Embed Size (px)

Citation preview

  • 8/7/2019 MobileAgents

    1/16

    EEL 5937

    Mobile agents

    EEL 5937 Multi Agent Systems

    Lotzi Blni

  • 8/7/2019 MobileAgents

    2/16

    EEL 5937

    Mobile agents

    Mobile agents are autonomous programs which movethough a network and maintain their identitythrough this move.

    This is a stronger concept than code mobilitysuch as Java applets, or client-side Javascript.

    Many agent systems were implemented with supportfor mobility. And for many researchers, agents == mobile agents

  • 8/7/2019 MobileAgents

    3/16

    EEL 5937

    Motivation for mobility(contd)

    Mobile agents can provide better support formobile clients. Reduction of network traffic Asynchronous interaction (good in case of intermittent

    connection) Remote searching and filtering

    Mobile agents facilitate semantic informationretrieval. Move one step above simple keyword based search.

    Mobile agents facilitate real-time interaction witha server Eg. space probes, real time control of a machine tool

    Mobile agent based transactions avoid the need topreserve process state in clients and servers Instead, the process state is carried in an agent

  • 8/7/2019 MobileAgents

    4/16

    EEL 5937

    Motivations for mobility(contd)

    Agent based transactions scale better than RPC-based transactions

    Secure agent-based transactions have loweroverhead than secure RPC.

    Mobile agents allow users to personalize serverbehaviour.

    Agents enable semantic routing.

    Not all these arguments are valid.

  • 8/7/2019 MobileAgents

    5/16

    EEL 5937

    Counter arguments andanswers

    Most counter arguments are based on the factthat What can be done with mobile agents can be done with RPC or

    What can be done on the server, you can do it on the client.

    The software engineering counterargument:whereas each individual case can be addressed insome (ad-hoc) manner without mobile agents, amobile agent framework addresses them all ofthem at once.

  • 8/7/2019 MobileAgents

    6/16

    EEL 5937

    Mobile code

    != mobile agents But, the majority of mobile agent systems imply mobile code

    Transferring code between (heterogeneous)machines.

    Implies machine independent code. Usually, it is implemented with some kind of virtual machine But it can be also implemented with adaptation, recompilation

    etc.

    Types of mobile code:

    Partially Turing machine complete languages (e.g. SQL, SVG) Interpreted programming languages (Perl, Python, Javascript)

    Virtual machine based compiled languages (Java, Telescript)

  • 8/7/2019 MobileAgents

    7/16

    EEL 5937

    Mobile code - applications

    Client-server queries (SQL) Client side browser applets:

    Java applets

    Javascript

    ActiveX controls

    Remote code updates: Software updates

    Plugins

    Active E-mail

    Confirmations Javascript, Visual Basic for Applications

    E-mail viruses and worms

    Mobile agents

  • 8/7/2019 MobileAgents

    8/16

    EEL 5937

    Mobile agents without codemobility

    Seeing control handoff as mobility No code mobility involved.

    Multithreading involves problems.

    Distributed systems as mobile agent systems

    In this approach, mobility is an analysis approach,not a design principle.

  • 8/7/2019 MobileAgents

    9/16

    EEL 5937

    Strong mobility

  • 8/7/2019 MobileAgents

    10/16

    EEL 5937

    Strong mobility

    Strong mobility assumes that agents can move atany point during their execution

    They are usually relying on: Specially designed programming languages (eg. Telescript).

    Modified virtual machines (eg. NOMADS / AromaVM)

  • 8/7/2019 MobileAgents

    11/16

    EEL 5937

    Custom language: Telescript

    Proprietary language, created by General Magicaround 1994-95 Highly influential, without being highly successful

    Interpreted language, which runs on a Telescriptengine. The company implemented engines running on PDAs, PCs etc

    High Telescript: Object oriented language, inspired by Smalltalk

    Compiled to Low Telescript

    Low Telescript Postfix syntax for stack based implementation

  • 8/7/2019 MobileAgents

    12/16

    EEL 5937

    Telescript (contd)

    The basic network configuration is to run aTelescript Engine on each node of the network.

    A network of Telescript Engines provides ahomogenous environment on which to builddistributed systems.

    Basic class: Process. Telescript supportspreemptive, prioritized multi-tasking of Processobjects. A Process instance can be thought of asan object with a life of its own.

    A Place object represents a virtual space in whichother objects can interwork (through localcommunication). Each Telescript Engine can supporta number of places.

  • 8/7/2019 MobileAgents

    13/16

    EEL 5937

    Telescript (contd)

    An Agent object is a Process object which can migratebetween Places. An agent may move between Places on thesame Engine, or between Places which exist on differentEngines. The Telescript notion of a distributed system is a number of distinctly

    located places and a number of Agents which move between these Places.

    Places provide meeting locations for Agents. At a Place,Agents can exchange information and perform computation.Places also route travelling Agents.

    Persistent Objects --- Telescript Engines implicitly save andrecover object state information.

    The Telescript world is divided into "regions". Each Engineuses a "regions" database to route migrating Agents. Placesand Agents are identified using "Telenames": Telename(Locally-Unique-Name, Region-Name)

  • 8/7/2019 MobileAgents

    14/16

    EEL 5937

    Telescript security

    Agents have "attributes" such as "identify" and"owning authority" which uniquely identify theAgent and the entity responsible for it. Theseattributes may be used for authentication.Telescript objects also have a "permit" attributewhich may be used to limit the amount of resourceswhich they may consume (e.g. a Place may ask anAgent to pay it 30 "Teleclicks" before granting itaccess to some resource).

    A secure "permits" feature is crucial to stopAgents from creating a crash-limited number of

    clones of themselves, exhausting resources, orother such anti-social behaviour. Apparently you can't define a legal Telescript Place which holds

    visiting Agents to ransom unless you can circumvent securityfeatures and hack the Interpreter code!)

  • 8/7/2019 MobileAgents

    15/16

    EEL 5937

    Specialized JVM:NOMADS/Aroma

    NOMADS/Aroma is a Java based agent systemwith strong mobility support, developed at Boeingand University of West Florida.

    The standard Java JVM does not allow explicitexecution state capture, thus we can not implement

    hard mobility. There are several solutions:

    Modify (patch) the Sun JVM

    Difficulty because of the native thread usage.

    Implement a new JVM

    Use preprocessors and a standard JVM.

  • 8/7/2019 MobileAgents

    16/16

    EEL 5937

    NOMADS

    Is composed of two parts: the agent executionenvironment (called Oasis) and the AromaVM. Thisprovides two key enhancements:

    Strong mobility: the ability to capture and transferthe full execution state.

    Safe execution: the ability to control the resourcesconsumed by the agents thereby facilitatingguarantees of quality of service and protectingagainst denial of service attacks.

    These features, however come with a performancepenalty.