declarative sensor networks
DESCRIPTION
declarative sensor networks. with applications in landslide detection. David Chu Computer Science Division EECS Department UC Berkeley. iCAST/CMU/TRUST Joint Conference 9 January 2007. Leach's Storm Petrel. context. Sensor Networks 10’s – 100’s – 1000’s – 10,000’s. context. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/1.jpg)
declarativesensor networks
with applications inlandslide detection
David ChuComputer Science DivisionEECS DepartmentUC Berkeley
iCAST/CMU/TRUSTJoint Conference
9 January 2007
![Page 2: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/2.jpg)
context
Leach's Storm Petrel
Sensor Networks 10’s – 100’s – 1000’s – 10,000’s
![Page 3: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/3.jpg)
contextSensor Networks early experiences
![Page 4: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/4.jpg)
motivation
programming sensor networks is difficult!
building entire sensor systems is even harder!!
![Page 5: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/5.jpg)
inspiration
data management network design
s e n s o r n e t w o r k s
![Page 6: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/6.jpg)
inspiration : data management• declarative is widely used in data
management– relational databases– spreadsheets– abstract “what” from “how”
• (Sensor-Network-As-Database)
![Page 7: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/7.jpg)
inspiration : network design• declarative is new idea in networking
– compact– flexible– analyzable, optimizable– Internet Routing, Overlays built declaratively
• (the P2 project)
![Page 8: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/8.jpg)
inspiration
data management network design
s e n s o r n e t w o r k s
( DSN )
![Page 9: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/9.jpg)
what we did
• adapted declarative language
• built compiler & runtime for sensornets
• wrote declarative examples
![Page 10: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/10.jpg)
… from original Trickle paper … DSN specification
10x6 topology
30x2 topology
![Page 11: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/11.jpg)
agenda
1. language overview
2. declarative sensornet examples
3. system architecture
4. feasibility assessment
5. application to landslide detection
![Page 12: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/12.jpg)
brief language overview
Rule2:
Fact:
Rule1:
join don’t care
Built-ins:
implies
![Page 13: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/13.jpg)
a full example : tree
D
S
C
D
Z
C2
SC1
![Page 14: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/14.jpg)
and others…
geographic routing* tracking localization link estimator
*fallback routing not shown
![Page 15: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/15.jpg)
arch : compiler
Network support
Generated nesC code
store(…) :- prod(…), cons(…). … path(…) :- link(…), dest(…).…
Binary Image
Snlog Compiler/OptimizerSnlog
Program
GenericPredicateTemplate……
nesCTemplates
nesC Backend
Execution Planner
Snlog Frontend
nesC Compiler
Built-in Predicates
Type system
Database Operators
RuntimeComponents
RuntimeTemplate……
DSN Runtime Support
![Page 16: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/16.jpg)
arch : runtime
the network
Join Join Proj
tupleready
Join AggProj Sel
table(compiler generated)
builtin(user’s library)
database operators(compiler’s library)
push interfaces
pull interfaces
thread of control
event signal
Sel Ag Proj
… … …
… …
… …
runtimedaemon
mac daemon
tupleready
tuplereadysendready
tupleready sendready
![Page 17: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/17.jpg)
implementation challenges• predictable execution
→ dynamic vs. static allocation
• memory constraints→ memory footprint optimizations
no temporary tables, join/agg operator choice
• asynchrony→ rule-level atomicity
priorities
![Page 18: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/18.jpg)
evaluation
![Page 19: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/19.jpg)
evaluating tree-collection
messages sent
hop-counts
(similar performance)
![Page 20: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/20.jpg)
lines of code
![Page 21: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/21.jpg)
compiled size
TelosB mote code space = 48KB, data space = 10KB
![Page 22: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/22.jpg)
VLDB 2006 demo
![Page 23: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/23.jpg)
application
large scale and fine-graineddebris flow monitoring
![Page 24: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/24.jpg)
[Left] La Conchita, California – a small seaside community along Highway 101 south of Santa Barbara. This landslide and debris flow occurred in the spring of 1995. A reoccurrence in 2005 claimed 4 lives and resulted in 29 missing persons. [Right] Chehalis, Washington - landslides and debris flows during the winter storms of February 1996. Photographs by R.L. Schuster, U.S. Geological Survey.
![Page 25: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/25.jpg)
[Above] The locations of the 2005-2006 and 2006-2007 debris flow deployment sites.[Top Right] Smoke from the Day Fire. [Middle Right] Recently burned hillside in Burbank, CA was the site of two debris flows in 2005-2006 Winter season. [Bottom Right] Base of the channel after debris flow with remaining sediment. [Bottom Left] Burn-resilient vegetation is quickly recovering just a few months after the fires and debris flows.
Harvard Burn Site
Day Fire
![Page 26: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/26.jpg)
[Above] Parshall flume used in conjunction with water level logger at the channel’s choke-point. [Top Right] Custom overland flow sensor for fine-grained detection of water runoff. [Bottom Right] Solar-powered base station for actuating and gathering data from the wireless sensor network, shown here connected to laptop during testing.
![Page 27: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/27.jpg)
conclusion
• sensor networks→ data + communication
• several examples of functional programs
• feasible for today’s hardware platforms
• preparing for landslide deployment
![Page 28: declarative sensor networks](https://reader036.vdocuments.net/reader036/viewer/2022062518/568141c8550346895dada20e/html5/thumbnails/28.jpg)
thanks
collaborators
Joe Hellerstein, Scott Shenker, Ion Stoica
Arsalan Tavakoli, Lucian Popa
Tsung-Te Lai
Phil Levis, Jung Woo Lee, Aby John
Daniel Malmon