TL;DR
Stream processing applications run continuously and must frequently adapt to changing conditions like hardware failures, load spikes, or data distribution shifts. This paper introduces an "orchestrator" framework for IBM's System S that cleanly separates runtime adaptation policies from core data processing logic, enabling developers to build reusable, self-managing streaming applications without resorting to brittle external scripts.
What Problem Does This Paper Address?
Unlike traditional batch jobs, stream processing applications are deployed as continuous queries that run indefinitely. Over time, these applications inevitably encounter runtime changes: input data rates surge, operating system processes crash, or the underlying data distribution shifts, requiring algorithmic adjustments.
Historically, developers have handled these adaptations in two ways, both of which are flawed:
- External Scripts: Writing ad-hoc shell or Python scripts that interact with the streaming infrastructure. These are hard to maintain, highly specific to a single deployment, and rarely reusable.
- Embedded Control Logic: Inserting special "control" operators directly into the data flow graph. This pollutes the core data processing logic with infrastructure management code, making the application difficult to read and reuse in different contexts.
The authors tackle this gap by proposing a first-class orchestration component that allows developers to write application-specific management policies that remain entirely decoupled from the data processing graph.
Methods
The authors built an orchestration framework on top of IBM’s System S (and its Streams Processing Language, SPL). The framework is divided into two main parts:
- ORCA Service: A runtime daemon that monitors the streaming infrastructure, maintains an in-memory representation of the application graph, and provides APIs for event handling and actuation (e.g., starting/stopping jobs).
- ORCA Logic: User-defined C++ code that specifies the actual adaptation policies (e.g., "if this metric spikes, restart that operator").
To make this work in a distributed environment, the framework relies on three key concepts:
- Flexible Event Scopes: Developers can register for specific events (like process failures or metric thresholds) using filters based on the logical application view, rather than worrying about physical process IDs.
- Rich Event Context: When an event occurs, the ORCA service delivers it with a "context" payload. This payload bridges the gap between the logical graph (how the developer wrote the app) and the physical deployment (how the compiler distributed it across host machines), allowing the logic to make informed decisions.
- Application Sets and Dependencies: The orchestrator can manage multiple interconnected streaming applications. Developers can define dependency graphs and "garbage collection" timeouts, allowing the orchestrator to automatically spin up or tear down sub-applications on demand.
Datasets
Because this is a systems architecture paper rather than a machine learning or benchmarking study, standard datasets were not used. Instead, the authors evaluated their framework using live and synthetic data streams tailored to three real-world scenarios:
- Twitter feeds for a sentiment analysis application.
- Stock market streams for a financial "Trend Calculator."
- Multi-platform social media streams (Twitter, Facebook, MySpace, Blogs) for a dynamic user-profiling application.
Key Insights and Ideas
- Separation of Concerns is Crucial for Streaming: By pulling adaptation logic out of the data flow graph and into a dedicated orchestrator, both the data processing code and the management policies become highly reusable across different projects.
- The Logical vs. Physical Mismatch: A major hurdle in managing distributed streaming apps is that a single logical "composite operator" might be split across multiple physical OS processes (Processing Elements, or PEs) on different host machines. An effective orchestrator must automatically translate physical system events (e.g., "Process 1234 crashed") into logical application context (e.g., "The Join operator failed").
- Streaming Garbage Collection: Treating streaming applications as modular, dependent components that can be automatically submitted when needed—and canceled when idle—prevents resource starvation and allows complex topologies to scale dynamically.
Key Results
The authors demonstrated the orchestrator's effectiveness across three distinct use cases:
- Adaptation to Data Shifts: A Twitter sentiment app was configured to track the ratio of complaints with "unknown" causes versus "known" causes. When a new issue emerged (e.g., iPhone antenna complaints) and the unknown ratio surpassed a threshold of 1.0, the orchestrator automatically paused to spin up a Hadoop batch job, recomputed the cause models, and refreshed the streaming app's internal state to stabilize the system.
- Rapid Failover: A financial trend calculator was deployed with one active instance and two hot backups. When the authors intentionally crashed the active process, the orchestrator instantly detected the failure, promoted the oldest backup to active status, and restarted the failed node, minimizing downtime and preventing data loss.
- Dynamic Composition: A social media profiling app was set up to scale on demand. Once the orchestrator detected that 1,500 new user profiles had been discovered by upstream ingest applications, it automatically spawned new downstream correlation applications to analyze them, tearing them down once the data was processed.
Limitations and Future Work
- Orchestrator Fault Tolerance: Currently, the orchestrator itself is a single point of failure. The authors plan to make it fault-tolerant by adding transaction IDs to delivered events, enabling reliable event delivery and actuation replay if the orchestrator crashes.
- Dynamic Registration: The current implementation requires applications to be known when the orchestrator starts. Future work will allow developers to dynamically add newly developed applications to a running orchestrator.
- Language Integration: While currently implemented as a C++ API, the authors intend to elevate these orchestration concepts into native abstractions within the Streams Processing Language (SPL) itself.
Summary updated