Distributed Database Transaction Execution via Optimistic Concurrency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Executing transactions in distributed databases that maintain ACID properties while providing effective performance is challenging, especially since NoSQL databases do not use declarative query languages to represent transaction statements of arbitrary complexity.
Innovation Solution
A distributed database system executes transactions at a query server, using optimistic concurrency control to concurrently execute transactions without locking processes, and maintains delta tables and transaction logs to manage modifications and rollbacks, ensuring ACID properties and preventing conflicts.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If distributed databases use locking mechanisms to maintain ACID properties, then transaction reliability is improved, but system performance and concurrency deteriorate
Solution Approach 1:
The patent inverts the traditional locking approach by using optimistic concurrency control instead of pessimistic locking. Rather than preventing conflicts before they occur through locks, the system allows transactions to proceed freely and resolves conflicts only when conflicts are detected during commit validation, thereby maintaining ACID properties without degrading performance.
Solution Approach 2:
The system implements self-service conflict resolution where the database automatically detects and handles transaction conflicts through validation logic during the commit process. The conflict detection and resolution mechanisms are embedded within the transaction commit flow, eliminating the need for external locking coordination and improving system concurrency.
2Adaptability or versatility
If distributed databases support arbitrarily complex transaction statements, then transaction versatility is improved, but system complexity deteriorates
Solution Approach 1:
The patent introduces an intermediary validation layer that handles complex transaction logic. The validation logic acts as a mediator between the transaction statements and the underlying distributed database operations, abstracting away the complexity of conflict detection and resolution while supporting arbitrarily complex transaction statements through a unified validation interface.
Solution Approach 2:
The system segments transaction processing into distinct phases: execution phase where complex statements are processed freely, and validation phase where ACID properties are verified. This segmentation allows the system to support versatile transaction statements without increasing overall system complexity, as the complex validation logic is isolated to a specific phase.
3Reliability
If distributed databases perform commit validation to prevent conflicts, then transaction consistency is improved, but execution time deteriorates
Solution Approach 1:
The patent applies preliminary action by performing conflict detection and validation during the transaction execution phase rather than waiting until commit time. The system proactively identifies potential conflicts and prepares validation data during statement execution, so that the actual commit operation can proceed quickly with minimal additional validation overhead.
Data Source
AI summary
A distributed database system receives and executes a transaction including a first modification statement describing a first modification operation on a subset of records, a second modification statement describing a second modification operation on the subset of records, and a commit statement. Responsive to executing the first and second modification statements, the system receives a copy of the subset of records from data servers; performs the first modification operation to generate a first modified subset of records; and performs the second modification operation on the first modified subset of records. Responsive to executing the commit statement, the system stores the second modified subset of records in a commit table and causes the subset of records to be updated at the data servers.


