Domain Model-Based Data Stream Validation for Internet of Things Applications

Simon Pizonka, Timo Kehrer, Matthias WeidlichMoDELS (Workshops) 2018

In the rapidly expanding Internet of Things (IoT) ecosystem, billions of devices generate continuous streams of data. Ensuring the quality and accuracy of this data is critical for downstream applications. However, traditional validation methods often rely on hard-coded logic that is difficult to maintain and scale. This paper, originally presented at MDE4IoT 2018, introduces a model-driven engineering (MDE) approach to automate data stream validation using a tool called VortoFlow.

The Challenge of IoT Data Quality

Validating data from diverse sensor networks is currently a "technical nightmare" for developers. To ensure a sensor is not transmitting erroneous data, developers typically write ad-hoc validation code, such as Java if-else blocks, to check if a value (e.g., temperature) falls within a specific range. This manual approach suffers from three primary flaws:

  1. Tedium: Writing individual checks for every property of every device type is highly repetitive.
  2. Brittleness: If sensor specifications change, the code must be manually updated and redeployed.
  3. Platform Dependency: Validation logic is often tightly coupled to specific stream-processing frameworks.

The VortoFlow Approach

To address these issues, the authors propose a declarative MDE approach. Instead of manual coding, developers create an "Information Model" of the device using the Vorto DSL (Domain-Specific Language). These models define "Function Blocks" with specific constraints, such as mandatory data types and minimum/maximum value ranges.

The VortoFlow system architecture integrates domain models with cloud-based data validation pipelines.

The core contribution is VortoFlow, a library that acts as a generic validation component. Unlike traditional MDE, which generates code from models, VortoFlow interprets the Vorto model at runtime. This allows the system to remain flexible; validation rules can be updated by changing the model without recompiling or redeploying the entire processing pipeline. VortoFlow is implemented within Apache Beam, enabling it to run across various engines like Spark, Flink, or Google Cloud Dataflow.

Evaluation and Results

The researchers evaluated VortoFlow using the Intel Lab Data, a historical dataset of 2.3 million readings from 54 sensor nodes. This dataset is particularly useful because it contains real-world errors caused by sensor malfunctions and low battery levels.

Error Detection (RQ1)

The system successfully identified physical impossibilities in the data. For instance, it flagged humidity readings that dropped below 0% as errors. However, because the current implementation is stateless, it missed certain anomalies—such as sudden temperature spikes—where the values remained within the broad "valid" range defined by the sensor's datasheet.

VortoFlow successfully identifies and flags out-of-bounds errors, such as negative humidity percentages, in the Intel Lab Data.

Scalability (RQ2)

Performance testing on Google Cloud Dataflow demonstrated that the system is viable for real-world use. It processed the 2.3 million elements in approximately 82 seconds, achieving a throughput of roughly 28,216 messages per second. While the validation step was the most computationally expensive part of the pipeline (taking roughly three times longer than reading or writing), the authors argue this is a reasonable trade-off for the automation and flexibility provided.

Limitations and Future Directions

While promising, the current VortoFlow prototype has limitations. Its stateless nature prevents it from detecting temporal anomalies, such as a temperature rising 50 degrees in a single second. Future work aims to incorporate sliding window validation to provide temporal context. Additionally, the authors plan to explore cross-device validation (e.g., correlating a blender's power state with smart meter readings) and incorporate more expressive constraint languages like OCL (Object Constraint Language) to handle complex validation logic.

Summary updated

BibTeX
@inproceedings{pizonka2018domain,
  author = {Simon Pizonka and Timo Kehrer and Matthias Weidlich},
  title = {{Domain Model-Based Data Stream Validation for Internet of Things Applications}},
  booktitle = {MoDELS (Workshops)},
  year = {2018},
  url = {https://openreview.net/forum?id=33ValAhWc1},
}

Loading related content...

Figure