Presentation is loading. Please wait.

Presentation is loading. Please wait.

Agents, Mobile Agents, and D’Agents David Kotz Department of Computer Science Dartmouth College AFRL, Rome NY September 7, 1999.

Similar presentations

Presentation on theme: "Agents, Mobile Agents, and D’Agents David Kotz Department of Computer Science Dartmouth College AFRL, Rome NY September 7, 1999."— Presentation transcript:

1 Agents, Mobile Agents, and D’Agents David Kotz Department of Computer Science Dartmouth College AFRL, Rome NY September 7, 1999

2 9/7/1999AFRL2 Acknowledgements George Cybenko, Thayer School of Engineering Bob Gray, Thayer School of Engineering Daniela Rus, Department of Computer Science Collaborators DARPA contract F30602-98-2-0107 DoD MURI (AFOSR contract F49620-97-1-03821) AFRL/Rome contract F30602-98-C-0006 ONR contract N00014-95-1-1204 Funding:

3 9/7/1999AFRL3 Read more about it D’Agents and the DARPA CoABS effort ActComm (DoD MURI) Other mobile-agent systems This tutorial (final version)

4 9/7/1999AFRL4 Outline (I) Introduction to software agents What is an “agent”, anyway? Introduction to mobile agents Motivating applications Reasons for mobility Competing approaches Representative systems Java-based systems Other single-language systems Multiple-language systems

5 9/7/1999AFRL5 Outline (II) D’Agents D’Agents orientation Example: Writing a Tcl agent Results and research Performance Research: Choose when to move Research: Other services The future of mobile agents

6 9/7/1999AFRL6 Introduction to Agents “Agent” is an old concept in A.I. –Minsky’s book Society of Minds, 1980s –Kahn and Cerf “Knobots” at CNRS An “agent” is a system that –is long-lived (persistent), –has goals, sensors, and effectors, –decides autonomously what actions to take, –to maximize progress toward its time- varying goals.

7 9/7/1999AFRL7 Research in AI community Single-agent systems: –Action selection (planning) –Knowledge representation and inference –Agent learning and adaptation Multi-agent systems: –Communication and collaboration –Emergent properties of group behavior

8 What is an agent? Robots (“physical agents”)

9 9/7/1999AFRL9 What is an agent? Cartoon characters (“synthetic agents”) For example, the Oz projectOz project at CMU (Joseph Bates)

10 9/7/1999AFRL10 What is an agent? A program (“software agent”), e.g., Personal assistant (mail filter, scheduling) Information agent (tactical picture agent) E-commerce agent (stock trader, bidder) Recommendation agent (Firefly, A program that can –interact with users, applications, and agents –collaborate with the user Software agents help with repetitive tasks

11 9/7/1999AFRL11 Is everything an “agent”? Not all programs are agents Agents are –customized –persistent –autonomous –adaptive

12 9/7/1999AFRL12 Mobile agents

13 9/7/1999AFRL13 What is a mobile agent? Machine AMachine B Search engine Mobile agent: Agent that migrates from machine to machine in a heterogeneous network at times of its own choosing

14 9/7/1999AFRL14 Different kinds of mobility Strong (data and control) Weak (data only) Remote references (“system” state) Files No remote references (no “system” state) Files

15 9/7/1999AFRL15 Different kinds of mobility Strong & Remote refs Strong & No remote refs Weak & Remote refs Weak & No remote refs ControlData System Yes No Load- balancing D’Agents Obliq Tacoma

16 9/7/1999AFRL16 Application: Technical reports Dynamically selected proxy site 1. Send agent 3. Return merged and filtered results GUI on home machine Machine n Machine 1... 2. Send child agents / collect partial results

17 TR: RPC vs. Mobile Agents Machine 3 Machine 1 Machine 2 Proxy RPC requires Lots of roundtrip messages Wireless Wired Network Mobile agent moves across wireless only twice

18 Weather Maps Dartmouth (Prime), ALPHATECH, Harvard, Lockheed Martin, RPI, University of Illinois at Urbana Commands Mobile Users Volatile Network and Information Resources Field Reports Information Requests AGENTS Active Information : standing queries, data fusion, automatic organization Active Software : Tcl, Java, and Scheme mobile agents deliver data and monitor databases Active Hybrid Networks: Wireless and volatile networks must reconfigure and relocate servers/proxies for robustness and efficiency Active Planning : Network routing and agent itineraries must be planned dynamically using stochastic control. The ActComm Project 1997 DoD MURI

19 9/7/1999AFRL19 Application: ActComm Wireless Network Technical specs Orders and memos Troop positions Wired network

20 9/7/1999AFRL20 Mobile node setup GPS Unit Cabletron/ Digital Roamabout* Metricom Ricochet* Linux laptop * We now use Lucent WaveLAN2 cards

21 The DARPA CoABS Project The “Grid” Computers Users Agents Information sources Brokers Planners Schedulers

22 9/7/1999AFRL22 The CoABS Grid A dynamic mix of resources –Resources come and go –Base infrastructure for communication and directory services –Grid-ready agents provide services –Brokers help to find info and services Rapid construction of new applications –Assemble unexpected apps in days or weeks –Use existing components (agents)

23 9/7/1999AFRL23 Application: NEO Non-combatant Evacuation Operation –Kuwait City –Dynamic route planning –Traffic and weather monitoring –Helicopter scheduling

24 Reasons for Mobile Agents

25 9/7/1999AFRL25 Reason 1: Bandwidth conservation Server Dataset Text documents, numerical data, etc. Client/Proxy Server Dataset

26 9/7/1999AFRL26 Reason 1: Bandwidth Conservation Dataset Dynamically selected proxy site

27 9/7/1999AFRL27 TR: Bandwidth usage

28 9/7/1999AFRL28 Reason 2: Reduce latency Sumatra chat server (a “reflector”) 1. Observe high average latency to clients 2. Move to better location

29 9/7/1999AFRL29 Reason 3: Reduce Completion Time Efficiency Mobile users 1. Send code with unique query 2. Perform multi-step queries on large, remote, heterogeneous databases 3. Return requested data Low bandwidth channel

30 9/7/1999AFRL30 TR: Total completion time

31 9/7/1999AFRL31 Reason 4: Disconnected communication and operation X X X X Before After

32 9/7/1999AFRL32 Reason 5: Load balancing Jobs/Load Jobs/Load migrate in a heterogeneous network of machines

33 9/7/1999AFRL33 Reason 6: Dynamic Deployment Unique needs: maps, weather, tactical updates.... Command post Tactical updates Map, terrain databases Weather

34 9/7/1999AFRL34 Other techniques work... Remote Procedure Calls (RPC) Stored Procedures Java Applets and servlets Load balancing in homogeneous networks Application-specific solutions

35 9/7/1999AFRL35 … but takes several techniques That is, the research community is developing several different approaches to deal with problems of efficiency, robustness, adaptability and flexibility for distributed computing and information systems. Mobile agents are a single technology, based on strong code mobility, to solve many problems in a unified framework.

36 9/7/1999AFRL36 Moving along... Introduction to agents Introduction to mobile agents Representative systems Java-based systems Other single-language systems Multiple-language systems

37 9/7/1999AFRL37 Representative systems Java-based systems Other single-language systems Multiple-language systems Aglets, Voyager Messengers Tacoma, D’Agents There are many others; too many to describe today.

38 9/7/1999AFRL38 Differences and similarities Commercial vs. Research Imperative vs. Functional vs. Declarative Strong mobility vs. Weak mobility Interpreted vs. Just-in-time vs. Software fault isolation Stand-alone vs. Tight Web integration OMG/FIPA standards vs. Unique protocols

39 9/7/1999AFRL39 Aglets Java Weak mobility Event-driven programming model (dispatch, onDispatching, onArrival, …) Persistent store “Proxies” for location transparency IBM

40 9/7/1999AFRL40 Voyager Java Built on top of CORBA Weak mobility Persistent store Federated directory service and group communication (multicast) ObjectSpace

41 9/7/1999AFRL41 Why not Java? Limited per-thread resource accounting (or enforcement) No strong mobility, in standard JVM Support for multiple languages? Inefficient on top of Java VM

42 9/7/1999AFRL42 Messengers University of Geneva MØ (similar to Postscript) Weak mobility Intended for low-level services, e.g., in the Messenger Operating System (MOS) Bulletin boards for data exchange and service listings

43 9/7/1999AFRL43 Why not a single language? Mobile agents have many applications, and no one language is good for all applications.

44 9/7/1999AFRL44 Tacoma C, Tcl/Tk, Scheme, Python, Perl (public release), several more internally Weak mobility Single, simple abstraction: meet –Easy to add a new language –Less opportunity for optimization University of Tromsø / Cornell University

45 9/7/1999AFRL45 Moving along... D’Agents D’Agents orientation Example: Writing a Tcl agent Results and research Future of mobile agents

46 9/7/1999AFRL46 Project started Spring, 1994 Performance Halfway there Communication and migration overhead not as low as possible Security Machine protection Agent protection while in transit No agent protection while on a machine Multiple languages Tcl Java Scheme Support services Directory service Tracker Debugger (Tcl) …

47 9/7/1999AFRL47 D’Agents: Mobility Model Strong mobility / No remote references Machine A 1. Capture agent state 2. Sign/encrypt state 3. Send state to B Server … searched = searched + 1; jump B; meet with search-engine; … Agent Machine B 6. Resume agent 5. Restore state 4. Authenticate … searched = searched + 1; jump B; meet with search-engine; …

48 9/7/1999AFRL48 D’Agents: Architecture Machine A Transport (TCP/IP) Server Java VM Tcl interp. Schem e interp. Agents VM / Interpreter Security State Capture VM Server stubs

49 9/7/1999AFRL49 Tcl/Tk Interpreted scripting language “Everything is a string.” Not object-oriented, but has namespaces Ideal for “glue” applications –Call high-level operation 1, modest processing to decide next operation, call high-level operation 2, … Tk provides GUI capabilities. proc processFile {filename} { # open the file and read in contents set fd [open $filename r] set contents [read $fd] close $fd # split the file contents into a list # and process each line set splitContents [split $contents r] foreach line $splitContents {... } # MAIN SCRIPT - call our only procedure set code [catch { processFile } errorMessage] if {$code} { puts $errorMessage }

50 9/7/1999AFRL50 Agent Tcl primitives (I) agent_begin Register with the local agent server agent_name Obtain a name in the namespace agent_end Unregister and exit Server 1. agent_begin 2. agent_name database 3. agent_end... agent_send Send a message to an agent agent_receive Receive a message Machine B Machine A 1. agent_send {B database} 0 query Local Machine 2. agent_receive …

51 9/7/1999AFRL51 Agent Tcl primitives (II) agent_jump Migrate to a new machine and continue from the point of the jump Machine B Machine A agent_jump B agent_submit -procs -vars -script Create a new (child) agent Machine B Machine A 1. agent_submit B -procs search -vars query -script {search $query} $query

52 9/7/1999AFRL52 Agent Tcl primitives (III) agent_fork Clone an agent (fork a child agent) Machine B Machine A agent_fork B Exact copy that continues from fork point

53 9/7/1999AFRL53 Other features Meetings Select Status reports Notifications Event-driven programming Second communication mechanism (direct connection between agents) Wait for a message, meeting request, data arriving over a meeting, etc. Which agents are running on machine A? Who owns agent X? Message from server on agent birth or death Event handlers for all types of incoming communication

54 9/7/1999AFRL54 Naming scheme Machine B Machine A agent_send {B TR}… or agent_send {B 17}… Machine name Symbolic name (chosen by agent) Numeric id (chosen by system, unique per machine) Location-independent addressing through the yellow pages

55 9/7/1999AFRL55 A skeleton agent proc child {machines} { global agent # migrate through machines set results {} foreach machine $machines { agent_jump $machine # do task, update results } # send back results and end agent_send \ $agent(root) 0 $results agent_end } Child Agent agent_begin # submit child set machines {A B …} agent_submit \ $agent(local-server) \ -procs child \ -vars machines \ -script {child $machines} # get results agent_receive \ code results -blocking puts $results agent_end Parent Agent

56 9/7/1999AFRL56 The “who” agent Child Agent... set results {} # migrate through machines foreach machine $machines { agent_jump $machine append results \ [exec who << {}] } # send back results agent_send \ $agent(root) 0 $results... Machine Z Home Machine A WHO 1. Submit child... 2. Jump 3. Send list of users

57 9/7/1999AFRL57 TR application 1. Register 2. Ask for query 8. Send merged results muir tioga 4. Submit search agents 7. Collect results 3. Submit proxy agent bald 9. Display results 10. End 5. Query database 6. Return results “Hardcoded” proxy and document locations

58 9/7/1999AFRL58 TR: Talking to the user agent_begin # register with the agent system puts -nonewline “Enter a query:” gets stdin query set proxy bald; set collections {muir tioga} set me $agent(local) agent_submit $proxy \ # submit the proxy agent -proclist {proxyAgent searchAgent} \ -varlist {me query collections} \ -script {proxyAgent $me $query $collections} # receive the query results agent_receive code results -blocking puts “Query results:” puts $results agent_end # done “Front-end” Agent Note: Position of some comments is invalid Tcl syntax.

59 9/7/1999AFRL59 TR: Sitting in the middle proc proxyAgent {parent query collections} { global agent set numCollections [llength $collections] set me $agent(local) foreach machine $collections { # submit search agent_submit $machine \ # agents -proclist searchAgent -varlist {me query} \ -script {searchAgent $me $query} } set results {} for {set i 0} {i < $numCollections} {incr i} { # collect results agent_receive code partialResults -blocking # merge into results so far } agent_send $parent 0 $results # send back results agent_end # done } Proxy Agent (submitted by the front-end agent) Note: Position of some comments is invalid Tcl syntax.

60 9/7/1999AFRL60 TR: Searching the collections proc searchAgent {parent query} { global agent # send the query to the database interface agent # and receive the results agent_send “$agent(local-server) TR” \ 0 “keyword-query $query” agent_receive code results -blocking # in a more complex version of the TR, use the # abstract of the most relevant document as a # new query, compare the two result lists, etc. # send back the results and stop agent_send $parent 0 $results agent_end } Search Agent (submitted by the proxy agent)

61 9/7/1999AFRL61 TR: Step by step (redux) 1. agent_begin 2. gets stdin query 8. agent_send 3. agent_submit proxyAgent 5. agent_send/ agent_receive 6. agent_send 4. agent_submit searchAgent 7. agent_receive 9. puts $results 10. agent_end

62 9/7/1999AFRL62 Application: e-commerce Bank Arbiter VendorA Yellow pages VendorB Agent

63 9/7/1999AFRL63 Moving along... D’Agents Results and research Performance Research: Choose when to move Research: Other services The future of mobile agents

64 9/7/1999AFRL64 Multiple queries: 10 Mb/s Ethernet

65 9/7/1999AFRL65 Multiple queries: 1 Mb/s

66 9/7/1999AFRL66 Multiple queries: 0.1 Mb/s modem

67 9/7/1999AFRL67 Base performance

68 9/7/1999AFRL68 What lowers performance? 1. All messages through server (plus TCP/IP) Server Machine AMachine B TCP/IP connection Server Machine A Server Tcl Interp TCP/IP connection jump 2. Interpreter initialization (plus TCP/IP) All solvable problems

69 9/7/1999AFRL69 D’Agents: Hot Interpreters Server Java VM Pool of Tcl interpreters Pool of Scheme interpreters Pipes from VM / interpreters to server This optimization is already reflected in the preceding results

70 9/7/1999AFRL70 Scaling to large platforms: Serval Scalable Document Server 25-node Linux cluster; Fast internal Ethernet Client Internet Any node Doc Index Doc Storage Doc Index Doc Storage Doc Index Doc Storage A Routed to a random node Documents and index are distributed

71 9/7/1999AFRL71 Scaling to small platforms Palm III Organizer Proxy Machine Palm OS Code Agent Palm OS Code Results Agent Results Current work: Design and development of a new Windows NT/CE mobile-agent system.

72 9/7/1999AFRL72 Market-based resource control $ T T T jump Goals Economic incentive to accept agents Resource scheduling No “runaway” agents Agent Gets resource share proportional to ticket share Optimizes utility function (parameters include risk tolerance, resource needs, and initial cash)

73 9/7/1999AFRL73 Docking M (laptop) M_dock (permanently connected machine) Queue of agents waiting to go to M Queue of agents waiting to leave 1. Jump directly to laptop 2. If laptop unreachable, go to dock 3. Change in network status 4. Notify dock of new location 5. Transfer waiting agents in both directions This simple approach has been extended into a more general active-networking scheme, where any machine can act as a dock for any other.

74 9/7/1999AFRL74 “Yellow pages” Brokering vs. matchmaking/yellow-page services. Broker ? YP ? Broker mediates all communications. YP locates, but then direct communication.

75 9/7/1999AFRL75 MACE Mobile- Agent Construction Environment

76 9/7/1999AFRL76 Debugging (Tcl) Debugger 1. Notify: About to jump 2. Jump 3. Notify: Jumped

77 9/7/1999AFRL77 Tracking Works in same way as debugger Interactively or via logs Current work: Merge with debugger Current work: Zoom in and out

78 9/7/1999AFRL78 Moving along... Results and research The future of mobile agents

79 9/7/1999AFRL79 Current trends lead to mobile agents Information overload Diversified population Bandwidth gap Mobile users and devices “Customization” Proxy-based Server-side Avoid large transfers Disconnected Operation Mobile code to client Mobile code to server or proxy Mobile Agents High latency Increased need for personalization Too many unique, dispersed clients to handle Multiple sites to visit Avoid “star” itinerary

80 9/7/1999AFRL80 Migrating to migrating code Applets Proxies that accept servlets Services that accept servlets Proxies provided by existing ISP’s Mobile Agents Intranet Internet

81 9/7/1999AFRL81 Conclusion: Cons Security is too big a concern Overhead for moving code is too high Not backward compatible with Fortran, C …. Networks will be so fast, performance not an issue

82 9/7/1999AFRL82 Conclusion: Pros A unifying framework for making many applications more efficient Treats data and code symmetrically Multiple-language support possible Supports disconnected networks in a way that other technologies cannot Cleaner programming model

83 9/7/1999AFRL83 Read more about it (redux) D’Agents ActComm (DoD MURI) Other mobile-agent systems This tutorial (final version)

84 9/7/1999AFRL84 Source code D’Agents (server and Tcl module) D’Agents (Java module) Available by request (due to Sun licensing restrictions). Contact D’Agents (Scheme module) Available by request.

Download ppt "Agents, Mobile Agents, and D’Agents David Kotz Department of Computer Science Dartmouth College AFRL, Rome NY September 7, 1999."

Similar presentations

Ads by Google