tag: a tiny aggregation service for ad-hoc sensor networks paper by : samuel madden, michael j....

19
TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By: Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor: Dr Yingshu Li Presented By: R. Jayampathi Sampath

Upload: joleen-richard

Post on 26-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks

Paper By: Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong

Instructor: Dr Yingshu LiPresented By: R. Jayampathi Sampath

Page 2: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Outline

lntroductonMotesThe TAG Approach

Ad-Hoc Routing Algorithm

Query Model and EnvironmentQuery Model

In Network AggregatesTiny AggregationGroupingAdditional Advantages of TAG

Simulation-Based Evaluation

Optimizations

Page 3: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Introduction- Device Capabilities

4Mhz Processor

4K RAM, 512K EEPROM, 128K code space

Single channel CSMA half-duplex radio @ 40kbits

TinyOS operating system (services)Fixed Message size – 30 bytesEach device has a unique sensor IDAll messages specify their recipient (or specify broadcast)Motes ignore messages not intended for them

Lifetime from one pair of AA batteries 2-3 days at full power6 months at 2% duty cycle

Page 4: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Introduction- Device Capabilities

Transmitting a single bit of data is equivalent to 800 instructions.

Communication dominates cost

< few mS to compute30mS to send message

Time v. Current Draw During Query Processing

0

5

10

15

20

0 0.5 1 1.5 2 2.5 3Time (s)

Cu

rre

nt

(mA

) Snoozing

Processing

Processingand Listening

Transmitting

many applications will benefit by processing the data inside the network rather than simply transmitting the sensor readings

Page 5: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Introduction-The TAG ApproachMany Sensor Network Applications are Data Oriented

Programming sensor nets is hard!

Declarative queries are easy

TAG-a generic aggregation service for ad hoc networks of TinyOS motes

Provides a simple, declarative interface for data collection and aggregation.Intelligently distributes and executes aggregation queries in the sensor network in a time and power-efficient manner

TAG processes aggregates in the network by computing over the data as it flows through the sensors, discarding irrelevant data and combining relevant readings into more compact records when possible.

Page 6: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Introduction-The TAG Approach Previous work has tended to view aggregation as an application specific mechanism that would be programmed into the devices on an as-needed basis.

TAGAggregation provided as a core serviceeasily invoked high-level programming

TAG operates as follows- For exampleconsider a query that counts the number of nodes in a network of indeterminate size.

request to count is injected into the networkeach leaf node in the tree reports a count of 1 to their parentinterior nodes sum the count of their children, add 1 to itreport that value to their parentpropagate up the tree in this manner, and flow out at the root

Page 7: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Introduction-The TAG Approach

Page 8: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Ad-Hoc Routing AlgorithmTree-based routing scheme

one mote is appointed to be the root (it is the point where the user interfaces to the network).The root broadcasts a message asking motes to organize into a routing tree.in that message it specifies its own id and its level, or distance from the root.Any mote without an assigned level that hears this message assigns its own level to be the level in the message plus one.chooses the sender of the message as its parent.Each of these motes then rebroadcasts the routing message, inserting their own ids and levels.These routing messages are periodically broadcast from the root, so that the process of topology discovery goes on continuously.parents are retained unless a child does not hear from them for some long period of time, at which point it selects a new parent using this same process.

Page 9: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Ad-Hoc Routing Algorithm (Contd.)

Query

P:0, L:1

2

1

5

3

4

6

P:1, L:2

P:2, L:3

P:4, L:4

Page 10: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Query Model and EnvironmentSupport SQL-style queries (without joins) over a single table called sensors.example query

In general

difference between TAG queries and SQL queries is that the output of a TAG query is a stream of values, rather than a single aggregate value

Page 11: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

In Network AggregatesTiny Aggregation

How parents choose the duration of interval

To be long enough s.t all of a node’s children can report

Longer intervals consumes energy

Proper choice of duration Environment specificDepend on densityNw topology

For the simulationAssumed maximum depth dInterval = epoch duration/d

Page 12: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

In Network Aggregates (Contd.)

Grouping

Page 13: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

In Network Aggregates (Contd.)

Additional Advantages of TAGThe principal advantage of TAG is decrease the communication.

ability to tolerate disconnections and loss.

in most cases, each mote is required to transmit only a single message per epoch, regardless of its depth in the routing tree.

Symmetric power consumption, even at root

explicitly dividing time into epochs, a convenient mechanism for idling

Continuous stream of results

New value on every epoch

Page 14: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Simulation-Based Evaluation

Simulated TAG in JavaTime is divided into units of epochs.Messages are encapsulated into Java objects.Nodes are allowed to compute or transmit arbitrarily within a single epoch.each node executes serially.Messages sent by all nodes during one epoch are delivered in random order during the next epoch to model a parallel execution.No model of radio contention at a byte level

Page 15: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Simulation-Based Evaluation (Contd.)

Performance of TAG- 2500 node (d=50) network

Grouping Experiments

Page 16: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Optimizations

Taking Advantage of A Shared ChannelNodes can overhear missed querySnooping does not require nodes to listen all the time.Snooping reduce the number of messages sent for some classes of aggregates.

Hypothesis Testingnode is presented with a guess as to the proper value of an aggregate, it can decide locally whether contributing its reading and the readings of its children will affect the value of the aggregate.significantly reduce the number of nodes that need to report.

Page 17: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Optimizations (Contd.)

Page 18: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

Optimizations (Contd.)Child Cache

parents remember the partial state records their children reported for some number of rounds.use those previous values when new values are unavailable due to lost child messages.

Page 19: TAG: a Tiny Aggregation Service for Ad-Hoc Sensor Networks Paper By : Samuel Madden, Michael J. Franklin, Joseph Hellerstein, and Wei Hong Instructor :

References