Download presentation
Presentation is loading. Please wait.
Published byDenzel Lamport Modified over 9 years ago
1
Berkeley dsn declarative sensor networks problem David Chu, Lucian Popa, Arsalan Tavakoli, Joe Hellerstein approach related dsn architecture status B. T. Loo, et al.’s P2 and Declarative Networking Project TinyDB, SNACK, Mate, … Apps: Tracking, Trickle, Tree Collection, Dissemination Primary predicates: Timers, LEDs, Link Tables, Internal Temperature Evaluating against hand-tuned nesC and declarative TinyDB Adding more compiler optimizations to better use resources Thanks to: Phil Levis, Scott Shenker, Ion Stoica the central process of the sensor network is to manage the generation, transformation and movement of data; – use snlog, a deductive declarative query language, as the systems language for sensor networks. what is snlog? Benefits Concise & powerful description of the entire system stack Many additional benefits… (see “what is snlog” below) Questions Can we provide an energy- and resource-efficient runtime? Is it hard to program declaratively? 32 nd VLDB 12-15 September 2006 Seoul, Korea Example snlog App Combination of: rules (CL1) facts (CL2-CL4) queries (Query) Why snlog? Data manipulation is central to sensor networks Concise declarations for rapid development Type safety, yet very flexible. Spectrum of sensor network programming systems TinyDB + Easy to use + Safe - Lacks expressiveness nes C + Flexible - Dangerous - Global behavior unclear - Not amenable to global optimizations ? Can we simultaneously capture the benefits of both high & low level languages for building sensor network systems? CL1: store(@Y, Oid, Obj) :− produce(@X, Oid), consume(@Y, Oid), store(@X, Oid, Obj). Query: store(@Y, Oid, Obj). base application rules CL2: consume(@base, oid). CL3: produce(@node1, oid). CL4: produce(@node2, oid). collection facts CL2: produce(@base, oid). CL3: consume(@node1, oid). CL4: consume(@node2, oid). dissemination facts + ( ) or similar store() facts not shown VC: store(@X,Oid,Obj,V2) :- store(@X,Oid,Obj,V1), store(@Y,Oid,Obj,V2), V2 > V1, refreshEvent(@X), link(@X,Y,C). ALTERNATIVE: VC1: compare(@X,Y,Oid,V1,V2) :- refreshEvent(@X), link(@X,Y,C), version(@X,Oid,V1), version(@Y,Oid,V2). VC2: request(@X,Y,Oid,V1,V2) :- compare(@X,Y,Oid,V1,V2), V1<V2. VC3: response(@X,Y,Oid,V1,V2) :- compare(@X,Y,Oid,V1,V2), V1>V2. VC4: request(@Y,X,Oid,V2,V1) :- response(@X,Y,Oid,V1,V2). VC5: store(@Y,Oid,Obj,V2) :- request(@Y,X,Oid,V1,V2), store(@X,Oid,Obj,V2). VC6: version(@X,Oid,V1) :- store(@X,Oid,Obj,V1) Query: store(@X,Oid,Obj,V). TR1: path(@S,D,D,C) :- dest(D), link(@S,D,C). TR2: path(@S,D,Z,C) :- dest(D), link(@S,Z,C1), path(@Z,D,W,C2), C=C1+C2. TR3: shortestcost(@S,D,min ) :- path(@S,D,Z,C). TR4: nextHop(@S,D,Z,C) :- shortestcost(@S,D,C), path(@S,D,Z,C). TR5: dest(base). Query: nextHop(S,D,Z,C). runtime & libraries optimized system stack path(…) :- link(…), dest(…), … … store(…) :- prod(…), cons(…), … … binary image in-flight tuple snlog compiler/optimizer snlog program From declaration to runtime… the network Join Proj tupleready sendready Join Agg Proj Sel table (compiler generated) builtin (user’s library) database operators (compiler’s library) push interfaces pull interfaces thread of control event signal *#*# refer to note tupleready sendready Key systems challenges Memory vs. processor optimizations Runtime code/data size efficiency Execution plan representation routing tree protocol version coherency protocol More Examples SelAg Proj …… … …… … … runtime daemon mac daemon tupleready store() facts and 3 refreshEvent() rules not shown Asynchronous component communication model Heterogeneous network interoperability Systems layering and abstractions support Broadcast support, semantics and optimizations Declarative control of timinig, power management, etc. Distributed algorithms (networking, localization, tracking etc.) naturally deductive Independence from hardware platform changes Organized data storage (e.g. flash) is natural Straightforward support for events Easily add new sensors as predicates Amenable to cross-layer and cross-node optimizations
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.