1
play

1 Agillas Computational Model Tuple Space-Based Coordination - PDF document

Motivation Agilla: Mobile Agent Middleware Existing sensor network software lacks flexibility Entire network runs just one application for Wireless Sensor Networks Cannot adapt to changes in the environment the network


  1. Motivation Agilla: Mobile Agent Middleware � Existing sensor network software lacks flexibility Entire network runs just one application � for Wireless Sensor Networks Cannot adapt to changes in � • the environment • the network • user requirements Chenyang Lu Department of Computer Science and Engineering 2 Agilla: A Flexible Middleware for Example: Forrest Sensor Networks � Three applications: 1) Environmental Monitoring, � Sensor network as a shared computing resource 2) Fire Detection, 3) Fire Tracking � Flexible application deployment Env. monitoring agent Fire detection agent Fire tracking agent 3 4 Example: Cargo Tracking Agilla’s System Architecture � Thousands of containers leave/join network per day Node @ (2,1) � Software need to be changed on the fly due to Node @ (1,1) Agents Agents � Departure and arrival of containers m igrate Container’s country and company � Change in security levels � Change in security policies � rem ote Neighbor Neighbor � Change in tracking technologies access Tuplespace Tuplespace List List � Agilla : support rapid and flexible deployment of Middleware Services Middleware Services software in wireless sensor networks Agilla Middleware Agilla Middleware TinyOS TinyOS 5 6 1

  2. Agilla’s Computational Model Tuple Space-Based Coordination � Content-addressable shared memory � Tuple – A set of data fields � Template – A pattern that matches particular tuples PC Clone � Provides spatiotemporal decoupling in unreliable networks or Stack Migrate Code “rout” Condition Codes “in” “in” “out” Heap Tuplespace Two variants of each: Tuplespace 1) Strong (code + state) 2) Weak (code only) 7 8 Agilla Tuple Space API Location-Base Addressing � Remotely accessible localized tuple spaces � Nodes are addressed by location � Stores context information out in � Facilitates inter-agent communication Tuplespace (3,3) (3,1) (3,2) Local Remote out : insert (2,2) rout : insert in : remove clone to (3,3) rinp : probing remove clone to (3,1) rd : read rrdp : probing read inp : probing remove rrdpg : probing group read (1-hop) Fire Detection rdp : probing read (1,3) (1,1) Agent regrxn : register reaction deregrxn : deregister reaction 9 10 Implementation on TinyOS 1.1.13 Our Test Bed � Agilla is available for Mica2 and MicaZ motes � 6x9 Mica2 Mote 4 agents/node Test Bed � � Agent Injector � Multi-hop Grid Written in Java � � One base station Remote Injection via RMI � � Key Challenges � Network bandwidth • Compact instructions Memory � • ROM: 54.7KB of 128KB • RAM: 3.5KB of 4KB Message loss � • Agent-level ARQ 11 12 2

  3. Performance Evaluation: Agilla Instruction Execution Times migration vs. remote tuple space access Local Operations Migration instructions are more reliable because of hop-by-hop acknowledgements… Remote … but remote tuplespace operations Operations have less overhead 13 14 Initial Experiences Fire Tracking Video � Fire Detection & Tracking � Presented at IPSN 2005 � Intruder Detection and Tracking Agents guard network perimeter and follow intruders � � Periodically report intruder location to base station � Cargo & Inventory Management � In collaboration with Boeing Mobile agents load manifests from RFID, find items, detect � security breaches, and send alert to Internet gateways. � Demo at SenSys 2005 (coming) 15 Video available at: http:/ / m obilab.w ustl.edu/ projects/ agilla 16 Related Work Agilla Summary � Distributing inanimate code modules � Mobile agent middleware simplifies application deployment & increases network flexibility � XNP [xbow’03], Deluge [sensys’04], MNP [icdcs’05], SOS [mobisys’05] � Agilla middleware services Maté/Bombilla [asplos’02] � Agent mobility � � Mobile Agent-Like Middleware Tuple space-based coordination � � Sensorware [mobisys’03] Location-centric addressing � • Weak migration only � Context discovery � Smart Messages [Kang‘04] � Empirical results: deploying sensor network • No remote interactions applications on Agilla is reliable and efficient • Single thread per node 17 18 3

  4. References Agimone: Middleware Support for Seamless Integration of Sensor and C.-L. Fok, G.-C. Roman, and C. Lu, Rapid Development and IP Networks Flexible Deployment of Adaptive Wireless Sensor Network Applications, International Conference on Distributed Computing Systems (ICDCS'05), June 2005. Agilla: http://mobilab.wustl.edu/projects/agilla • Source Code • Documentation Chenyang Lu • Tutorials • Experience Reports Department of Computer Science and Engineering 19 Motivating Application: Cargo Tracking Problem Statement � Weak radio => low radio range => isolated networks => reduced utility Ship Train � Communication restrictions can be eased by connecting WSNs using a common IP network � Custom application-specific software is written to connect sensor and IP networks Sensor and IP networks have vastly different characteristics � and capabilities � Not reusable, error prone, inflexible Truck Shipping Yard Customer, Shipper, DHS, CBP 21 22 Background: Two Distinct Middlewares Mobile Agent Model � Mobile agent : unit of execution that can relocated Node (1,1) Node (2,1) across hosts Agents Agents migrate � Multiple mobile agents can run on each host AQL AQL AQL AQL AQL AQL AQL AQL remote � High degree of spatio-temporal decoupling => need access Neighbors Neighbors Tuple Space Tuple Space Neighbors Neighbors Agilla Middleware Agilla Middleware shared data space with uniform interfaces. TinyOS TinyOS MICA2 Mote MICA2 Mote Agilla : Sensor Network Middleware Lim one : I P Network Middleware • Mobile Agents • Mobile Agents • Host-level tuple spaces • Agent-level tuple spaces • Host-level neighbor list • Agent-level neighbor list Severe resource lim itations Resource rich 23 24 4

  5. Agilla and Limone Programming Tuple Space Model Models � Tuple : collection of data � <15, “str”, false> Agilla Lim one � Tuple space : shared data space containing tuples � Template : patterns which match tuples � Simple bytecode � Java programming <15, *, false> matches <15, “str”, false> � language language � Hosted on custom VM � Hosted on Java VM � Common tuple space operations: � Handful of well-known � Rich data types � out(t) : add tuple t to tuple space data types � rd(T) : copy tuple matching template T from tuple space � in(T) : remove tuple matching template T from tuple space � react(T, c): execute code segment C when tuple matching template T is placed in tuple space 25 26 Agimone Agimone Services � Shared data space � AgimoneAgent has own Agilla TS � Agilla agents access TS directly � AgimoneAgent wraps Agilla TS in Limone TS API � Sensor network discovery � AgimoneAgent advertises self with Limone Registry � Limone Registry distributes ad to other AgimoneAgents � Ads stored in AgimoneAgent’s Agilla tuple space Network Architecture System Components 27 28 Agimone Services (Continued) Cargo Tracking Revisited � � Inter-Network Migration Watchdog Agents � Monitors sensors � Multi-step process � Sends alert tuple to base station � Though internally � Port authority’s Limone agent complex, appears simple reacts to it to Agilla agent developer � 17 lines of Agilla code, 11 lines of Java code � Intrusion Search Agent � Searches multiple WSNs for alert tuples • Autonomously crosses WSN boundaries � 23 lines of Agilla code, no additional Java code 29 30 5

Recommend


More recommend