A Framework and DSL for Distributed, Energy-constrained, and Time-sensitive Applications
Large-scale applications in IoT face numerous technical problems not found in other standard computing domains. Applications are Distributed, Energy-constrained, and Time-sensitive. To address these, we propose a Domain Specific Language (DSL) and infrastructure to interface with distributed, low-power IoT devices and cloud computing. Our DSL compiles to a dataflow graph to maximize flexibility of the distribution of code to optimize for energy and time requirements of the program. Using a globally defined context to determine which token inputs to use when executing the program is energy-inefficient when program execution occurs between devices across the network. Instead, we adopt a decentralized approach of using timestamp intervals generated locally by the device’s internal hardware clock. We explore how dataflow graph semantics change due to timestamp contexts and how to merge different data streams from distributed, imprecise clocks. We also provide additional support for control-flow concepts such as failure handling, which is non-standard in a dataflow graph.
We encapsulate this system with a DSL to abstract low-level concerns by providing high-level timing constructs as well as tierless and macroprogramming features. The programmer writes a single program that is split across IoT devices in the network. The DSL’s tierless and macroprogramming nature complement the dataflow architecture and allow reasoning of heterogeneous-hardware applications. Its timing constructs are expressed in a globally-timed event model, which allow programmers to abstractly reason about timing requirements of their applications without worrying about the difficulties of synchronization between distributed devices. Programmers specify timing by defining events in the program. Timing requirements are specified by event comparisons, which take two events and specify the required time window or deadline necessary to complete an action. We also show translations of these constructs to our timed dataflow graph model.