Abstract
Stream processing applications are long-running entities that must adapt to unpredictable runtime environments, including hardware failures and fluctuating data rates. Traditional methods of adaptation—external scripts or embedded control logic—often lead to unmaintainable or "polluted" codebases. This paper introduces an orchestration framework for IBM's System S that separates runtime adaptation policies from core data processing logic. The framework provides a runtime daemon (ORCA Service) and a user-defined logic component (ORCA Logic) to enable reusable, self-managing streaming applications.
Introduction
Unlike batch processing, stream processing applications function as continuous queries. Over their lifetime, they encounter various disruptions such as load spikes, process crashes, or shifts in data distribution. Historically, developers managed these through ad-hoc external scripts or by embedding infrastructure management code directly into the data flow graph. Both approaches hinder maintainability and reuse. This paper proposes a first-class orchestration component to decouple application-specific management policies from the primary data processing logic.
The ORCA Framework
The proposed framework, built on IBM’s System S, consists of two primary components: the ORCA Service and ORCA Logic. The ORCA Service is a runtime daemon that monitors the streaming infrastructure and maintains a logical representation of the application graph. It provides APIs for event handling and actuation, such as starting or stopping jobs. The ORCA Logic consists of user-defined C++ code that implements specific adaptation policies.
To operate effectively in distributed environments, the framework utilizes flexible event scopes and rich event contexts. This allows developers to register for events based on logical application views rather than physical process IDs.
Bridging the Logical-Physical Gap
A significant challenge in managing distributed streaming applications is the mismatch between the logical application graph and its physical deployment. A single logical "composite operator" may be distributed across multiple physical Processing Elements (PEs) on different host machines.
The orchestrator addresses this by automatically translating physical system events (e.g., a process crash) into logical application context. This separation of concerns ensures that both data processing code and management policies remain modular and reusable.
Evaluation and Results
The framework was evaluated using real-world scenarios including Twitter sentiment analysis, financial trend calculation, and multi-platform social media profiling.
- Adaptation to Data Shifts: In a Twitter sentiment application, the orchestrator detected when "unknown" cause ratios exceeded a threshold of 1.0, automatically triggering a Hadoop batch job to update models and stabilize the system.
- Rapid Failover: For a financial application with hot backups, the orchestrator promoted a backup instance immediately upon detecting a failure in the active process, minimizing downtime.
- Dynamic Composition: In a social media profiling app, the orchestrator dynamically spawned downstream correlation applications as new user profiles were discovered (e.g., after 1,500 new profiles), effectively managing resource allocation through "streaming garbage collection."
Conclusion
The ORCA framework demonstrates that decoupling adaptation logic from data flow significantly improves the manageability of streaming applications. Future work includes enhancing orchestrator fault tolerance, supporting dynamic registration of new applications, and integrating these abstractions directly into the Streams Processing Language (SPL).
Summary updated