programming models for multirapid ... - st.ewi.tudelft.nl• tuple insertion can trigger reactions...

25
Programming Models for multi-cores Rapid Development and Flexible Deployment of Programming Models for multi cores Rapid Development and Flexible Deployment of Adaptive Wireless Sensor Network Applications Chen-Liang Fok Gruia-Catalin Roman Chenyang Lu presenter: Paolo L. Schipani Challenge the future Delft University of Technology

Upload: others

Post on 09-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Programming Models for multi-coresRapid Development and Flexible Deployment ofProgramming Models for multi coresRapid Development and Flexible Deployment of Adaptive Wireless Sensor Network Applications Chen-Liang FokGruia-Catalin RomanChenyang Lu

presenter: Paolo L. Schipani

Challenge the future

DelftUniversity ofTechnology

Page 2: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Agilla: a middleware for WSNs

• Based on Bombilla, a TinyOS implementation of Maté

• Applications as mobile agents• Applications as mobile agents

• Middle layer between TinyOS and mobile agents

Challenge the future

DelftUniversity ofTechnology

Page 3: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Why agents?

• Agents can follow events of interest

• Multiple agents can coexist on a node or enter it at every moment• Multiple agents can coexist on a node, or enter it at every moment

• Minimum resource utilization

Challenge the future

DelftUniversity ofTechnology

Page 4: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Motivating example (1)

Challenge the future

DelftUniversity ofTechnology

Page 5: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Motivating example (2)

Challenge the future

DelftUniversity ofTechnology

Page 6: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Motivating example (3)

• Sensors detect the fire and spawn tracking agents• Sensors detect the fire and spawn tracking agents

• Tracking agents swarm around the fire and collect data

• Tracking agents from a dynamic perimeter around the growing fire

• Meanwhile, a base station is notified to alert the firefighters

• Through the data, firefighters predict the fire’s behavior and respond accordingly

Challenge the future

DelftUniversity ofTechnology

Page 7: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

The Agilla model

Challenge the future

DelftUniversity ofTechnology

Page 8: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Geographical routing

• Agilla assumes each node knows its own location

• Nodes are identified by coordinates (x y)• Nodes are identified by coordinates (x, y)

• One-hop neighbour discovery through beacons

• An error ε is allowed when specifying an address

• Operations possible on an entire region

Challenge the future

DelftUniversity ofTechnology

Page 9: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

The Tuple Space

• Agents need to communicate and coordinate, while mantaining autonomy

• Each node mantains a local tuple space

• Every data is a tuple, a set of ordered fields containing a typeand a value

• A tuple is extracted if an agent provides a matching template

• Pre-defined tuple mantain context information• Pre defined tuple mantain context information

• Tuple insertion can trigger reactions

Challenge the future

DelftUniversity ofTechnology

Page 10: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Reactions (1)

• A FireDetector agent spots a fire and inserts a new tuple

• The agent sends a notification to a base station then dies• The agent sends a notification to a base station, then dies

• Other agents can die to free useful space

• A FireTracker agent reacts to the tuple insertion

Challenge the future

DelftUniversity ofTechnology

Page 11: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Reactions (2)

• Avoid request of data

• Allow immediate agent notification• Allow immediate agent notification

• Allow different reactions from different agents

• Decouple data spatially and temporally

Challenge the future

DelftUniversity ofTechnology

Page 12: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Tuple space instructions

• out: insert a tuple into the local tuple space

d fi d t l i th l l t l• rd: find tuple in the local tuple space

• in: find and remove tuple from the local tuple spacep p p

• rdp, inp: non-blocking

• rout, , rinp, rrdp: remote tuple space operations

d (d ) i t i ti• regrxn, deregrxn: (de) registering a reaction

Challenge the future

DelftUniversity ofTechnology

Page 13: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Migration instructions

• wmove and wclone for weak action

• smove and sclone for strong action• smove and sclone for strong action

• The rest is general purpose instructionsg p p

Challenge the future

DelftUniversity ofTechnology

Page 14: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

The mobile agent architecture

Challenge the future

DelftUniversity ofTechnology

Page 15: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

The Agilla platform

Challenge the future

DelftUniversity ofTechnology

Page 16: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Quality of Service

• Agents are moved one node at a time and every movement is acknowledged

• Timers to retransmit messages

R t t l ti d t d i ti• Remote tuple operations use end-to-end communications,without acknowledgment

Challenge the future

DelftUniversity ofTechnology

Page 17: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Experimental testbed (1)

Challenge the future

DelftUniversity ofTechnology

Page 18: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Experimental testbed (2)

• A grid of 25 MICA2 motes

• A laptop with Java application to inject agents and perform remote• A laptop with Java application to inject agents and perform remote tuple operations

T t th li bilit f d t• Test the reliability of smove and rout

Challenge the future

DelftUniversity ofTechnology

Page 19: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Latency of remote operations

Challenge the future

DelftUniversity ofTechnology

Page 20: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Latency of remote operations

Challenge the future

DelftUniversity ofTechnology

Page 21: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Latency of local operations

Challenge the future

DelftUniversity ofTechnology

Page 22: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Future work

Simplifying Agilla language

Challenge the future

DelftUniversity ofTechnology

Page 23: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Future work

Simplifying Agilla language

Challenge the future

DelftUniversity ofTechnology

Page 24: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Conclusions

• First mobile agent-based paradigm for WSNs• Faster application development• Rapid application deployment• Reusability of the network• Application concurrencyApplication concurrency

• Knowledge shared by means of Tuple Space

• Swift performance• Migrating agents

Challenge the future

DelftUniversity ofTechnology

Page 25: Programming Models for multiRapid ... - st.ewi.tudelft.nl• Tuple insertion can trigger reactions Challenge the future Delft University of Technology. Reactions (1) • A FireDetector

Questions

Challenge the future

DelftUniversity ofTechnology