Introduction
Modern sensor networks have evolved beyond simple temperature monitoring to handle data-intensive streams such as high-frequency acoustics, vibration, and video. This shift presents a significant challenge for developers: how to efficiently distribute processing tasks between resource-constrained embedded nodes (motes, smartphones) and powerful backend servers.
Currently, developers face a "software nightmare" characterized by two primary hurdles. First, heterogeneity requires applications to run across diverse hardware with varying CPU and bandwidth capabilities. Second, decomposition—the decision of where to execute specific code segments—is notoriously difficult. Centralizing all raw data often exhausts bandwidth and energy, while localizing all processing may exceed the device's computational limits. Manual partitioning is tedious and must be repeated for every hardware or network change. Wishbone addresses these issues by automating the partitioning process, treating it as a profile-driven optimization problem.
System Design and Methodology
Wishbone utilizes WaveScript, a high-level stream-processing language, to allow developers to write applications as logical dataflow graphs. The system then automates the physical deployment through a three-step pipeline:
- Profiling: Unlike systems that rely on developer intuition, Wishbone measures performance by running each operator on the actual target hardware or a cycle-accurate simulator. This captures real-world CPU cycles and network bandwidth requirements, which are often highly platform-dependent.
- Optimization: The system models partitioning as an Integer Linear Program (ILP). It seeks to minimize a combination of network bandwidth and CPU load while respecting the hard resource limits of the hardware.
- Code Generation: Once the optimal "cut" is identified, the compiler generates the necessary glue code for network communication (marshalling/unmarshalling). Wishbone supports multiple backends, including ANSI C, JavaME, and TinyOS 2.0.
Optimization and Partitioning
The core of Wishbone is its ability to find the optimal trade-off between local computation and network transmission. By treating the data rate as a variable, the system can even recommend "load-shedding" strategies if an application cannot be sustained at full speed on the available hardware.
To keep the NP-hard ILP problem tractable for large graphs, Wishbone employs a preprocessing step to merge "data-expanding" operators. This allows the solver to handle complex applications with over 1,000 operators in mere seconds. Furthermore, to support the non-preemptive task model of TinyOS, the compiler uses a Continuation-Passing Style (CPS) conversion, ensuring that long-running operators do not starve the system of CPU time.
Evaluation and Key Results
The authors evaluated Wishbone using two complex, real-world applications: a 22-channel EEG Seizure Onset Detection system (1,412 operators) and an Acoustic Speech Detection pipeline. Testing spanned several platforms, including TMote Sky motes, Nokia N80 smartphones, and the iPhone.
- Performance Gains: In the speech detection application, Wishbone identified a partition that provided 20x more successful data throughput than the worst-case manual partition on a TMote Sky.
- Scalability: For the massive EEG application, the ILP solver consistently found optimal solutions in under 90 seconds, with the majority of runs finishing in less than 10 seconds.
- Platform Sensitivity: The system demonstrated that the optimal "cut point" varies significantly by device. For instance, the iPhone's native C execution allowed it to handle much more of the MFCC pipeline locally compared to the Nokia N80, which was limited by Java Virtual Machine overhead.
Conclusion and Future Work
Wishbone demonstrates that automated, profile-based partitioning can significantly outperform manual efforts while simplifying the development of heterogeneous sensornet applications. However, the current system has limitations: it is restricted to unidirectional data flow (node to server), relies on static compile-time decisions, and requires static memory allocation for TinyOS backends.
Future research directions include extending the model to support multi-tier networks (e.g., mote to microserver to cloud), enabling in-network aggregation, and developing dynamic partitioning strategies that can adapt to real-time changes in network congestion or CPU availability.
Summary updated