1 Marionette: Using RPC for Development and Debugging of WSNs Kamin Whitehouse Joint with: Gilman Tolle, Jay Taneja, Cory Sharp, Sukun Kim, Jaein Jeong, Jonathan Hui, Prabal Dutta, David Culler UC Berkeley, Arched Rock & Moteiv
2 Motivation [Elson, et al. 2003]
3 Motivation TOSSIM: 150 nodes
4 Motivation Silhouette: 150 nodes
5 Motivation Squid: 12 nodes
6 Motivation Real deployment: 16 nodes 25 nodes 36 nodes 49 nodes
7 Motivation Applications can break at scale So do our development tools JTAG Leds Eavesdropping
8 Motivation Messaging abstraction can be cumbersome Define msg formats Define AM types Wire message interface Define message handlers with marshalling Similar handlers on PC More for structures, pointers, and arrays Must be redone when application changes
9 Marionette Demo
10 Implementation Download Import app to Python Python queries and commands nesC Application Poke/ Peek Embedded RPC Generate Code Executable Compile Sensor Node Program XML Extract Code Extract Symbols 13 bytes RAM 100 bytes program memory 94 bytes RAM 100 bytes program memory per function ~20 KB flash
11 Implementation Download Import app to Python Python queries and commands nesC Application Poke/ Peek Embedded RPC Executable Compile Sensor Node Program XML Extract Code Extract Symbols Large burden on PCSmall burden on userSmall burden on node: “fat-client / thin-server”
12 Marionette Rudimentary debugging Call functions Observe/change variables before/after function No break points, stepping, or watches Scripting Sequential code prototypes Remote calls only when necessary Distributed app runs on PC
13 Marionette PC Application Mote code PC Application Mote code
14 Evaluation Can reduce by hundreds of LOC Up to 75% reduction observed Two kinds of applications Data collection In-network data processing
15 Evaluation
16 Limitations Cannot handle events Cannot handle parameterized interfaces Cannot access abstract components High messaging cost for each function/variable Ok for development, asymptotically approaches desired efficiency for deployment
17 Thank you Marionette: Development and Debugging Kamin Whitehouse Joint with: Gilman Tolle, Jay Taneja, Cory Sharp, Sukun Kim, Jaein Jeong, Jonathan Hui, Prabal Dutta, David Culler UC Berkeley, Arched Rock & Moteiv For more info, see: ~/tinyos-1.x/tools/python
18 Implementation Low burden on node NDR is native type of RPC server No serialization/de-serialization on server Pointer arithmetic performed on server Poke/peek is 10 LOC on server Low burden on programmer No IDL; RPC interface defined by nesC code
19 Limitations