Sequenced Message Streams for ACID Distributed Transactions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Implementing ACID compliant transactions in distributed computing systems, particularly distributed databases, is challenging due to the complexity and inefficiencies of existing techniques like the Saga design pattern and Two-Phase Commit protocol.
Innovation Solution
A system with a sequencer that communicates an atomic message sequence to multiple service instances, each processing messages through a local queue and executing a state machine to manage distributed transactions, ensuring ACID compliance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the Saga design pattern or Two-Phase Commit protocol is used to implement ACID compliant transactions in distributed systems, then transaction consistency is ensured, but system complexity and processing overhead increase significantly
Solution Approach 1:
The patent introduces a sequencer as an intermediary component that receives transaction requests, assigns sequence numbers, and broadcasts ordered transaction logs to all service instances. This mediator simplifies the transaction coordination by centralizing the ordering logic, eliminating the need for complex two-phase commit protocols while maintaining ACID properties through sequential consistency.
Solution Approach 2:
The sequencer performs preliminary actions by pre-assigning sequence numbers to transaction logs before they are executed by service instances. This preliminary ordering of transactions ensures that all service instances process transactions in the same sequence without requiring complex coordination during execution, reducing processing overhead while maintaining consistency.
2Reliability
If distributed databases are implemented with multiple service instances for redundancy, then fault tolerance is improved, but message ordering and consistency across instances become more difficult to maintain
Solution Approach 1:
The sequencer serves multiple functions: it assigns sequence numbers, orders transaction logs, broadcasts messages to all service instances, and maintains a global transaction log. This universal component handles all ordering and coordination tasks centrally, allowing multiple service instances to maintain identical state without complex peer-to-peer coordination mechanisms.
Solution Approach 2:
All service instances are designed to be homogeneous, receiving the same ordered transaction logs from the sequencer and executing identical operations in the same sequence. This homogeneity ensures that regardless of how many instances exist or which fail, the surviving instances maintain consistent state without requiring complex reconciliation protocols.
3Reliability
If existing two-phase commit protocols are used for distributed transactions, then atomicity is ensured, but processing time and system performance deteriorate
Solution Approach 1:
The patent segments the transaction processing into independent, sequential operations where each service instance processes its assigned transactions independently according to the global sequence. This eliminates the need for synchronous two-phase commit coordination between instances, allowing parallel processing while maintaining atomicity through the sequential log execution model.
Solution Approach 2:
Each service instance autonomously processes transactions by reading from the ordered transaction log and executing operations locally without requiring coordination with other instances. The sequencer's pre-established message order ensures atomicity is maintained automatically, allowing service instances to operate independently and improve processing throughput.
Data Source
AI summary
A system for processing distributed transactions is provided. The system includes a sequencer that communicates an atomic message stream to multiple different service instances. The service instances each process the messages from the message stream into a local queue. Each service instance also executes a state machine by reading messages from a queue and transitioning between states in the state machine while also performing one or more operations in connection with performing a distributed transaction.


