Matching Engine Rollover Using Sequenced Loopback Expiration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing end-of-interval rollover operations in computer systems, such as those in financial exchanges, cause program execution to pause, leading to inefficient processing of incoming orders and potential data loss due to faults, especially in continuous markets like spot foreign exchange (FX).
Innovation Solution
Implementing a computer system with a sequencer and multiple matching engine instances that perform non-blocking, pauseless end-of-interval rollovers with fault tolerance by using deterministic programming and lazy order removal, along with throttled loopback messaging and snapshot generation to ensure seamless order processing during rollovers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If end-of-interval rollover operations are performed by suspending program execution, then bookkeeping tasks can be performed with simplified implementation, but program throughput deteriorates because the program is unable to continue execution
Solution Approach 1:
The system divides the matching engine into multiple independent instances (first instance, second instance, third instance) that can operate concurrently. The rollover operation is segmented across these instances, with each instance handling specific order book data independently. This allows bookkeeping tasks to be performed on one instance while other instances continue processing incoming orders, thus maintaining program throughput while enabling simplified rollover implementation.
Solution Approach 2:
The system performs preliminary actions by creating checkpoint snapshots of order book data before rollover operations begin. The sequencer receives rollover indication messages and triggers snapshot creation in advance. This preliminary snapshotting allows the system to prepare for rollover without suspending execution, as the state is already captured and can be restored or rolled forward without blocking incoming order processing.
2Stability of the object's composition
If traditional rollover operations suspend processing to remove expired orders and create checkpoints, then data consistency is maintained, but faults can lead to service and data loss due to the blocking nature of these operations
Solution Approach 1:
The system creates checkpoint snapshots as a preliminary action before rollover operations complete. These snapshots capture the state of order books at specific points in time, providing recovery points if faults occur during rollover. The sequencer coordinates snapshot creation across multiple instances, ensuring data consistency while maintaining the ability to recover from faults without service interruption.
Solution Approach 2:
The system implements fault tolerance by having multiple matching engine instances running in parallel with redundant capacity. If a fault occurs in one instance during rollover, other instances can continue processing or take over. The sequencer and snapshot mechanism provide a cushion against data loss by maintaining multiple copies of order book state, allowing recovery without service interruption.
3Productivity
If multiple matching engine instances are used with the sequencer to enable parallel processing during rollover, then program throughput is improved, but device complexity increases due to coordination requirements
Solution Approach 1:
The sequencer serves as an intermediary that coordinates between multiple matching engine instances and the external environment. It receives incoming order messages, determines which instance should process them based on current rollover state, and routes messages appropriately. This centralized coordination simplifies the complexity by providing a single point of control rather than requiring complex peer-to-peer coordination between instances.
Solution Approach 2:
The system performs preliminary routing decisions by having the sequencer determine instance assignments before rollover operations complete. Snapshot metadata is prepared in advance to indicate which instances have current data. This preliminary preparation reduces coordination complexity during actual rollover, as the system can switch between pre-prepared snapshots rather than coordinating real-time data synchronization.
4Stability of the object's composition
If eager removal of expired orders is performed during rollover, then data consistency is improved, but program execution is blocked during the removal process
Solution Approach 1:
The system performs preliminary identification of expired orders through snapshot comparison before actual removal. The sequencer compares current orders against snapshot data to identify which orders have expired, preparing a removal list in advance. This preliminary identification allows incoming orders to continue being processed while the actual removal operation is scheduled and executed without blocking execution flow.
Solution Approach 2:
The removal operation is segmented across multiple matching engine instances rather than performed monolithically. Each instance independently removes expired orders from its own order book based on snapshot data. This segmentation allows removal to proceed in parallel across instances without blocking the entire system, maintaining consistency while minimizing execution pause time.
Data Source
AI summary
Systems and methods of pauseless end-of-interval rollovers are described to provide rollover processing with fault tolerance. A system may execute first and second instances of a matching engine for fault tolerance. Each instance by design is deterministically programmed to perform paused end-of-interval (EOI) rollover processing in which orders may be received without blocking by transmitting loopback messages that indicate to-be-expired messages. The sequencer may sequence the loopback messages along with new order messages. Each instance may continue to receive sequenced messages, which may include loopback messages it or the other instance sent, and expire the order corresponding to the loopback message or the counterpart loopback message, wherein expiration of the order occurs on both the first instance and the second instance without blocking new messages from the sequencer.


