Enabling Context-awareness by Predicate Detection in Asynchronous Pervasive Computing Environments

Yiling Yang, Yu Huang, Xiaoxing Ma, Jian LuarXiv 2013

Introduction: The Challenge of Asynchrony

In pervasive computing, we rely on "C3S" devices (Computation, Communication, Control, and Sensing), such as mobile robots or smartphones. For these devices to be "context-aware," they need to understand not just individual sensor readings, but the collective state of the entire system.

The primary challenge in these environments is asynchrony. In real-world deployments, there is no perfectly synchronized global clock. Network congestion, unpredictable computation delays, and wireless interference mean that sensor data from different sources arrives at different times and often out of order. Traditional physical clock synchronization is often too energy-intensive or inaccurate for these scenarios, leading to "glitches" in how the system perceives its environment. This paper introduces the PD-CA (Predicate-Detection-based Context-Awareness) framework to address these issues.

Methodology: Logical Time and Predicate Detection

The PD-CA framework shifts the focus from when something happened (physical time) to the causal order of events (logical time). By using logical vector clocks to track the "happen-before" relationship between events, the system can construct a consistent global snapshot even with late-arriving data.

Space-time diagram and lattice of snapshots for predicate detection.

Developers define the "context" they care about using formal predicates:

  • Snapshot Predicates: Conditions that hold true at a single point in time (e.g., "Are all robots currently in Workshop A?").
  • Sequence Predicates: Patterns of behavior over time (e.g., "Did the robots pass through the gateway one-by-one in the correct order?").

The MIPA Middleware

The authors implemented this framework as the Middleware Infrastructure for Predicate detection in Asynchronous environments (MIPA). MIPA acts as a buffer, collecting local sensor data, filtering it through an Event-Condition-Action (ECA) mechanism, and running incremental detection algorithms.

The MIPA middleware architecture and separation of concerns.

A key feature of MIPA is the Separation of Concerns. Application developers do not need to write complex code to handle network jitter or out-of-order messages; they simply define the predicate (the what) and let the middleware handle the detection (the how).

Experimental Evaluation

The paper evaluates the system using a simulated Chemical Plant Safety Management Scenario involving a group of 3 to 40 mobile robots patrolling a plant. Sensor data (temperature, gas levels) was simulated using a Poisson distribution, and communication delays were modeled with an average of 10ms.

Key Results

  • Efficiency: For simple conjunctive predicates (AND conditions), the memory cost was low—detecting 1,000 predicates across 40 robots required only about 225 MB on the server.
  • Latency: Response latency for these simple predicates remained under 30 microseconds, ensuring near-instant reaction once data is received.
  • Complexity Trade-offs: Detecting complex "Regular Expression" predicates (sequences) is computationally harder. While it worked well for small groups (3-5 robots), latency increased significantly (over 600ms) when scaling to more devices.

Conclusion and Future Work

PD-CA demonstrates that logical time is often more important and achievable than physical time in distributed sensing. While the current framework provides a robust foundation, future work will focus on improving fault tolerance for device crashes, integrating hybrid time models that combine logical and physical time, and optimizing the scalability of complex behavioral pattern detection.

Summary updated

BibTeX
@misc{yang2013enabling,
  author = {Yiling Yang and Yu Huang and Xiaoxing Ma and Jian Lu},
  title = {{Enabling Context-awareness by Predicate Detection in Asynchronous Pervasive Computing Environments}},
  year = {2013},
  eprint = {1310.3623},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1310.3623},
}
Figure