Mobile Agents with Aglets

advertisement
Mobile Agents with Aglets
By Shane Lunceford
Objectives
By the end of this presentation you should be able to:
 Describe what a mobile agent is
 Explain some possible uses for mobile agents
 Demonstrate knowledge of security concerns with
mobile agent technology
 Set up the IBM Aglet development environment
 Run example aglets offered by IBM
 Create and deploy a “Hello World” aglet
What is an agent?




Used to access, create, or compile
information
It’s an interface, not a complete program
Agents simply tap into existing resources
Database agents are common
Types of agents

Server based agents
–
–

Client based agents
–
–

Common with databases
Many languages
System administrators may use these to monitor your
activities at work
Virus Scanning Utilities
Mobile agents
–
Ability to transfer self, code, and state information from one
host to another
Mobile agents- what are they good for?

The ability to transfer state
–

The ability to run without a network
connection
–
–

Intelligence
Bandwidth concerns
Unreliable connection concerns
Distributed in nature
–
Agents can work together
How do agents work?
Aglets – Agile Applets
 Require an “agent enabled” machine
 Host machines run hosting/deployment
software, such as IBM’s “Tahiti”
 Lifecycle operations
–

Create, Clone, Dispose
Runtime Operations
–
Dispatch, Retract, Activate, Deactivate
Master and slave agents



Agents can communicate with one another
One agent can control another, or several
other agents
Can you think of some uses of these
features?
Security concerns

For the host
–
–
–

Malicious mobile agents
Traceability
Permissions
For the agent
–
–
–
Code capturing / reverse engineering
Sensitive data
Chameleon agents
Getting started - software
Required Software
 Java 1.1.8_010/_16 JDK http://java.sun.com/products/archive/index.html
 Aglet SDKhttp://www.trl.ibm.com/aglets/idoagree103.htm
Suggested Software
 VMware - http://www.vmware.com –
 UltraEdit - http://www.ultraedit.com
“Hello World” example
Package examples.shane;
import com.ibm.aglet.*;
import com.ibm.aglet.event.*;
public class HelloWorld extends Aglet {
public void onCreation(Object init) {
setText("Hello World.");
}
}
Compile and put in your AGLET_HOME\public directory. Don’t
forget to add a shane directory for the package.
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Installing ASDK
Exercise – Running Tahiti


If you are in a classroom where a live demo
is available, stop this presentation now for a
live demonstration.
If you are watching this via the Internet,
please wait one moment and we will
continue.
Exercise – Running Tahiti
Exercise – Running Tahiti
Exercise – Running Tahiti
Exercise – Running Tahiti
Exercise – Running Tahiti
Congratulations!


You have just made your first aglet.
Study the examples given in your
AGLET_HOME\public directory and build
upon them
Summary






Describe what a mobile agent is
Explain some possible uses for mobile agents
Demonstrate knowledge of security concerns with
mobile agent technology
Set up the IBM Aglet development environment
Run example aglets offered by IBM
Create and deploy a “Hello World” aglet
Resources






Mobile Agents, by William T Cockayne and Michael Zyda (Manning
publishing, copyright 1997) ISBN 0-13-858242-4 – Out of print.
http://www.trl.ibm.com/aglets/tahiti1.1/index_e.htm
http://www.trl.ibm.com/aglets/tahiti/tahiti.htm
- Tahiti user guide by IBM
http://www.trl.ibm.com/aglets/idoagree103.htm
- Download ASDK
http://www.cetus-links.org/oo_mobile_agents.html
http://sourceforge.net/projects/aglets/ - Aglet SDK
http://www.mcs.vuw.ac.nz/courses/COMP471/2003T2/aglets/SmithAgl
ets/TahitiAgletServerAndViewer.html
Tahiti Aglet Server and Viewer documentation
Resources - continued







http://www.mip.sdu.dk/~ikk/IA/awb/aglets/doc/install.html
http://www.javaworld.com/javaworld/jw-04-1997/jw-04-hood.html
http://www.javaworld.com/javaworld/jw-05-1997/jw-05-hood.html
http://www.javaworld.com/javaworld/jw-06-1998/jw-06-howto.html
http://www.javaworld.com/javaworld/jw-07-1998/jw-07-howto.html
http://www.javaworld.com/javaworld/jw-09-1998/jw-09-howto.html
http://www.javaworld.com/javaworld/jw-10-1998/jw-10-howto.html
Download