View
220
Download
1
Category
Tags:
Preview:
Citation preview
CSE300
Agent-1.1
Software Agents and AgletsSoftware Agents and Aglets
Kimble Cheron,Professor Steven A. Demurjian,
and Mitch Saba
Computer Science & Engineering DepartmentThe University of Connecticut
191 Auditorium Road, Box U-155Storrs, CT 06269-3155
steve@engr.uconn.eduhttp://www.engr.uconn.edu/
~steve(860) 486 - 4818
CSE300
Agent-1.2
Overview of PresentationOverview of Presentation
IntroductionIntroduction Reasons for Agent Creation Defining Agents Researchers Involved in Agent Development
Technical OverviewTechnical Overview Basic Agent Anatomy Agent Implementation (Aglets) Aglet Environment Aglet Methods
Distributed ComputingDistributed Computing Role of Agents in Distributed Computing Future Evolution of Intelligent Agent Entities
Conclusions and Future ResearchConclusions and Future Research
CSE300
Agent-1.3
IntroductionIntroduction
Age of TechnologyAge of Technology Personal PC as Common as Television
Personal Tasks Performed Using Computers
Postal Operations (Electronic Mail) Banking and Financial Operations (Electronic
Banking) Shopping News Retrieval Stock Information Updates Communication Others
CSE300
Agent-1.4
Reasons for Agent CreationReasons for Agent Creation
Majority of Above Tasks Executed Based on Majority of Above Tasks Executed Based on Direct ManipulationDirect Manipulation Nothing Occurs Unless Mouse, Keypad,
Touchpad is Used Event-Oriented Interactions with End-Users
End-UsersEnd-Users
Majority are Computer Illiterate Depend on Software to Perform Tasks Not Limited to Personal Computers, Embedded
Systems Require Operators The The Software AgentSoftware Agent is the Key to Providing a is the Key to Providing a
Delegated Approach to Direct ManipulationDelegated Approach to Direct Manipulation
CSE300
Agent-1.5
Reasons for Agent CreationReasons for Agent Creation
Potential Reduction of Network LoadPotential Reduction of Network Load Movement of Code to Remote Location Voluminous Data Remains Locally Resident
Addressing Network Latency IssuesAddressing Network Latency Issues Communication of Decision “Instantaneous” and
“Simultaneously” Real-Time Notification Issue: Eliminate Delays
Encapsulate ProtocolsEncapsulate Protocols Change Protocol, Change Agent Reactive to Evolution
Asynchronous, Autonomous, and HeterogeneousAsynchronous, Autonomous, and Heterogeneous Nature of Today’s Computing Platforms Dynamically Reactive to Change Potential for Fault-Tolerance and Robustness
CSE300
Agent-1.6
Defining AgentsDefining Agents
Agent ImplementationAgent Implementation Personal Assistance Networks Databases Operating Systems Other Equipment (Medical Equipment)
Agent FunctionsAgent Functions Find and Filter Information Customize Views of Information Automate Work Delegate Work Back to Computer
CSE300
Agent-1.7
Perspectives for DefinitionPerspectives for Definition
Two Perspectives for Defining AgentTwo Perspectives for Defining Agent User System
User PerspectiveUser Perspective of an Agent of an Agent A Software Agent is the Broker for the User Program that Allow User’s to Delegate Work to
Them Perform Work for User as Directed
System PerspectiveSystem Perspective of an Agent of an Agent An Agent is a Software Object that is Situated
Within a Working Environment and Possesses the Mandatory Agent Properties
CSE300
Agent-1.8
Agent PropertiesAgent Properties
Mandatory Properties (Can Be Classifications)Mandatory Properties (Can Be Classifications) Reactive:
Senses Changes in the Environment and Acts According to Those Changes
Autonomous: Autonomously Control Own State/Behavior Has Control Over its Own Actions
Goal-driven: Proactive to Specific User Goals
Temporarily Continuous: Constantly Executing in Runtime Environment
CSE300
Agent-1.9
Agent ClassificationAgent Classification
Communicative: Communicative: Communicate with Other Agents, Systems, and
People Learning: Learning:
An Agent Learns Based on Prior Experience or Behavior
Mobile: Mobile: Able to Transport Itself from One System to
Another Flexible: Flexible:
Actions Occur on the Fly, Not Scripted Character: Character:
An Agent Has Personality and an Emotional State
CSE300
Agent-1.10
Stationary vs. Mobile AgentsStationary vs. Mobile Agents
Stationary AgentStationary Agent: Limited to Single Node: Limited to Single Node Definition of Definition of Mobile AgentMobile Agent
An Application Capable of Migrating Across Network to Accomplish Required Tasks
Mobile Agents are Being Used for Diverse Mobile Agents are Being Used for Diverse Technologies Mentioned in Introduction SlideTechnologies Mentioned in Introduction Slide Agents are Able to Interact with Objects in a
Different System Retrieving Stock Quotes From the Internet on a
Real Time Basis Implementing Push and Pull Paradigms Electronic Marketplace and Commerce Etc...
CSE300
Agent-1.11
A Mobile Agent Travels A Mobile Agent Travels Computer to Computer Computer to Computer
Computer ComputerAgent Agent
Agent
Computer
Network
CSE300
Agent-1.12
Researchers Involved in Agent Researchers Involved in Agent DevelopmentDevelopment
Known Groups and People Responsible Known Groups and People Responsible Government Agencies
Rock Island Army Arsenal Academic Institutions
Carnegie Melon University Massachusetts Institute of Technology Stanford University University of Maryland Baltimore County
Computer Industry Companies IBM Microsoft
CSE300
Agent-1.13
Technical OverviewTechnical Overview
Basic Agent AnatomyBasic Agent Anatomy An Agent is an Object Which Has Properties
Similar to Object Oriented Classes The Agent’s Attributes are Similar to Instance
Variables Assist the Agent in Traveling, Communication, and
Recognition Each Agent (Stationary/Mobile) has Five
Properties State Implementation Interface Identifier Principals
CSE300
Agent-1.14
Agent PropertiesAgent Properties
Interface
Implementation
State
Identifier
Principals
CSE300
Agent-1.15
Properties: StateProperties: State
Definition (Analogous to Activation Record)Definition (Analogous to Activation Record) Contains All Contents and Values of the
Agent’s Runtime State and Object State Agent TravelingAgent Traveling
State Contains All the Information Required to Resume Execution After Traveling
Language DependenciesLanguage Dependencies Implementation Language Determines If an
Agent Only Uses its Instance Variables to Resume Execution
Saving the Execution State at Runtime is Not Java Compliant Java Agents Require the Object State to Resume
Execution
StateImplementationInterfaceIdentifierPrincipals
CSE300
Agent-1.16
Properties: ImplementationProperties: Implementation
DefinitionDefinition The Code Used to Execute an Agent on Any
Location (Location Independent) Agent TravelingAgent Traveling
An Agent Can Travel With its Code Code on Demand
An Agent Can Retrieve its Code After Reaching its Destination
Language DependenciesLanguage Dependencies A Common Language Must Be Used
To Allow Agent to Travel and Execute on a Different Host
Usually a Platform Independent Scripting Language is Used for Implementation
StateImplementationInterfaceIdentifierPrincipals
CSE300
Agent-1.17
Properties: InterfaceProperties: Interface
DefinitionDefinition Entity Used for Agent-to-Agent
Communication or Agent-to-System Communication
Two Styles of Communication InterfacesTwo Styles of Communication Interfaces Allows Others Access to an Agent’s Methods Messaging Interface
Allows Agents to Use a Language for Communication
Messaging Interface LanguageMessaging Interface Language Knowledge Query and Manipulation Language
(KQML) Provides Point to Point Messaging Between Agents
StateImplementationInterfaceIdentifierPrincipals
CSE300
Agent-1.18
Properties: IdentifierProperties: Identifier
DefinitionDefinition Required Entity Used for Recognition and
Locating Traveling Agents Each Agent Has its Own Unique Identifier
An Identifier is Globally Unique and Immutable Combination of Principals’ Identities and a Serial
Number Identifier FunctionsIdentifier Functions
Used for Directory Services To Refer to a Specific Agent Instance
StateImplementationInterfaceIdentifierPrincipals
CSE300
Agent-1.19
Properties: PrincipalsProperties: Principals
DefinitionDefinition Entity Used by the System to Authenticate
Access to an Agent Two Main Principals
Manufacturer (Developer of Agent) The Manufacturer is the Principal Responsible for
Creating the Agent Owner (User or Agent)
Responsible for the Legal and Moral Way in Which the Agent Will Behave (Behavior)
StateImplementationInterfaceIdentifierPrincipals
CSE300
Agent-1.20
Agent EnvironmentAgent Environment
PlacePlace Basic Environment in Which an Agent
Executes Provides the Operating System for the Agent Cannot Execute Agents Conceptually Similar to Runtime Environment,
Virtual Memory Management, Activation Rcds. Construction of a Place: Four ConceptsFour Concepts
Engine Resources Location Principals
CSE300
Agent-1.21
EngineEngine
DescriptionDescription Supplies the Energy to the Place and the Agent
to Function Provides a Link for Places and Agents to
Networks and Other Resources Provided by a Host
Hierarchical Structure of the Engine Host, Engines, Places, and Agents A Host May Hold Many Engines Engines Can Hold Many Places Places May House Many Agents
Places are Given Names Because an Engine May Places are Given Names Because an Engine May House Several PlacesHouse Several Places
EngineResourcesLocationPrincipals
CSE300
Agent-1.22
The Agent Model PyramidThe Agent Model Pyramid
Host
Engines
Places
Aglets
E E E
P P P
A A A
CSE300
Agent-1.23
ResourcesResources
DescriptionDescription Services Provided by the Host
Networks Processors and Memory Disk Databases Other Hardware and Software Services
Controlled Access to ResourcesControlled Access to Resources Provided to the Agent by the Engine and Place
EngineResourcesLocationPrincipals
CSE300
Agent-1.24
LocationLocation
DescriptionDescription Address of the Executing Agent
Construction of Location: Combination of Combination of The Name of a Place in Which It Executes The Network Address of the Engine in Which
the Place Resides Typical Written Location Typical Written Location
The Port of the Engine With a Place Name Attribute and an Internet Protocol (IP) Address
EngineResourcesLocationPrincipals
CSE300
Agent-1.25
PrincipalsPrincipals
Two Main PrincipalsTwo Main Principals Manufacturer Place Master
MManufacturer Author (Provider) of the Place Responsible for the Operation of the Place
Place MasterPlace Master Responsible for the Creation of the Place
Implementation
EngineResourcesLocationPrincipals
CSE300
Agent-1.26
Place and EnginePlace and Engine
Agents
Place
Engine
Resources
Host
CSE300
Agent-1.27
Agent BehaviorAgent Behavior
Three Agent EventsThree Agent Events Creation and Disposal Transfer Communication
CreationCreation Occurs in a Place Performed by an Agent Residing in the Same
Place Performed by an Agent or Non-agent Outside
of the Place
CSE300
Agent-1.28
Agent CreationAgent Creation
Three Steps Instantiation and Identifier Assignment Initialization Autonomous Execution
Instantiation and Identifier Assignment Step Creates the Object and Executable
Similar to the Constructor of an Object, the Class Specifies the Interface and Implementation of the Agent
A Place Will Assign the Agent its Identifier. InitializationInitialization
Initializes using Arguments Provided by Creator
CSE300
Agent-1.29
Agent CreationAgent Creation
Completion Guarantees the Agent Has Been Correctly Installed in the Place
Autonomous ExecutionAutonomous Execution The Agent Starts Execution After Installation Executes Independently of Other Agents in the
Place Disposal
Performed in a Place Accomplished by an Agent Itself, a System,
Another Agent in the Place, or an Agent or Non-agent Outside of the Place
CSE300
Agent-1.30
Agent DisposalAgent Disposal
Reasons for Disposal Lifetime Has Expired Security Rules Have Been Violated Not in Use System is Going Offline (Shutdown)
Disposal StepsDisposal Steps An Agent is Allowed to Complete All Current
Tasks Execution of the Agent is Suspended by the
Place
CSE300
Agent-1.31
Agent TravelAgent Travel
Definition Agent is Dispatched From its Origin and
Received by the Specified Destination Performed by an Agent Itself, Another Agent in
the Same Place, or an Agent or Non-agent System Outside of the Place
Origin Place and Destination Manage Travel Travel ManagementTravel Management
Origin Place Contacts Destination Place Return Failure Indication to Agent If No Contact
Destination Place Response Fulfill Travel Request Return Failure Indication to Origin
CSE300
Agent-1.32
Agent TransferAgent Transfer
Resume Execution
Deserialize Agent
Decode Data
Receive DataTransfer Data
Encode Data
Serialize Agent
Suspend Execution
Sender Receiver
Network
CSE300
Agent-1.33
Dispatching an AgentDispatching an Agent
ProcessProcess Destination Must Be Known Prior to Departure Agent Notifies the Destination Agent System It
Would Like to Depart An API is Used for Communication for
Departure Destination Agent System (Engine) Process
Request for Departure DDestination Agent System (Engine) Response
Suspend the Agent Serialize the Agent’s Data Determine the Transport Protocol for the Agent Transport the Agent
CSE300
Agent-1.34
Receiving an AgentReceiving an Agent
ProcessProcess Receiving Engine Determines to Accept or
Reject and Agent From the Sending Host Sender Must Authenticate Itself to the
Receiving Engine Receiving Engine TasksReceiving Engine Tasks
Receive the Agent Decode its Data Information Deserialize the Agent
Sets New Instantiation for the Agent Resume Agent Execution
CSE300
Agent-1.35
Agent Class TransferAgent Class Transfer
Three Methods: Dependent upon the Location of Three Methods: Dependent upon the Location of the Classthe Class Class at Destination Class at Origin Code-on-Demand
Class at DestinationClass at Destination Contained in the Engine’s Class Cache or the
Local File System No Need to Transfer Class
Transferred Agent Must Contain the Full Class Name and Discriminator May Have Information that Describes the Location
of the Class Definition
CSE300
Agent-1.36
Agent Class Transfer MethodsAgent Class Transfer Methods
Class at OriginClass at Origin Transported With the Agent’s State to the
Destination Engine State May Transferred More Than Once
Can Lead to Increased Network Traffic and Wasted Network Bandwidth
Code-on-DemandCode-on-Demand Class is Made Available by a Server Destination Engine Receives Class on a Code-
on-Demand Basis Destination Address Must Perform an
Additional Network Connection Agent Can Carry Classes on Transfer or by a Per-Agent Can Carry Classes on Transfer or by a Per-
Request BasisRequest Basis
CSE300
Agent-1.37
Agent Class TransferAgent Class Transfer
Agent Agent
Class Code Class Code
DestinationOrigin
Class Code
Server
(c) Class at Server
(b) Class at Origin (a) Class at destination
What Other Information Must be Available at Destination?
CSE300
Agent-1.38
CommunicationCommunication
Properties of Messaging CommunicationProperties of Messaging Communication Point-to-Point Messaging
One-to-One Type Messaging Broadcast Messaging
One-to-Many Type Messaging, Useful in Multi-agent Systems
Intra-Place Communication Communication With an Agent in the Same Place
Inter-Place and Inter-Engine Communication With an Agent in a Different Place
Agents Can Send Messages to Other Agents Agents Can Invoke the Methods of Other
Agents If Authorized
CSE300
Agent-1.39
Interagent CommunicationInteragent Communication
Three Inter-Agent Communication Schemes Now-Type Messaging Future-Type Messaging One-way-Type Messaging
Intra-Place, Inter-Place, and Inter-Engine Intra-Place, Inter-Place, and Inter-Engine Communication Communication
Agent Messaging ParadigmsAgent Messaging Paradigms Peer-to-Peer: Dedicated Communication Broadcast: Multi-Agent Environment
CSE300
Agent-1.40
Now-Type MessagingNow-Type Messaging
Most PopularMost Popular Most Commonly UsedMost Commonly Used SynchronousSynchronous
Blocks Further Execution Until Receiver Has Handled and Acknowledged the Message
Send and Wait Paradigm for Message Passing Classic and Easy to Model Approach
Sender Receiver
CSE300
Agent-1.41
Future-Type MessagingFuture-Type Messaging
AsynchronousAsynchronous No Blocking of Current Execution
Sender Has a Future (Handle) Sender Has a Future (Handle) Used for Obtaining Result
FlexibleFlexible Sender does not have to Wait for Receiver’s
Response Useful for Multi-Agent CommunicationUseful for Multi-Agent Communication
Sender Receiver
CSE300
Agent-1.42
One-Way-Type MessagingOne-Way-Type Messaging
AsynchronousAsynchronous No Blocking of Current Execution
Useful for Message Sending Agent that does not Useful for Message Sending Agent that does not Expect Replies from Message Receiving Agent Expect Replies from Message Receiving Agent Sender Does Not Retain a Handle Receiver Does Not Acknowledge Message
Termed Fire-and-Forget: May be Non-ReliableTermed Fire-and-Forget: May be Non-Reliable
Sender Receiver
CSE300
Agent-1.43
Agent Implementation (Aglets)Agent Implementation (Aglets)
OriginsOrigins Named for the Combination of the Two Terms
of Agent and Applet DefinitionsDefinitions
Applet: A “Lightweight Application” “Aglet”: A “Lightweight Agent”
Differences Differences Aglet
Carries It’s State Movement From One Host to the Next
Applet Only Carries It’s Class Files Along Movement Based on a Server Client Network
CSE300
Agent-1.44
Implementation LanguageImplementation Language
Implementation LanguageImplementation Language Java Was Chosen Due to the Benefits its
Provides Towards Agent Construction Movement to Java Worldwide
Benefits of JavaBenefits of Java Platform Independence Secure Execution Dynamic Class Loading Multithread Programming Object Serialization Reflection
CSE300
Agent-1.45
Agent Characteristics of Java: BenefitsAgent Characteristics of Java: Benefits
PPlatform Independent Allows an Agent to Travel and Execute on Any
Type of Computer Secure ExecutionSecure Execution
Eliminates the Option of Programs Accessing Private Objects that They Do Not Have Authorization to Use
The Environment Makes its Safe to Host an Unknown Agent
Dynamic Class LoadingDynamic Class Loading Allows Agents to Execute Independently Agents Do Not Have to Be Created During the
Main Program Execution
CSE300
Agent-1.46
Agent Characteristics of Java: BenefitsAgent Characteristics of Java: Benefits
Multithread ProgrammingMultithread Programming Agents Execute Independently of other Agents Agents can Communicate with Other Agents
Object SerializationObject Serialization During Transportation the Agent’s Data (and
Code) is Serialized and Then Deserialize ReflectionReflection
Assists Agents in Finding Out Information About Other Agents and Themselves
Types of Object Information Methods, Constructors of Loaded Classes, and
Fields Meta-Data on Active Classes that can be Queried
CSE300
Agent-1.47
Agent Characteristics of Java: DrawbacksAgent Characteristics of Java: Drawbacks
Inadequate Support for Resource Control Inadequate Support for Resource Control Denial of Service
Agent Will Loop and Waste Processor Cycles or Memory Resources
No Protection of ReferencesNo Protection of References Objects are Allowed Access to the Public
Methods of a Java Object A Proxy Provides Protection of References and
Location Transparency Object Inserted Between Caller and Callee
CSE300
Agent-1.48
DrawbacksDrawbacks
No Object Ownership of ReferencesNo Object Ownership of References An Agent’s Execution Thread May Be Deleted An Agent Object Can Not Be Voided
No Support for Preservation and Resumption of No Support for Preservation and Resumption of Execution StateExecution State Java Does Not Allow Retrieval of the Full
Execution State of an Object Agent Relies on Internal Attribute Values and
External Events to Direct its Behavior
CSE300
Agent-1.49
Aglet EnvironmentAglet Environment
IBM Aglets Workbench IBM Aglets Workbench Assists in Bringing Mobile Agents to Life Implemented in Java
IBM Aglets Workbench Operation IBM Aglets Workbench Operation Based on the Java Programming Language
System Aglets Framework
Provides the Mobile-agent-specific Components of the Workbench
Introduces the Notion of an Aglet A Mobile (Agile) Agent Written in Java and
Named After its Framework Base Class
CSE300
Agent-1.50
Aglet APIAglet API
Four Basic Elements Aglet Proxy Context Identifier
Aglet Mobile Agent that Moves Across the Network Responds to Messages Runs on its Own Thread of Execution
PProxy Shield that Protects the Aglet From Direct
Access to its Methods Can Have Remote Access to the Aglet (Hides
Aglet’s Real Location)
CSE300
Agent-1.51
Aglet API: ElementsAglet API: Elements
CContext Basically the Same As a Place Houses the Engines
Engines House the Aglets Addressed in the Same Manner As a Place
IIdentifier Element of the Aglet Each Aglet Has It’s Own Unique Identifier Required Entity Used for Recognition and
Locating Traveling Agents
CSE300
Agent-1.52
Relationship between Aglet and ProxyRelationship between Aglet and Proxy
InteractionClients Proxy Aglet
Proxy Represents the AgletProxy Represents the Aglet Shields Public Methods for Potential MisuseShields Public Methods for Potential Misuse Can Hide the “Actual” Location of AgletCan Hide the “Actual” Location of Aglet Proxy and Aglet on Different Computing NodesProxy and Aglet on Different Computing Nodes
CSE300
Agent-1.53
Relationship between Host, Server Relationship between Host, Server Process(Engine), and ContextsProcess(Engine), and Contexts
Context Context Context
Host
Server Process (Engine)
Network
CSE300
Agent-1.54
Aglet: OperationsAglet: Operations
Six Basic Operations Creation Cloning Dispatching Retraction Activation and Deactivation Disposal
Creation Initializes a New Aglet Assigns Aglet an Identifier
CSE300
Agent-1.55
Basic OperationsBasic Operations
CCloning Produce an Identical Copy of an Aglet (itself) Differences Between Clone and Original Aglet
Identifier Place of Execution
DDispatching Aglet is Transported (Pushed) From One
Context to Another Retraction
Concept that Returns an Aglet Back to its Original Context
Original Context Pulls Back the Aglet From the Current Context
CSE300
Agent-1.56
Basic OperationsBasic Operations
Deactivation and Activation Deactivation Must Occur Before Activation Deactivation Halts the Execution of an Aglet Activation Starts Execution of an Aglet Activation Must Occur to Restore the Aglet
DDisposal Stops Execution of an Aglet Removes an Aglet From its Current Context
Classification of Six Basic Aglet Operations Classified as the Life Cycle of an Aglet
Observation of Six Basic Aglet Operations Context Functions Just Like a Place
CSE300
Agent-1.57
Agent Life-Cycle ModelAgent Life-Cycle Model
Aglet Aglet
Class File
DiskStorage
Create Deactivate Activate
Dispose
Clone
Context A Context B
Retract
Dispatch
CSE300
Agent-1.58
Aglet MethodsAglet Methods
Aglet Programming Model Similar to the Java Event Model Event Based Listeners Used to Perform Event Actions
Three Event Model Listeners Clone Listener Mobility Listener Persistence Listener
ActionsActions Listen for the Event They are Named After Listeners Can Be Customized to Perform
Specific Actions When the Listener Event Occurs
CSE300
Agent-1.59
Relationship between Aglet and its Relationship between Aglet and its ListenersListeners
Aglet
Clone Events
Mobility Events
Persistence Events
CloneListener
MobilityListener
PersistenceListener
CSE300
Agent-1.60
Event Model ListenersEvent Model Listeners
Clone Listener Listens for Cloning Events Actions Can Be Customized to Occur Before,
During, or After the Cloning Mobility Listener
Listens for Mobility Events Actions Can Be Customized to Occur When an
Aglet is About to Be Dispatched, Retracted, or Arrives in a New Context
Persistence Listener Listens for Persistence Events Actions Can Be Customized to Occur When an
Aglet is About to Be Deactivated or Has Been Activated
CSE300
Agent-1.61
Aglet API: Classes and InterfacesAglet API: Classes and Interfaces
Aglet API Simple and Flexible Represents Lightweight Pragmatic Approach to
Mobile Agents Java Classes
Aglet Message Futurereply Agletid Agletproxy
Java Interfaces Agletproxy Agletcontext
CSE300
Agent-1.62
Aglet API: ClassesAglet API: Classes
Aglet Class Contains All Methods Needed to Perform the
Basic Aglet Operations Basis for Building All Aglets Contains All the Elements of the Aglet
Aglet Creation Create a Customized Aglet
import com.ibm.aglet.*;
public class MyFirstAglet extends Aglet{
//Put aglet’s methods here
}
CSE300
Agent-1.63
Aglet and Message ClassAglet and Message Class
Aglet Class Example: TThe Dispatch Method Dispatches an Aglet to a Remote Context The Method Call Contains the URL of the
Remote Contextdispatch(new URL(atp://remote.host.com/context”));
Message Class Communication of Aglets is Performed by
Exchanging Message Objects Agletproxy Class is Responsible for Actually
Sending and Receiving the Messages Message Creation
Field ‘Type’ Set When Message Created Second Field of Message Constructor is
Optional
CSE300
Agent-1.64
Message ClassMessage Class
CodeCodeMessage myName = new Message(“my name”, “Lois”);
orMessage yourName = new Message(“Steve”);
Message Class Example: TThe handleMessage Method Returns True if Message is Handled
public boolean handleMessage(Message msg){
if(msg.sameKind(“hello”)){
doHello(); //respond to ‘hello’ message
return true; //yes I handled message
}
else
return false; //not handled message
}
CSE300
Agent-1.65
AgletProxy and Future Reply ClassAgletProxy and Future Reply Class
Message Objects are Sent Using the Agletproxy Class Methods Object sendMessage(Message msg) FutureReply sendFutureMessage(Message msg) void sendOnewayMessage(Message msg)
Code Exampleproxy.sendMessage(myName);String name = (String)proxy.sendMessage(yourName);
FutureReply Class Evaluates Wether a Reply will Be Given to a
Message An Aglet Can Perform Another Task While
Waiting for the Reply
CSE300
Agent-1.66
Future Reply ClassFuture Reply Class
Future Reply Objects are Retrieved Using the Future Reply Objects are Retrieved Using the Agletproxy Class MethodAgletproxy Class Method sendFutureMessage(msg)
Code Example Sender of Message Can Perform Another Task
(doPeriodicWork()) While Waiting for Reply
FutureReply future = proxy.sendFutureMessage(msg);
while (!future.isAvailable()){
doPeriodicWork();
}
Object reply = future.getReply();
CSE300
Agent-1.67
AgletID ClassAgletID Class
AgletID Class Represents the Identifier of the Aglet The Identifier is Unique to Each Aglet The Identifier Object Hides the Implementation
Specific Representation of the Aglet Identity Code ExampleCode Example
Identifier can be Retrieved from the Aglet and its ProxyAgletID aid = proxy.getAgletID();
Query the Context to Retrieve Aglet with Identity aid (must have the Identifier aid and Context)proxy = context.getAgletProxy(aid);
CSE300
Agent-1.68
Aglet API: InterfacesAglet API: Interfaces
Agletproxy Interface The Handle of the Aglet Provides the Method of Communication
Between Aglets Aglet Handle Design Benefits
Used by Another Aglet that is Attempting to Communicate With that Aglet
Provides the Aglet With Protection From Non-authorized Access
Can Provide a Remote Location for the Aglet
CSE300
Agent-1.69
AgletProxy and AgletContextAgletProxy and AgletContext
Retrieval and Setting Methods of ProxiesRetrieval and Setting Methods of Proxies Aglet Can Get its Own Proxy
Aglet.getProxy(); Retrieve an Enumeration of Proxies
AgletContext.getAgletProxies(); Get an Aglet Proxy for a Given Identifier
text.getAgletProxy(); Place AgletProxy Object into Context Property
AgletContext.setProperty(); Aglet Context
Execution Environment for Aglets Provides Actual Entity of the Place Houses the Aglet Aglet is Created, Sleeps, & Dies in the Context
CSE300
Agent-1.70
AgletContextAgletContext
Agletcontext Interface An Aglet Will Live in the Context Get Information About Environment Send Messages to Environment Maintaining and Managing Running Aglets in
an Environment Where Host System is Secure Against Malicious Aglets
Agletcontext Interface Methods Aglet Class can Gain Access to Current Context
Context = Getagletcontext(); Aglet can Create New Aglets (Must Have
Access to Context)Context.Createaglet(…);
CSE300
Agent-1.71
AgletContextAgletContext
Retract (Pull) Remotely Located Aglets Into Current ContextContext.Retractaglet(remotecontexturl,
Agletid); Retrieve a List of Proxies of its Fellow Aglets
in the Same ContextProxies = Context.Getagletproxies();
There are Numerous Methods for the Interfaces Listed Above is an Ala Carte Example of What
the API Can Perform
CSE300
Agent-1.72
AgletContextAgletContext
Aglet Example: Remote File Update Premise: Large Multiple Remote Files that
Must be Updated by Word Replacement One Solution: Move Files to Central Server,
Perform Update, and Move Files Back Another Solution: An Aglet that Updates Files
by Replacing All Occurrences of One Specified Word in the Files With Another Specified Word
Distributes the Load of Updates to Multiple Servers
We’re Moving “Code” Rather Than Files
CSE300
Agent-1.73
Multiple Aglets Updating Files in ParallelMultiple Aglets Updating Files in Parallel
Aglet AgletAglet
Aglet
Host (Updating)
Host HostHostF FF FF F
CSE300
Agent-1.74
Update File AgletUpdate File Aglet
Import com.ibm.aglet.*;import com.ibm.aglet.event.*;import java.net.*;import java.io.*;public class UpdateFile extends Aglet{
URL destination = null;File dir = null;String from = null;String to = null;public void onCreation(Object args){
destination = (URL)((Object[])args)[0];
dir = (File)((Object[])args)[1];
from = (String)((Object[])args)[2];
to = (String)((Object[])args)[3];
addMobilityListener(){
new MobilityAdapter(){
CSE300
Agent-1.75
Update File AgletUpdate File Aglet
Public void onArrival(MobilityEvent e){
replace(args.file,args.from,args.to);
dispose(); }
}
}
try{
dispatch(args.destination);
}catch (Exception e){
System.out.println(“Failed to dispatch.”);
}}void replace(File, file, String, from, Sting
to){
//Open ‘file’ and replace ‘from’ with ‘to’}
CSE300
Agent-1.76
Distributed ComputingDistributed Computing
Role of Agents in Distributed ComputingRole of Agents in Distributed Computing Range From Smart Matter to Electronic Email
PPossible Areas in Distributed Computing Where Agents Would Be Useful Advertising Air-Traffic Control Business Process Re-engineering Command and Control Data Mining Digital Libraries Electronic Commerce Entertainment E-mail Filtering
CSE300
Agent-1.77
Role of Agents: Areas of InterestRole of Agents: Areas of Interest
Education Information Retrieval/Management News Retrieval Network Management Personal Digital Assistants (PDAS) Secure Brokering Smart Matter Smart Databases Scheduling/Diary Management Workflow Management Numerous Other Areas that are Being
Researched and Developed
CSE300
Agent-1.78
Role of Agents: AbilitiesRole of Agents: Abilities
Why Agents? Abilities are Productive for Increasing the
Quality of Distributed Computing Agent Abilities
Collect Data From Numerous Places Searching and Filtering Information Monitoring Target Information Dissemination Agent-to-Agent Negotiation Perform Parallel Computations Barter Enhance Telecommunication Network Services Controller for Smart Matter Enhance Entertainment
CSE300
Agent-1.79
Data Collection, Search, and MonitorData Collection, Search, and Monitor
Collect Data From Numerous Places An Agent on a Network Could Retrieve Data
From Numerous Computer Stations One Application that May Be Useful Would Be
a Software Registration Agent Searching and Filtering Information
Discards Useless Information Saves an Immense Amount of Time
Monitoring Monitor Certain Information Specified by User Retrieve Information Specified by User
Requests
CSE300
Agent-1.80
Real Time, Communication, Computation, Real Time, Communication, Computation, and Barteringand Bartering
Target Information Dissemination Real Time Information Being Retrieved
News, Stock Quotes, Advertisements, and Software Updates for Venders
Information Specified by User Negotiate Between One Another (Agent-to-agent)
Agents Communicate With Other Agents PPerform Parallel Computations
Agents Communicate With One Another Agents Share Information
BBarter Agents Assume the Place of the User Agent Negotiates the Deal
CSE300
Agent-1.81
Telecommunications, Controller, and Telecommunications, Controller, and EntertainmentEntertainment
Enhance Telecommunication Network Services Store Information of Services Provide User With Authorized Services
Controller for Smart Matter Monitor Equipment Inform User of State of Equipment
Enhance Entertainment Agent-to-Agent Communication Between
Players User Programmed Strategic Agent
The Information Above is Not Conclusive of All The Information Above is Not Conclusive of All the Different Abilities of Mobile Agents (Endless)the Different Abilities of Mobile Agents (Endless)
CSE300
Agent-1.82
Future Evolution of Intelligent Agent Future Evolution of Intelligent Agent EntitiesEntities
Software Registration AgentSoftware Registration Agent Search and Filter EnginesSearch and Filter Engines Monitor/Supply Info. on Real Time BasisMonitor/Supply Info. on Real Time Basis Real Time AdvertisementReal Time Advertisement User Filter for Unwanted InformationUser Filter for Unwanted Information Real Time Work Environment UpdateReal Time Work Environment Update Pleasure/business Travel AgentPleasure/business Travel Agent Parallel ProcessingParallel Processing Network Service AdministratorNetwork Service Administrator Monitor Physical Aspects of Embedded SystemsMonitor Physical Aspects of Embedded Systems Computer Gaming PawnComputer Gaming Pawn
CSE300
Agent-1.83
Possibilities of Intelligent Agent EntitiesPossibilities of Intelligent Agent Entities
List of Future Evolution of Intelligent Agent List of Future Evolution of Intelligent Agent Entities InconclusiveEntities Inconclusive With the Advancement of Technology and a
Need for a Faster Result, the Possibilities of Implementations of Mobile Agents are Vast
Software Registration Agent Retrieve Registration Numbers for Certain
Software Applications Data Would Be Used to Determine If a
Computer System Had Unique Software Applications
CSE300
Agent-1.84
Search, Filter, and MonitorSearch, Filter, and Monitor Search and Filter EnginesSearch and Filter Engines
Email Applications: A User Could Filter Mail Based on a Certain
Keyword and Not Receive Junk Mail Provide a More Extensive Search for a User Use Numerous Resources Return Specific Items for the User Search or Filter While the User is Performing
Another Activity
CSE300
Agent-1.85
Real Time PossibilitiesReal Time Possibilities
Monitor and Supply Information on Real Time Monitor and Supply Information on Real Time BasisBasis Provide News on a Real Time Basis Monitor News Based on Certain Information Retrieve the News that the User Requests Used for Stocks, Shopping (Checking If an
Item Goes on Sale), and Even Weather The Amount of Possibilities is Endless
Real Time AdvertisementReal Time Advertisement Advertisers Find a Way to Capitalize on Every
New Software Invention Available Companies May Send Advertisements Along With
the Information Being Received Like News
CSE300
Agent-1.86
Real Time PossibilitiesReal Time Possibilities
User Filter for Unwanted InformationUser Filter for Unwanted Information User May Want to Filter Out Certain
Information Being Received Agent Application Required to Filter Out
Unwanted Advertisements Real Time Work Environment UpdateReal Time Work Environment Update
Schedule a Meeting Each of the Employee’s Agents Would Work
Together to Schedule the Meeting for all Employees Update Team Members on New Developments
of a Project Each Agent Would Update the Other Agents and
Then Return the Information to the Worker
CSE300
Agent-1.87
Work and TravelWork and Travel
Pleasure/Business Travel AgentPleasure/Business Travel Agent User’s Own Personal Shopper, Broker, or
Travel Agent Electronic Commerce
Shop/Haggle for a User on Any Type of Goods Search Criteria Given by a User
Where to Go on Vacation and What Price for Airline Tickets
What Stocks to Buy or Sell User Tells Agent to Make a Deal or Not
Once Agent Retrieves All the Information. Agent Could then Finalize the Deal for the User
Vacation Reservations are made, or Merchandise is Purchased
CSE300
Agent-1.88
Network Services and MonitoringNetwork Services and Monitoring
Network Service AdministratorNetwork Service Administrator Agent Responsible for the User Configuration Agents Supplies the Host With User Privileges
to Services Could Be Used for Cable Systems or Network
Providers Monitor of Physical Aspects of Embedded SystemsMonitor of Physical Aspects of Embedded Systems
Monitor Temperature, Speed, or Other Physical Characteristics
Inform User of a Malfunction Assume the Position of Smart Matter Provide a More Efficient Way to Monitor
Physical Aspects of Embedded Systems
CSE300
Agent-1.89
Computer GamingComputer Gaming
Computer Gaming PawnComputer Gaming Pawn Perform All the Battling for the User User Could Program the Agent to Function
Accordingly Strategic Moves
Numerous Network Game Possibilities Gambling, Role Playing, and Strategy Games
Agent-to-Agent Communication Used to Provide Enhance Online Gaming Possibilities
CSE300
Agent-1.90
Conclusion and FutureConclusion and Future
ConclusionConclusion Agent Concepts Barely Five Years Agents Seem to be the Up and Coming
Technology of the Future The Possibilities and Capabilities of Agents are
Endless The Mobile Agent Alone Has Not Been Covered in
Research Extensively Aglets Have a Chance of Being the Building
Blocks of Front Running Technology As Long As Java Proves to Be a Secure Language
Standardization Issues Must be Addressed for Different Agent Systems to Interact!
CSE300
Agent-1.91
Conclusion and FutureConclusion and Future
Future UsesFuture Uses Everyday People are Finding New Uses for
Agents Provide Users With Assistance Provide Users With More Free Time Agents Most Likely, Will Become an Everyday
Occurrence in Applications Assist Users and Do Work on Their Behalf
are Agents the Future of Today’s and Tomorrow’s are Agents the Future of Today’s and Tomorrow’s Applications?Applications?
CSE300
Agent-1.92
Future ResearchFuture Research
Another Facet of Agents is the Intelligent AgentAnother Facet of Agents is the Intelligent Agent Mobile Agents are Used for Intelligent Agents Researchers are Trying to Implement an Agent
With Artificial Intelligence Current Developing ApplicationsCurrent Developing Applications
IBM is Developing a Memory Agent Application Used to Detect Breast Cancer
IBM Claims the Agent Learns Based on Previous Input
Uses a Learning Algorithm to Predict the Numbers for Detection
CSE300
Agent-1.93
IBM Research ProductsIBM Research Products
Other IBM Products Using the Memory Agent Memoryagent Knowledge Capture
Learns What People Know Builds a Knowledge Base Incrementally Operates While People Do Their Normal Jobs
Memoryagent Virtual Consultation Allows People to Consult the Knowledge of Others Eliminates Need for Speaking to Them in Person
CSE300
Agent-1.94
ReferencesReferences
[1]: Danny B. Lange and Mitsuru Oshima, “Programming and Deploying Java [1]: Danny B. Lange and Mitsuru Oshima, “Programming and Deploying Java Mobile Agents with Aglets”, Addison Wesley Longman, Reading MA, 1998.Mobile Agents with Aglets”, Addison Wesley Longman, Reading MA, 1998.
[2]: [2]: http://www.http://www.javaworldjavaworld.com/.com/javaworldjavaworld//jwjw-04-1997/-04-1997/jwjw-04-agents.html-04-agents.html
[3]: [3]: http://www.http://www.mscimsci..memphismemphis..eduedu/~/~franklinfranklin//AgentProgAgentProg.html.html
[4]: [4]: http://www.http://www.javaworldjavaworld.com/.com/javaworldjavaworld//jwjw-04-1997/-04-1997/jwjw-04-hood.html-04-hood.html
[5]: [5]: http://www.http://www.trltrl..ibmibm.co..co.jpjp//agletsaglets/JAAPI-/JAAPI-whitepaperwhitepaper.html.html
[6]: [6]: http://http://luckyspcluckyspc..lborolboro.ac..ac.ukuk/Docs/Papers/Mesela97.html/Docs/Papers/Mesela97.html
[7]: [7]: http://www.http://www.javaworldjavaworld.com/.com/javaworldjavaworld//jwjw-05-1997/-05-1997/jwjw-05-hood.html-05-hood.html
[8]: [8]: http://www.http://www.trltrl..ibmibm.co..co.jpjp//agletsaglets//whitepaperwhitepaper..htmhtm
[9]: [9]: http://www.networking.http://www.networking.ibmibm.com/.com/iagiag//iaghomeiaghome.html#new.html#new
Recommended