Distributed Transaction Processing via Thread Partitioning
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional transaction processing systems face challenges in achieving high-speed processing rates, particularly in distributed environments like stock exchange and betting systems, where they struggle to handle the required processing rates efficiently.
Innovation Solution
A method and apparatus for transaction processing in a distributed system with multiple nodes, where data is partitioned across controllers with write stages and a thread manager allocates a single thread for each data partition, allowing messages to be processed when available, and messages are queued if no thread is available, enabling asynchronous messaging and batching to optimize throughput and latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional transaction processing systems are used in distributed environments, then system simplicity is maintained, but processing rates are insufficient to meet high-speed requirements
Solution Approach 1:
The system segments data into multiple data partitions, with each partition associated with a specific node. This segmentation allows parallel processing across multiple nodes while maintaining data integrity and enabling the system to achieve high processing rates without proportionally increasing overall system complexity.
Solution Approach 2:
The patent introduces a multi-dimensional processing architecture with multiple controllers (first controller, second controller, etc.), each managing specific data partitions. This dimensional expansion from single-controller to multi-controller architecture enables parallel transaction processing, dramatically increasing processing rates while distributing complexity across manageable controller units.
2Productivity
If multiple threads are allocated to operate on the same data partition concurrently, then throughput is increased, but data consistency and reliability are compromised
Solution Approach 1:
The thread manager pre-allocates and manages a pool of threads, ensuring that at most a single thread is allocated for operating on data in a given data partition at any time. This preliminary thread management approach maintains data consistency by preventing concurrent modifications while still achieving high throughput through efficient thread utilization and message queuing.
Solution Approach 2:
The thread manager acts as an intermediary between message receivers and write stages, controlling thread allocation to data partitions. It ensures that only one thread operates on a given data partition at a time, maintaining reliability, while coordinating multiple controllers and write stages to achieve high overall throughput through parallel processing of different partitions.
3Loss of time
If messages are processed immediately upon receipt, then latency is reduced, but system reliability during failures is compromised
Solution Approach 1:
The system performs preliminary journaling of received messages before they are fully processed. This preliminary action records the message state in a recoverable format, enabling deterministic recovery if failures occur. The journaling mechanism preserves latency performance by not blocking immediate processing while ensuring reliability through pre-recorded state information.
Solution Approach 2:
The patent implements a message queuing mechanism with journaling that provides beforehand cushioning against failures. Messages are queued and journalized before processing, creating a safety buffer that allows the system to recover deterministically from failures without losing messages or compromising data integrity, while maintaining low latency through efficient queue management.
Data Source
AI summary
A method of transaction processing in a system comprising a plurality of distributed nodes, the method comprising the steps of receiving a message at a first node, the message defining an operation to be performed on data associated with an entity, queuing the message for processing by a message handler running on the node, permitting the message handler to process the message, in the event that no other message handler is operating on the data and forwarding the message to a second node for subsequent processing.


