Introduction to Agent Technology

advertisement
Agents &
Mobile Agents
Introduction – Agents & Mobile Agents
©Shonali Krishnaswamy
1
Would you bet 11 Million Euros on
Mobile Agents? 
Agents - The Concept
 software system which acts “intelligently” on
your behalf
 convenient metaphor
 situated in an environment and exhibit
behaviour which can be viewed as:
pro-active, autonomous, communicative,
persistent, mobile, benevolent,
adaptive/learning, collaborative, reactive,
deliberative, ...
 stronger notions of agency: mentalistic notions
such as knowledge, beliefs, desire, intention,
goals, and a logic for reasoning with them
 Cutting out the hype – a kind of software and
an approach to software design
Agent Definitions
•
•
•
•
Mission Impossible 
No consensus on a single definition
New Buzzword
Everybody wants to call their software
“Agents”!
• Many synonyms – just to add to the
confusion 
• knowbots, softbots, personal assistants
What the Gurus Say…
• Wooldridge and Jennings
• A computer system situated in some
environment
• Capable of Autonomous Action to
meet its design objectives in this
environment
• Autonomy – ability to act without direct
human intervention
Objects and Agents – An
Analogy
• Objects encapsulate state, Agents
encapsulate state + execution behaviour
• Objects have no control over the
execution of methods
• Invocation of method m on object o –
involuntary – whether object o likes it or
not
Objects and Agents – An
Analogy
• Agents have control of whether or not to
perform any given action
• Request actions rather than invoke
methods
Agents - Current Research and
Industry
 theories, architectures, languages, systems
 agent (internal structure) and mult-agents
(collaboration, teamwork)
 still thriving research -> emerging industry
 >20 companies including IBM, BT, HP,
Microsoft, Fujitsu, AgentSoft, Verity, AOS,
Extempo, ...
 >40 books on “software agents” at Amazon
 >50 research laboratories worldwide
 organizations coordinating international agent
research:
Agent Society, AgentLink, Agents-inMelbourne
Agents - Applications
 many due to:
 appeal of the agent abstraction
 agent research spans disciplines:
artificial intelligence, distributed
computing, software engineering
(ABSE), sociology, psychology,
economics, object-oriented systems,
artificial life, game theory, ...
 a sampling...
The Internet and the
WWW
 impetus for information agents
 gathering, filtering, sharing, monitoring,
recommending, comparing information
 guiding Web surfers
 email filtering, autoresponders (e.g., Snoop,
Smartbot)
 technologies: NL processing, XML/HTML,
machine learning, knowledge engineering
 E.g.s: Verity, Autonomy, AgentSoft, CiFi, ...
Electronic Commerce
 automate CBB stages including
product advertising, product brokering,
merchant brokering, negotiation, purchase and
delivery, customer services
 examples for brokering and negotiation:
PersonaLogic, Firefly, BargainFinder, Jango,
Kasbah, AuctionBot, Tete-a-tete, ShopBot
 needs: standards for unambiguous definition of
commerce-related information such as goods,
services, customer and business profiles,
electronic forms
Business Process
Management
 streamline business processes in a more flexible
and robust manner
 e.g.: ADEPT [Jennings et al]
 agents representing entities negotiate for
services from each other
 negotiation rules
 applied to BT process for installing a network
at a customer’s premises
 prototypes based on mobile agents: intra- and
inter-organizational workflows, supply-chain
management in virtual enterprises, project
management
Entertainment
 visual manifestation of agent
properties
 e.g.s (life-like interactive animated
characters): Creatures game [Grand
and Cliff], Extempo, Microsoft’s
Persona Project (3D, conversational
parrot)
 believable agents - illusion of life for
objects
Pilot Training
 DSTO and AAII’s SWARMM
system
 agents model pilot reasoning and
tactics in air battle simulations
 plan and meta-plan language
Manufacturing
 agents systems for:
 controlling manufacturing robots
 managing factory production processes
 e.g.: YAMS
 each factory and factory component is
represented by an agent
 automates delegation of production
orders via bidding between agents
And More...
 agents for telecommunications:
network modelling and QoS
management
 medical informatics: e.g., multi-agent
based distributed health care systems
 communityware: agents represent
people in virtual communities
 distributed data mining
Agents - Standardization
 Agent Communication Languages:
 KQML, ...
 Agent Lifecycle Management, etc...
 Organizations creating specifications:
 FIPA: >40 participants including Alcatel,
BT, Hitachi, NEC, Siemens, IBM, Sun
Microsystems, Telia,...
 OMG: e.g. MASIF
Important Types of Agents
•
•
•
•
•
•
Collaborative
Interface
Mobile
Information / Internet
Others – Reactive, Hybrid, Smart
Many Classification Schemes &
Typologies exist => to come in the next
lecture
What is a Mobile Agent ?
 Software program
 Moves from machine to machine under its own
control….
 Suspend execution at any point in time,
transport itself to a new machine and resume
execution
 Once created, a mobile agent autonomously
decides which locations to visit and what
instructions to perform
 Continuous interaction with the agent’s
originating source is not required
 HOW?
 Implicitly specified through the agent code
 Specified through a run-time modifiable
itinerary
Evolution
 BOTTOMLINE: Mobile Agents are a distributed
computing paradigm
 End point in the incremental evolution of mobile
abstractions such as mobile code, mobile objects,
mobile processes.
 Mobile Code – transfers code
 Mobile Object – transfers code + data
 Mobile Process – transfers
code + data + thread state
 Mobile Agent – transfers
code + data + thread + authority of its
owner
RPC Vs Mobile Agents
 Remote Procedure Calls (RPC)
 One computer calls procedures on another
 Messages: Requests and Responses
 Procedure is “remote” – i.e. it is local to the
machine that performs it
 Client and Server agree in advance on the
protocol for communication
 Continuous on-going interaction and
communication between the client and server
CLIENT
network
SERVER
RPC Vs Mobile Agents
 Mobile Agents
 Instead of calling a procedure, supply the
procedure as well
 Messages: Mobile Agent ( procedure + data +
state)
 “Sending” computer may have begun the
procedure and the receiving computer will
continue the procedure
 On-going interaction, but NO on-going
communication
CLIENT
network
Mobile
Agent
Service
SERVER
Applets, Servlets and
Mobile Agents
 Applet – Downloaded from server to
client
 Servlet – Uploaded from client to
server
 Mobile Agents – Detached from
client, can have multiple hops
Advantages of the
Mobile Agent Paradigm
 reduce bandwidth consumption and network loads
 allow dynamic deployment of application components
to arbitrary network sites
 encapsulate protocols
 execute asynchronously and autonomously
 can adapt by moving
 run on heterogeneous platforms
 most distributed applications fit naturally into the
mobile agent model
 intuitively suitable for mobile users and disconnected
operations
 Mobile agents combine the strengths of techniques
such as RPC, java applets etc. into a single, convenient
framework
Mobile Agent Myths
 MYTH #1: Mobile agents are risky to
use.
FACT #1 : No different to allowing
remote access or accepting email that
contains active entities
 MYTH #2: Mobile agent paradigm
needs a killer application to survive
FACT #2: Any technology needs time
to mature. Several applications rather
than one killer application can also
contribute towards pushing this
technology further
Mobile Agent Myths
 MYTH #3: Wide deployment of agent
environments is unlikely to emerge….
 Because agent’s execute within a
given environment. It is unlikely for
such agent environments to be
available on a base of computers
world wide that is large enough to
make MA applications truly ubiquitous
Mobile Agent Myths
 FACT #3 : No …Because…
 JVM’s and ORB’s exist in each browser
(most MA applications are developed in Java
and the OMG’s MASIF standards rely on
CORBA compliant interfaces)
 Development of PUSH technology can
enable “uninvited” agents to execute on
servers that are willing to accept them
 MA toolkits are typically small in size and so
are easy and inexpensive to download them
on servers where they do not already exist
 Emerging standards are likely to lead to
“interoperable agent environments”
Mobile Agent Myths
 MYTH #4: Most things that
mobile agents can do, static
agents can do as well
 FACT #4: True…but the
performance benefits
associated with mobile agents
can be higher
Mobile Agent Myths
 MYTH #5: The Mobile Agent
paradigm can solve all distributed
computing issues
 FACT #5: NO! Mobile Agents are
not a substitute for client-server
techniques. The two techniques
augment each other and very often
a combination of the two is the
most appropriate.
Levels of Mobility
 Weak Mobility
 When moving a mobile agent
carries code + data state
 Data State - global or instance
variable
 On moving, execution has to start
from the beginning
Levels of Mobility
 Strong Mobility
 When moving a mobile agent carries
code + data state + execution
state
 Data State - global or instance
variable
 Execution State – local variables and
threads
 On moving, execution can continue
from the point it stopped on the
previous host
Mobile Agent Toolkits
 What a DBMS is to Data, a Mobile Agent
Toolkit is to Mobile Agents
 Provides the infrastructure for mobile agents:
 to interact with the underlying computer
system – provide a “home”, a “place”, a
“context” – for agents to reside in and
perform their tasks on a given host
 to move from host to host
 to communicate with each other, with users
and with host servers
 to maintain privacy and integrity (of agents
as well as hosts)
 Current trend: Java based
Java – Lingua Franca for
Mobile Agent Toolkits
 BENEFITS
 Platform independence
 Secure execution
 Dynamic class loading
 Multi-threaded programming
 Object serialisation
Java – Lingua Franca for
Mobile Agent Toolkits
 LIMITATIONS
 Inadequate support for resource
control
 No protected references – need
for a proxy object to shield
access to public methods
 No support for preservation and
resumption of execution state
IBM’s Aglet Toolkit
 An Applet-like programming model
for mobile agents
 Java (as many mobile agent toolkits
are! )
 Aglet = Agent + Applet
 Aglet’s API facilitates mobile
technology
 Aglet: mobile java object that
visits aglet enabled hosts in a
computer network
 An Aglet = Instance of a Java class
extending the Aglet Class
IBM’s Aglet Toolkit
 An Aglet =
Aglet state (values in
variables)
+
Aglet code (class
implementation)
 Autonomous – runs its own thread
after arriving at a host
 Reactive – responds to incoming
messages
 Weak Mobility
IBM’s Aglet Mobile Agent
System
 System elements: host, engine,
context, proxy, aglet
 Aglet Transfer Protocol e.g.
“atp://hostname:port/context/”
 AgletID: system-given globally
unique identifier for life
IBM’s Aglet Mobile Agent
System
user
proxy aglet
proxy aglet
context
proxy aglet
context
proxy aglet
engine
host
IBM’s Aglet System
 Proxy: representative of an aglet.
 Shields and protects an aglet from direct
access to its public methods
 Provides location transparency for the
object
Context: an aglet’s work place.
 A server can have several contexts.
 Named
 Stationary
Message: objects exchanged between aglets
 Synchronous and Asynchronous messaging
(using FUTURE REPLY)
The Aglet Model
 Operations on aglets:
 creation – within a context. Assign id,
initialise and execute.
 run
 cloning – identical copy in the same
context. Different id and execution
thread
 dispatching – move from one context
to another where execution will restart (i.e. threads do not migrate)
 retraction – pull from current
context and insert into the context
from which retraction was requested
The Aglet Model
 activation & deactivation –
temporary halt and store in
secondary storage
 disposal – halt execution and remove
from current context
 Event-based control via user-defined
methods: onCreation, onDisposing,
onCloning, onDispatching, onReverting,
onArrival, onActivation,
onDeactivating,…
 Messaging between aglets: messaging via
proxy, a message invokes a method
Several Other
Toolkits





Gossip - Tryllian
Grasshopper – IKV++ Technologies
D’Agents - Dartmouth University
Voyager - ObjectSpace
MOA - Mobile Objects and Agents - The Open
Group Research Institute
 Concordia - Mitsubishi Electric Lab
 JSeal, Gypsy, Gossip – Many, many more…
Mobile Agent Applications






WWW Information Retrieval
Electronic Marketplace
Distributed Data Mining
Mobile Computing
Space Presence 
Others – Network Management,
Distributed Database Access
Mobile Web
Robots/Spiders
 Send mobile agents to the server side to
search/filter through web pages and
send only the relevant pages (or parts of
pages) back
 Deploy mobile agents to index web
pages – analyse and construct partial
indexes on the server side –and send
back the index
Mobile Web
Robots/Spiders
 Effective use of internet bandwidth
 Better performance
 Filtering of data and avoiding transfer of
intermediate data
 Better load distribution
 Continue scanning and screening even if
the link goes down
Electronic Marketplace
 Widely quoted application domain for mobile
agents
 Electronic Marketplace: Suppliers, Dealers,
Buyers and Brokers
 Buyers are generally the most benefited by
mobile agents
 Transaction Phases
 Information Phase – buyer collects information
from many prospective suppliers
 Negotiation Phase – buyer and supplier negotiate
the conditions of the transaction
 Execution Phase – Actual exchange of goods
Electronic Marketplace
 Market Structures
 Direct Search Markets
 Buyer directly contacts different suppliers
 Buyer has to perform the entire information
phase
 Time consuming and expensive
 Mobile Agents are ideally suited to perform
the search
Electronic Marketplace
 Brokered Markets
 Brokers perform the search for a certain fee
 Here brokers use mobile agents instead of the
buyers
 Dealer Markets
 Dealers are required to buy products in advance and
offer them at set prices to buyers
 Buyer asks different dealers for prices and
immediately buys the product at the cheapest dealer
 Mobile agents can be used to find the cheapest price
offered
MA Applications:
Electronic Marketplace
 Auction Markets
 Centralise supplies and demands on a single
virtual market place
 Less need for mobile agents as suppliers and
buyers can see the potential trading partners
Electronic Marketplace
 Information Phase : Mobile agents are very useful and
very easy to use, definite performance benefit
 Negotiation Phase : Mobile agents can be used to
reduce traffic, but there is more complexity involved in
negotiation than in mere searching. Intelligent Mobile
Agents? Also increased security requirements
 Execution Phase : Mobile agents can be used if the
transaction involves digital goods. However, agent
needs to carry digital cash and sign on behalf of the
user. How much do you trust your agent ? 
Distributed Data
Mining
 Data Mining (DM): Discovery of hitherto unknown
patterns from very large databases
 Distributed Data Mining (DDM): Data mining of
distributed data sources
 Characteristics:
 Distribution of data, users, mining algorithms and
computational resources
 Heterogeneity of data
 Large data volumes
 DDM = DM + Knowledge Integration
Distributed Data
Mining
 Client Server Model for DDM: Bring data from
distributed sources into a data mining server for
mining.
 Disadvantage: Communication Overhead
 Mobile Agent Model: Dispatch mining agents to the
distributed data sites.
 Overcomes the communication bottleneck
 But the problem of non-dedicated computational
resources
 Our Work – Hybrid DDM Model
Delivering Services to
Mobile Devices
 Environment: a set of wireless/wired networked
mobile/fixed computers
 dynamic environment: computational resources, battery
power, memory, bandwidth (with frequent
disconnections) limited and varying for the same
computer and across computers; set of computers in a
domain varying
 some uses of mobile software/agents:
 move/off-load (multiple) computations to other sites
(e.g., processing at database, Web and WAP servers):
no need to maintain connection, depleting resources,
move to discovered resources
 software components only when and where needed:
cope with limited memory, zero-maintenance mobile
computers, different versions for different hardware
characteristics
Delivering Services to
Mobile Devices
 user’s service environment can follow user’s
mobile device (e.g., VHE, NetChaser)
 agents move to mobile devices to perform
tasks (e.g., monitor and gather information
from deployed mobile devices)
 research: mobile places, docking stations e.g.
SOMA, AgentTcl, MASE (ACTS CLIMATE),
Magenta, Tacoma, Discovery
Current Areas of Work
 mobile agent theories: Pi-calculus extensions,
Mobile Ambients, Agent Itineraries
 mobile agent model: some component-based,
AI-based
 mobile agent infrastructure: environment
supporting mobile agents - security, naming,
domain crossing, etc
 mobile agent programming: languages, toolkits,
abstractions
 mobile agent applications: mobile agent
standards: OMG’s MASIF, FIPA
Research Issues
 Security: protect host from agents, protect agents
from agents, protect agents from host
 Performance: if Java or Python, performance
penalities with interpretation (esp. for performance
critical applications), but not for long?
 Strong mobility: move full execution state (stacks
etc), stacks not accessible with current Java?
 MA management:
 how control and manage deployed agents
 issues: fault tolerance (e.g., agent fails, host
fails), recalling agents, tracking agents, servicing
agents (esp. longer living agents)
Download