Timezone Synchronizer for Continuous Message Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In continuous processing systems, parallel message processing can lead to unpredictable and repeatable output results due to primitives with potential for substantial delay, causing messages to be processed out of order, especially when multiple messages with different timestamps are processed simultaneously.
Innovation Solution
The system introduces 'timezones' in the execution graph, where messages with the same timestamp are processed together, and synchronizers control the flow to ensure that messages enter these timezones synchronously, allowing parallel processing outside timezones while maintaining serial processing within them to prevent message order issues.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If parallel processing is used to improve efficiency, then processing speed increases, but message order cannot be guaranteed due to primitives with substantial delay
Solution Approach 1:
The execution graph is segmented into timezones, where each timezone is a subgraph that processes messages with the same timestamp. This segmentation allows parallel processing across different timezones while maintaining serial processing within each timezone, thus preserving message order guarantees despite parallel execution.
Solution Approach 2:
Synchronizer primitives are introduced as intermediaries at the boundaries of timezones. These synchronizers coordinate message flow between timezones, ensuring that messages are processed in the correct order across parallel processing boundaries while still enabling overall parallel execution.
2Reliability
If serial processing is used to maintain message order, then output results are predictable and repeatable, but processing efficiency decreases
Solution Approach 1:
The execution graph is divided into multiple timezones, each handling a specific timestamp range. This segmentation enables serial processing within each timezone (ensuring predictability) while allowing parallel execution of multiple timezones (improving efficiency).
Solution Approach 2:
The system dynamically determines the number and boundaries of timezones based on the execution graph structure and primitive delay characteristics. This dynamic adaptation allows the system to optimize the balance between serial processing (for reliability) and parallel processing (for efficiency) based on actual runtime conditions.
3Productivity
If primitives with substantial delay are allowed to process multiple messages concurrently, then processing throughput increases, but messages are processed out of order
Solution Approach 1:
Messages are segmented by timestamp into different timezones. Primitives with substantial delay process messages within their assigned timezone (maintaining accuracy) while multiple timezones can be processed in parallel (increasing throughput).
Solution Approach 2:
The system performs preliminary analysis of the execution graph to identify primitives with substantial delay and determines appropriate timezone boundaries before execution. This preliminary action ensures that messages are correctly grouped by timestamp, preventing out-of-order processing while enabling parallel throughput.
Data Source
AI summary
A system and method to synchronize the processing of messages in areas of an execution graph affected by primitives with potential for substantial delay is provided. A continuous processing system identifies primitives with potential for substantial delay. For each potentially-delayed primitive that is not in a loop, the continuous processing system creates a “timezone” downstream of such primitive. The output(s) of the potentially-delayed primitive is an input to the timezone. The continuous processing system then identifies all other inputs to the timezone and places a synchronizer across such inputs. In cases where the potentially-delayed primitive is within a loop, the timezone includes such primitive, as well all primitives downstream of such primitive.


