Authors: Tom Diethe, Meelis Kull, Niall Twomey, Kacper Sokol, Hao Song, Miquel Perelló-Nieto, Emma Tonkin, Peter Flach
Introduction
HyperStream is a Python-based workflow engine specifically designed to manage large-scale streaming data and complex machine learning pipelines. It bridges the gap between traditional batch-oriented workflow managers and real-time stream processing, offering a "compute-on-request" architecture that is lightweight enough for edge devices like IoT gateways. As the Internet of Things (IoT) continues to expand, the need for efficient, high-level abstractions to manage continuous data streams has become paramount.
The Streaming Challenge
Scientific workflow systems, such as Kepler or Taverna, are excellent for sharing and reusing complex computational steps, but they are generally designed for "offline" batch processing. Conversely, many modern stream processing solutions, like Apache Spark Streaming, focus on high-throughput data ingestion but often lack the high-level abstractions needed to manage complex, nested workflows or data provenance.
The authors identify a growing need for a tool that can handle "sequential predictive problems"—tasks where data arrives continuously and requires complex fusion, nesting, and prediction. Crucially, this tool needs to operate efficiently in resource-constrained environments, such as IoT gateways, where a full-blown big data cluster is not a viable option.
Architecture and Methods
HyperStream introduces a two-layer architecture to manage streaming complexity while maintaining computational efficiency.
The Stream Layer
This is the low-level execution environment consisting of streams (sequences of documents) and tools (computational elements). Tools are agnostic to where data lives, interacting with it through "Channels" (e.g., memory, MongoDB, or local files). This abstraction allows for flexible data handling across different storage backends.
The Workflow Layer
This layer provides high-level abstractions inspired by factor graph notation, allowing for the definition of complex computational graphs:
- Nodes: Collections of streams sharing metadata.
- Factors: Implementations of tools that define the relationship between source and sink nodes.
- Plates: Perhaps the most powerful feature, plates act like "for loops" over the computational graph. They allow the same logic to be applied across different categories, such as different sensors, rooms, or even entire houses.
The engine follows a "compute-on-request" philosophy. It only executes computations when a result is explicitly needed, and it stores the history of these computations to prevent redundant work and ensure full data provenance.
Real-World Application: The SPHERE Project
The primary real-world application discussed is the SPHERE Project (Sensor Platform for HEalthcare in a Residential Environment). This project involves deploying heterogeneous sensors (wearables, environmental sensors, etc.) into up to 100 homes for long-term health monitoring. The dataset consists of high-frequency sequential data that requires real-time processing at the "edge" (inside the home) and aggregate "meta-summaries" on a centralized server.
As shown in Figure 2, HyperStream successfully manages a pipeline that takes raw sensor data, splits it by wearable ID (using nested plates), applies sliding window transformations to calculate arm angles, and ultimately produces inactivity estimates used for sleep prediction. This demonstrates the engine's ability to handle complex, multi-level data fusion in a live environment.
Key Insights and Innovations
- Factor Graph Inspiration: Borrowing the concept of "plates" from probabilistic graphical models is a clever way to handle the hierarchical nature of IoT data. It allows developers to define a workflow once and automatically scale it across hundreds of individual data sources.
- Online/Offline Symmetry: HyperStream allows the exact same workflow to run in "online" mode (processing data as it arrives) and "offline" mode (re-processing historical data). This is vital for training ML models on historical data and then deploying them to live streams without rewriting code.
- Minimalist Requirements: By depending on a small set of requirements and using MongoDB for persistence, HyperStream can run on a simple Intel NUC or similar mini-PC, making it ideal for "Fog computing" scenarios where processing happens close to the data source.
Limitations and Future Work
While HyperStream offers a robust solution for edge-based streaming workflows, it currently has a heavy dependency on MongoDB for system configuration and persistence. Future development aims to extend the engine to support full "continual learning," where models update themselves continuously as new data arrives. As an open-source project released under the MIT License, its long-term success depends on building a broader contributor base beyond the original SPHERE team.
Summary updated