mobile agents mouse house creative technologies mike obrien

24
Mobile Agents Mouse House Creative Technologies Mike O’Brien

Upload: marco-ringland

Post on 31-Mar-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mobile Agents Mouse House Creative Technologies Mike OBrien

Mobile Agents

Mouse House Creative Technologies Mike O’Brien

Page 2: Mobile Agents Mouse House Creative Technologies Mike OBrien

Outline

• Introduction to Mobile Agents• Where & Why use Mobile Agents• Mobile Agent Architecture• Some Problems• Java based toolkit for Agents (ASDK)• Introduction to Aglets• Aglet Architecture• The Road Ahead for Mobile Agents• Competing Technologies• Conclusions

Page 3: Mobile Agents Mouse House Creative Technologies Mike OBrien

What is a Mobile Agent?• Program that can migrate from system to

system within a network environment– Performs some processing at each host

• Agent decides when and where to move next

• How does it move?– Save state– Transport saved state to next system– Resume execution of saved state

Machine A Machine B

Searchengine

Page 4: Mobile Agents Mouse House Creative Technologies Mike OBrien

Why Mobile Agents: Motivations

• Network Management Bottlenecks– Unnecessary Bandwidth Utilization

(Client/Server)

• Low bandwidth connections– Users let the agent roam on their behalf– Wait for results

• Asynchronous transaction capabilities• Agents can have Intelligence

– Making decisions– Process Information– Communicating with other Agents

Page 5: Mobile Agents Mouse House Creative Technologies Mike OBrien

Where are Mobile Agents Used Today?

• Network Management Systems– Discovery Agents– Configuration Agents

• Information Retrieval– Best price, interesting news, music,

monitor stock market• Data Mining• Search Engines

Page 6: Mobile Agents Mouse House Creative Technologies Mike OBrien

Mobile Agent Architecture• Agent transfer protocols

– Like all data transfer from one system to another, agents must adhere to a protocol

• Agent execution support– Networked systems that use agents, must

support an environment for them to run in– AEE ( Agent Execution Environment )

• Agent construction and applications– Construction tools allow users define the

task, set the parameters and proceed to launch the agents onto the networks

Page 7: Mobile Agents Mouse House Creative Technologies Mike OBrien

Migration Technology

• Common execution language – Interpretive scripting language– Java

• Process persistence – convert the object's state (variables, stack,

and possibly even the point of execution) into a data form suitable for transmission over a network.

• Communication mechanism between agent hosts – TCP/IP, or even higher level HTTP

Page 8: Mobile Agents Mouse House Creative Technologies Mike OBrien

Agent Host Requirements• An agent host must allow multiple agents to co-

exist and execute simultaneously • An agent host must allow agents to

communicate with each other and the agent host

• An agent host must be able to negotiate the exchange of agents

• An agent host must be able to freeze an executing agent and transfer it to another host

• An agent host must be able to thaw an agent transferred from another and allow it to resume execution

Page 9: Mobile Agents Mouse House Creative Technologies Mike OBrien

Agent Requirements

• An agent must have its own unique identity

• Agents must be able to determine what other agents are executing in the agent host

• Agents must be able to determine what messages other agents accept and send

Page 10: Mobile Agents Mouse House Creative Technologies Mike OBrien

Problems

• Security for hosts– As a system, how do I make sure that the

agent I let into my AEE is not an “evil” agent?

– Encrypted signature– Resource negotiation Security for agents

• Security for agents– protection against hostile hosts that would

seek to dissect or modify them– Little to protect agents from snooping eyes!

Page 11: Mobile Agents Mouse House Creative Technologies Mike OBrien

Mobile Agents in Java

• A mobile agent in Java is called an “Aglet”– Light weight agent

• Why use Java– Platform independence!– Create once, go anywhere– Price ….. FREE TOOLKITS ( ASDK )– Hosts can provide an environment for the

aglet to execute within

Page 12: Mobile Agents Mouse House Creative Technologies Mike OBrien

Developing A Mobile Agentusing the

AGLETS SOFTWARE DEVELOPMENT KIT

(ASDK)

“An environment for programming mobile Internet Agents in JAVA”

Page 13: Mobile Agents Mouse House Creative Technologies Mike OBrien

ASDK System Goals

• Easy and Comprehensive model for programming agents without modifying the Java VM

• Support Dynamic and Powerful Communication with know and unknown agents

• Design a harmonious architecture with existing Web/Java Technology

Page 14: Mobile Agents Mouse House Creative Technologies Mike OBrien

What are Aglets ?

• Aglets are Java objects that can move from one host on the Internet to another.

• When an Aglet moves it takes along its program code as well as its data.

How Does the ASDK Work ?

Page 15: Mobile Agents Mouse House Creative Technologies Mike OBrien

Aglet API Overview

Page 16: Mobile Agents Mouse House Creative Technologies Mike OBrien

Aglet API Overview

Aglet Abstract class which defines thefundamental methods

Aglet Proxy Handle of the aglet, provides commonmeans of access (obtain proxy agent)

Message Communicate through message exchangeNow-Type, Future-Type, Oneway-Type

Aglet Context Interface to communicate with theruntime evironment

Page 17: Mobile Agents Mouse House Creative Technologies Mike OBrien

Creating an Aglet

• First we determine what our Aglet is going to accomplish (or do).

• Extend the ABSTRACT class Aglet (this class is provided with the ASDK)– This abstract class provides the

fundamental methods used to control both the mobility and the life cycle of the mobile agent.

Page 18: Mobile Agents Mouse House Creative Technologies Mike OBrien

Primary Methods for Lifecycle and Mobility

ControlMethod Behaviour

dispose() Dispose of the aglet

Dispatch(URL) Dispatch the aglet to thedestination specified in the URL

Deavtivate(duration) Instruct the aglet to store itselfinto a persistent medium

GetAgletInfo() Get information on the aglet

* Some of these methods are final and cannot be overridden.

Page 19: Mobile Agents Mouse House Creative Technologies Mike OBrien

Specifying Behaviour

Method Behaviour

onCreation() Called upon creation of the object

onDisplay() Called just after the dispose method iscalled, used to release resources

run() Called whenever instance is created orresumes, Define Common Tasks

handleMessage() Performs task according to the kind ofmessage received

Page 20: Mobile Agents Mouse House Creative Technologies Mike OBrien

Aglets at Runtime

• Currently aglets use the Agent Transfer Protocol (ATP) as a default implementation of the communication layer (ATP is modeled after HTTP)

• Used on the Tahiti aglet server• Use the Aglets Server Interface to

write application capable of hosting, receiving and dispatching aglets

Page 21: Mobile Agents Mouse House Creative Technologies Mike OBrien

Future Applications

Page 22: Mobile Agents Mouse House Creative Technologies Mike OBrien

Future Applications 2

Page 23: Mobile Agents Mouse House Creative Technologies Mike OBrien

Competing Technologies

• Message passing systems• Remote Method Invocation (RMI)• Common Object Remote Broker

Architecture (CORBA)

Page 24: Mobile Agents Mouse House Creative Technologies Mike OBrien

Conclusions

• Advantages– Bandwidth & Performance– Working offline– Monitor or find information

• Disadvantages– Security concerns for both hosts &

agents– Tough competition