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

1
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

1

Agilla: Mobile Agent Middleware for Wireless Sensor Networks

Chenyang Lu

Department of Computer Science and Engineering

2

Motivation

Existing sensor network software lacks flexibility

  • Entire network runs just one application
  • Cannot adapt to changes in
  • the environment
  • the network
  • user requirements

3

Example: Forrest

Three applications: 1) Environmental Monitoring, 2) Fire Detection, 3) Fire Tracking

4

Agilla: A Flexible Middleware for Sensor Networks

  • Env. monitoring agent

Fire detection agent Fire tracking agent

Sensor network as a shared computing resource

  • Flexible application deployment

5

Example: Cargo Tracking

Thousands of containers leave/join network per day Software need to be changed on the fly due to

  • Departure and arrival of containers
  • Container’s country and company
  • Change in security levels
  • Change in security policies
  • Change in tracking technologies

Agilla: support rapid and flexible deployment of software in wireless sensor networks

6

Agilla’s System Architecture

TinyOS

Node @ (1,1)

Tuplespace

Agilla Middleware Agents TinyOS

Node @ (2,1)

Tuplespace

Agilla Middleware Agents

m igrate rem ote access

Neighbor List Neighbor List Middleware Services Middleware Services

slide-2
SLIDE 2

2

7

Agilla’s Computational Model

Clone

  • r

Migrate Code Stack Heap Condition Codes PC Two variants of each: 1) Strong (code + state) 2) Weak (code only)

8

Tuple Space-Based Coordination

  • Content-addressable shared memory
  • Tuple – A set of data fields
  • Template – A pattern that matches particular tuples
  • Provides spatiotemporal decoupling in unreliable networks

“out” “rout” “in”

Tuplespace Tuplespace

“in”

9

Agilla Tuple Space API

Remotely accessible localized tuple spaces Stores context information Facilitates inter-agent communication

  • ut:

insert in: remove rd: read inp: probing remove rdp: probing read regrxn: register reaction deregrxn: deregister reaction rout: insert rinp: probing remove rrdp: probing read rrdpg: probing group read (1-hop) Local Remote

Tuplespace

in

  • ut

10

Location-Base Addressing

Nodes are addressed by location

(3,1) (3,2) (3,3) (2,2) (1,1) (1,3)

clone to (3,3) clone to (3,1)

Fire Detection Agent

11

Implementation on TinyOS 1.1.13

  • Agilla is available for Mica2 and MicaZ motes
  • 4 agents/node
  • Agent Injector
  • Written in Java
  • 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

12

Our Test Bed

  • 6x9 Mica2 Mote

Test Bed

  • Multi-hop Grid
  • One base station
slide-3
SLIDE 3

3

13

Performance Evaluation:

migration vs. remote tuple space access

Migration instructions are more reliable because of hop-by-hop acknowledgements… … but remote tuplespace operations have less overhead

14

Agilla Instruction Execution Times

Local Operations Remote Operations

15

Initial Experiences

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)

16

Fire Tracking Video

Video available at: http:/ / m obilab.w ustl.edu/ projects/ agilla

17

Related Work

Distributing inanimate code modules

  • XNP [xbow’03], Deluge [sensys’04], MNP [icdcs’05],

SOS [mobisys’05]

  • Maté/Bombilla [asplos’02]

Mobile Agent-Like Middleware

  • Sensorware [mobisys’03]
  • Weak migration only
  • Smart Messages [Kang‘04]
  • No remote interactions
  • Single thread per node

18

Agilla Summary

Mobile agent middleware simplifies application deployment & increases network flexibility Agilla middleware services

  • Agent mobility
  • Tuple space-based coordination
  • Location-centric addressing
  • Context discovery

Empirical results: deploying sensor network applications on Agilla is reliable and efficient

slide-4
SLIDE 4

4

19

C.-L. Fok, G.-C. Roman, and C. Lu, Rapid Development and 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
  • Tutorials
  • Experience Reports

References

Agimone: Middleware Support for Seamless Integration of Sensor and IP Networks

Chenyang Lu

Department of Computer Science and Engineering

21

Motivating Application: Cargo Tracking

Shipping Yard Ship Train Truck Customer, Shipper, DHS, CBP

22

Problem Statement

Weak radio => low radio range => isolated networks => reduced utility 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

23

Background: Two Distinct Middlewares

TinyOS Node (1,1)

Tuple Space Neighbors Neighbors

Agilla Middleware MICA2 Mote Agents TinyOS Node (2,1)

Neighbors Neighbors

MICA2 Mote Agents

migrate remote access

Agilla Middleware

Tuple Space AQL AQL AQL AQL AQL AQL AQL AQL

Agilla: Sensor Network Middleware Lim one: I P Network Middleware

  • Mobile Agents
  • Host-level tuple spaces
  • Host-level neighbor list
  • Mobile Agents
  • Agent-level tuple spaces
  • Agent-level neighbor list

Severe resource lim itations Resource rich

24

Mobile Agent Model

Mobile agent: unit of execution that can relocated across hosts Multiple mobile agents can run on each host High degree of spatio-temporal decoupling => need shared data space with uniform interfaces.

slide-5
SLIDE 5

5

25

Tuple Space Model

  • Tuple: collection of data
  • <15, “str”, false>
  • Tuple space: shared data space containing tuples
  • Template: patterns which match tuples
  • <15, *, false> matches <15, “str”, false>
  • Common tuple space operations:
  • ut(t): add tuple t to tuple space
  • 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

26

Agilla and Limone Programming Models

Simple bytecode language Hosted on custom VM Handful of well-known data types Java programming language Hosted on Java VM Rich data types

Agilla Lim one

27

Agimone

Network Architecture System Components

28

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
  • ther AgimoneAgents
  • Ads stored in AgimoneAgent’s

Agilla tuple space

29

Agimone Services (Continued)

Inter-Network Migration

  • Multi-step process
  • Though internally

complex, appears simple to Agilla agent developer

30

Cargo Tracking Revisited

  • Watchdog Agents
  • Monitors sensors
  • Sends alert tuple to base station
  • Port authority’s Limone agent

reacts to it

  • 17 lines of Agilla code, 11 lines
  • f Java code
  • Intrusion Search Agent
  • Searches multiple WSNs for alert

tuples

  • Autonomously crosses WSN

boundaries

  • 23 lines of Agilla code, no

additional Java code

slide-6
SLIDE 6

6

31

Experimental Setup

100Mbps Ethernet IBM R40 Laptop

  • 1.5GHz Pentium M
  • 512MB RAM
  • Windows XP

Mica2 Mote on Gateway

  • 7.4MHz Atmel 128L
  • 4KB RAM
  • TinyOS

115kbps serial

32

Performance: Agimone Services

TS operations between mote and PC take 10-11 ms, regardless of type or direction Cross-WSN migration takes ~85 ms As size of agent increases, serial link becomes bottleneck

33

Performance: Middleware Overhead

  • Native implementation done using simple message passing
  • 27.39ms faster to move in and out of one WSN
  • 78.39ms faster round-trip across two WSNs
  • Performance loss, but high developer productivity

In-and-Out latency End-to-End Migration Latency

34

Other Integration Frameworks

  • Hourglass [J. Shneidman, et al. 04] and Stream-Based Overlay

Networks [P. Pietzuch, et al. 06]

  • Routes data from WSN to Internet, but does not support

applications

  • Tenet [R. Govindan, et al. 05]
  • PCs directly control sensors; no support for autonomous task

migration

  • SERUN [J. Liu, et al. 05]
  • Embedded microservers control sensors; tasks cannot migrate

across microservers

  • IrisNet [P. Gibbons, et al. 03]
  • Applies database abstraction to desktop PCs with sensing

peripherals (e.g., webcams)

35

Conclusions

Agimone is a middleware that integrates sensor and IP networks Implementation of a cargo tracking application demonstrated that Agimone simplifies development Inter-network tuple space accesses take 10-11ms, and migration takes ~85ms Some performance overhead, but increased productivity

36

  • G. Hackmann, C.-L. Fok, G.-C. Roman and C. Lu, Agimone:

Middleware Support for Seamless I ntegration of Sensor and I P Networks, I nternational Conference on Distributed Computing in Sensor Systems (DCOSS'06), June 2006. http: / / mobilab.wustl.edu/ projects/ agilla

  • Source Code
  • Documentation
  • Tutorials
  • Experience Reports

References