Table of Contents
Fetching ...

RASC: Enhancing Observability & Programmability in Smart Spaces

Anna Karanika, Kai-Siang Wang, Han-Ting Liang, Shalni Sundram, Indranil Gupta

TL;DR

RASC reframes IoT device actions as long-running processes requiring observability and expressivity beyond traditional RPCs. By introducing a forward-compatible abstraction and building Rascal atop existing RPCs, the approach provides progress updates at Ack, Start, and Complete, enabling accurate completion prediction, fast failure detection, and dynamic scheduling of dependent actions. The system supports rich intra- and inter-action dependencies via DAG-based routines and two rescheduling policies (STF and RV) to maintain Safety and Serial Equivalence under variable action lengths. Evaluations on Home Assistant show Rascal detects completion within $2$–$13$ RPCs and $2$–$16$ seconds for 90% of cases, and routine scheduling outperforms state-of-the-art by $10 ext{-}55\\%$, with substantial polling efficiency improvements. These results demonstrate practical, deployable gains for observability and programmability in large-scale smart spaces.

Abstract

While RPCs form the bedrock of systems stacks, we posit that IoT device collections in smart spaces like homes, warehouses, and office buildings--which are all "user-facing"--require a more expressive abstraction. Orthogonal to prior work, which improved the reliability of IoT communication, our work focuses on improving the observability and programmability of IoT actions. We present the RASC (Request-Acknowledge-Start-Complete) abstraction, which provides acknowledgments at critical points after an IoT device action is initiated. RASC is a better fit for IoT actions, which naturally vary in length spatially (across devices) and temporally (across time, for a given device). RASC also enables the design of several new features: predicting action completion times accurately, detecting failures of actions faster, allowing fine-grained dependencies in programming, and scheduling. RASC is intended to be implemented atop today's available RPC mechanisms, rather than as a replacement. We integrated RASC into a popular and open-source IoT framework called Home Assistant. Our trace-driven evaluation finds that RASC meets latency SLOs, especially for long actions that last O(mins), which are common in smart spaces. Our scheduling policies for home automations (e.g., routines) outperform state-of-the-art counterparts by 10%-55%.

RASC: Enhancing Observability & Programmability in Smart Spaces

TL;DR

RASC reframes IoT device actions as long-running processes requiring observability and expressivity beyond traditional RPCs. By introducing a forward-compatible abstraction and building Rascal atop existing RPCs, the approach provides progress updates at Ack, Start, and Complete, enabling accurate completion prediction, fast failure detection, and dynamic scheduling of dependent actions. The system supports rich intra- and inter-action dependencies via DAG-based routines and two rescheduling policies (STF and RV) to maintain Safety and Serial Equivalence under variable action lengths. Evaluations on Home Assistant show Rascal detects completion within RPCs and seconds for 90% of cases, and routine scheduling outperforms state-of-the-art by , with substantial polling efficiency improvements. These results demonstrate practical, deployable gains for observability and programmability in large-scale smart spaces.

Abstract

While RPCs form the bedrock of systems stacks, we posit that IoT device collections in smart spaces like homes, warehouses, and office buildings--which are all "user-facing"--require a more expressive abstraction. Orthogonal to prior work, which improved the reliability of IoT communication, our work focuses on improving the observability and programmability of IoT actions. We present the RASC (Request-Acknowledge-Start-Complete) abstraction, which provides acknowledgments at critical points after an IoT device action is initiated. RASC is a better fit for IoT actions, which naturally vary in length spatially (across devices) and temporally (across time, for a given device). RASC also enables the design of several new features: predicting action completion times accurately, detecting failures of actions faster, allowing fine-grained dependencies in programming, and scheduling. RASC is intended to be implemented atop today's available RPC mechanisms, rather than as a replacement. We integrated RASC into a popular and open-source IoT framework called Home Assistant. Our trace-driven evaluation finds that RASC meets latency SLOs, especially for long actions that last O(mins), which are common in smart spaces. Our scheduling policies for home automations (e.g., routines) outperform state-of-the-art counterparts by 10%-55%.
Paper Structure (22 sections, 4 theorems, 11 equations, 19 figures, 3 tables, 2 algorithms)

This paper contains 22 sections, 4 theorems, 11 equations, 19 figures, 3 tables, 2 algorithms.

Key Result

Theorem 1

Given a time distribution $p(t)$ on $(0,U]$, a poll budget $k$, and a terminal tolerance $\varepsilon>0$, polls $0<{L_1^{\!*}}<\cdots<L_{k-1}^{\!*}<L_k^{\!*}$ that minimize expected detection time$Q$ and satisfy $\lvert L_k^{\!*}-U\rvert\le\varepsilon$ are given by the following recurrent relation:

Figures (19)

  • Figure 1: IoT actions vary in length. Actions: door: close, elevator: up 1 floor, shade: open, thermostat: heat 68.x to 69.y ° Fahrenheit.
  • Figure 2: Routine example with dependencies on Acknowledgment (A), Start (S) and Completion (C) among actions. The vacuum requires light to navigate.
  • Figure 3: Routine with exception handling. Garage door opens, automatic trash can smartcan_protolabs goes out, garage door closes. Letter inside arrow indicates trigger event: S=Start, C=Complete, F=Failure.
  • Figure 4: RASC over RPCs. Frequent RPCs on right are polls.
  • Figure 5: Communication between a smart device and a client app. Each arrowed line is an RPC in today's stacks. This paper replaces dashed lines with the new RASC abstraction.
  • ...and 14 more figures

Theorems & Definitions (10)

  • Theorem 1: Adaptive Poll Placement with Fixed Budget $k$
  • proof : Proof Sketch (Full proof in Appendix \ref{['app:rasc-proofs']})
  • Theorem 2: Meeting a Detection Tolerance SLO-Condensed version
  • proof : Proof Sketch
  • Theorem 3: Action Safety
  • proof
  • Theorem 4: Serial Equivalence
  • proof
  • proof
  • proof