950 likes | 1.13k Views
Software Agents and Aglets. Kimble Cheron, Professor Steven A. Demurjian, and Mitch Saba Computer Science & Engineering Department The University of Connecticut 191 Auditorium Road, Box U-155 Storrs, CT 06269-3155. steve@engr.uconn.edu http://www.engr.uconn.edu/~steve (860) 486 - 4818.
E N D
Software Agents and Aglets Kimble Cheron, Professor Steven A. Demurjian, and Mitch Saba Computer Science & Engineering Department The University of Connecticut 191 Auditorium Road, Box U-155 Storrs, CT 06269-3155 steve@engr.uconn.edu http://www.engr.uconn.edu/~steve (860) 486 - 4818
Overview of Presentation • Introduction • Reasons for Agent Creation • Defining Agents • Researchers Involved in Agent Development • Technical Overview • Basic Agent Anatomy • Agent Implementation (Aglets) • Aglet Environment • Aglet Methods • Distributed Computing • Role of Agents in Distributed Computing • Future Evolution of Intelligent Agent Entities • Conclusions and Future Research
Introduction • Age 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
Reasons for Agent Creation • Majority of Above Tasks Executed Based on Direct Manipulation • Nothing Occurs Unless Mouse, Keypad, Touchpad is Used • Event-Oriented Interactions with End-Users • End-Users • Majority are Computer Illiterate • Depend on Software to Perform Tasks • Not Limited to Personal Computers, Embedded Systems Require Operators • The Software Agent is the Key to Providing a Delegated Approach to Direct Manipulation
Reasons for Agent Creation • Potential Reduction of Network Load • Movement of Code to Remote Location • Voluminous Data Remains Locally Resident • Addressing Network Latency Issues • Communication of Decision “Instantaneous” and “Simultaneously” • Real-Time Notification Issue: Eliminate Delays • Encapsulate Protocols • Change Protocol, Change Agent • Reactive to Evolution • Asynchronous, Autonomous, and Heterogeneous • Nature of Today’s Computing Platforms • Dynamically Reactive to Change • Potential for Fault-Tolerance and Robustness
Defining Agents • Agent Implementation • Personal Assistance • Networks • Databases • Operating Systems • Other Equipment (Medical Equipment) • Agent Functions • Find and Filter Information • Customize Views of Information • Automate Work • Delegate Work Back to Computer
Perspectives for Definition • Two Perspectives for Defining Agent • User • System • User Perspective 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 Perspective of an Agent • An Agent is a Software Object that is Situated Within a Working Environment and Possesses the Mandatory Agent Properties
Agent Properties • 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
Agent Classification • Communicative: • Communicate with Other Agents, Systems, and People • Learning: • An Agent Learns Based on Prior Experience or Behavior • Mobile: • Able to Transport Itself from One System to Another • Flexible: • Actions Occur on the Fly, Not Scripted • Character: • An Agent Has Personality and an Emotional State
Stationary vs. Mobile Agents • Stationary Agent: Limited to Single Node • Definition of Mobile Agent • An Application Capable of Migrating Across Network to Accomplish Required Tasks • Mobile Agents are Being Used for Diverse Technologies 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...
A Mobile Agent Travels Computer to Computer Computer Computer Agent Agent Network Agent Computer
Researchers Involved in Agent Development • 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
Technical Overview • Basic 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
Agent Properties Principals Interface Implementation State Identifier
Properties: State State Implementation Interface Identifier Principals • Definition (Analogous to Activation Record) • Contains All Contents and Values of the Agent’s Runtime State and Object State • Agent Traveling • State Contains All the Information Required to Resume Execution After Traveling • Language 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
Properties: Implementation State Implementation Interface Identifier Principals • Definition • The Code Used to Execute an Agent on Any Location (Location Independent) • Agent Traveling • An Agent Can Travel With its Code • Code on Demand • An Agent Can Retrieve its Code After Reaching its Destination • Language 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
Properties: Interface State Implementation Interface Identifier Principals • Definition • Entity Used for Agent-to-Agent Communication or Agent-to-System Communication • Two Styles of Communication Interfaces • Allows Others Access to an Agent’s Methods • Messaging Interface • Allows Agents to Use a Language for Communication • Messaging Interface Language • Knowledge Query and Manipulation Language (KQML) • Provides Point to Point Messaging Between Agents
Properties: Identifier State Implementation Interface Identifier Principals • Definition • 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 Functions • Used for Directory Services • To Refer to a Specific Agent Instance
Properties: Principals State Implementation Interface Identifier Principals • Definition • 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)
Agent Environment • Place • 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 Concepts • Engine • Resources • Location • Principals
Engine Engine Resources Location Principals • Description • 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 House Several Places
The Agent Model Pyramid E A E A E A Host Engines Places P P P Aglets
Resources Engine Resources Location Principals • Description • Services Provided by the Host • Networks • Processors and Memory • Disk • Databases • Other Hardware and Software Services • Controlled Access to Resources • Provided to the Agent by the Engine and Place
Location Engine Resources Location Principals • Description • Address of the Executing Agent • Construction of Location: 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 • The Port of the Engine With a Place Name Attribute and an Internet Protocol (IP) Address
Principals Engine Resources Location Principals • Two Main Principals • Manufacturer • Place Master • Manufacturer • Author (Provider) of the Place • Responsible for the Operation of the Place • Place Master • Responsible for the Creation of the Place Implementation
Place and Engine Resources Agents Place Engine Host
Agent Behavior • Three Agent Events • Creation and Disposal • Transfer • Communication • Creation • Occurs in a Place • Performed by an Agent Residing in the Same Place • Performed by an Agent or Non-agent Outside of the Place
Agent 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. • Initialization • Initializes using Arguments Provided by Creator
Agent Creation • Completion Guarantees the Agent Has Been Correctly Installed in the Place • Autonomous 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
Agent Disposal • Reasons for Disposal • Lifetime Has Expired • Security Rules Have Been Violated • Not in Use • System is Going Offline (Shutdown) • Disposal Steps • An Agent is Allowed to Complete All Current Tasks • Execution of the Agent is Suspended by the Place
Agent 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 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
Agent Transfer Sender Receiver SuspendExecution Resume Execution Serialize Agent Deserialize Agent Encode Data Decode Data Transfer Data Receive Data Network
Dispatching an Agent • Process • 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 • Destination Agent System (Engine) Response • Suspend the Agent • Serialize the Agent’s Data • Determine the Transport Protocol for the Agent • Transport the Agent
Receiving an Agent • Process • Receiving Engine Determines to Accept or Reject and Agent From the Sending Host • Sender Must Authenticate Itself to the Receiving Engine • Receiving Engine Tasks • Receive the Agent • Decode its Data Information • Deserialize the Agent • Sets New Instantiation for the Agent • Resume Agent Execution
Agent Class Transfer • Three Methods: Dependent upon the Location of the Class • Class at Destination • Class at Origin • Code-on-Demand • Class 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
Agent Class Transfer Methods • Class 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-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-Request Basis
Agent Class Transfer Server (c) Class at Server Class Code Origin Destination Agent Agent Class Code Class Code (b) Class at Origin (a) Class at destination What Other Information Must be Available at Destination?
Communication • Properties 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
Interagent Communication • Three Inter-Agent Communication Schemes • Now-Type Messaging • Future-Type Messaging • One-way-Type Messaging • Intra-Place, Inter-Place, and Inter-Engine Communication • Agent Messaging Paradigms • Peer-to-Peer: Dedicated Communication • Broadcast: Multi-Agent Environment
Now-Type Messaging Sender Receiver • Most Popular • Most Commonly Used • Synchronous • Blocks Further Execution Until Receiver Has Handled and Acknowledged the Message • Send and Wait Paradigm for Message Passing • Classic and Easy to Model Approach
Future-Type Messaging Sender Receiver • Asynchronous • No Blocking of Current Execution • Sender Has a Future (Handle) • Used for Obtaining Result • Flexible • Sender does not have to Wait for Receiver’s Response • Useful for Multi-Agent Communication
One-Way-Type Messaging Sender Receiver • Asynchronous • No Blocking of Current Execution • Useful for Message Sending Agent that does not Expect Replies from Message Receiving Agent • Sender Does Not Retain a Handle • Receiver Does Not Acknowledge Message • Termed Fire-and-Forget: May be Non-Reliable
Agent Implementation (Aglets) • Origins • Named for the Combination of the Two Terms of Agent and Applet • Definitions • Applet: A “Lightweight Application” • “Aglet”: A “Lightweight Agent” • 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
Implementation Language • Implementation Language • Java Was Chosen Due to the Benefits its Provides Towards Agent Construction • Movement to Java Worldwide • Benefits of Java • Platform Independence • Secure Execution • Dynamic Class Loading • Multithread Programming • Object Serialization • Reflection
Agent Characteristics of Java: Benefits • Platform Independent • Allows an Agent to Travel and Execute on Any Type of Computer • Secure 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 Loading • Allows Agents to Execute Independently • Agents Do Not Have to Be Created During the Main Program Execution
Agent Characteristics of Java: Benefits • Multithread Programming • Agents Execute Independently of other Agents • Agents can Communicate with Other Agents • Object Serialization • During Transportation the Agent’s Data (and Code) is Serialized and Then Deserialize • Reflection • 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
Agent Characteristics of Java: Drawbacks • Inadequate Support for Resource Control • Denial of Service • Agent Will Loop and Waste Processor Cycles or Memory Resources • No 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
Drawbacks • No 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 Execution 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
Aglet Environment • IBM Aglets Workbench • Assists in Bringing Mobile Agents to Life • Implemented in Java • 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
Aglet 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 • Proxy • Shield that Protects the Aglet From Direct Access to its Methods • Can Have Remote Access to the Aglet (Hides Aglet’s Real Location)