Shard-Based Two-Phase Commit Protocol for Distributed Database Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Distributed database systems face challenges in achieving consistent outcomes while maintaining scalability, as strict two-phase commit approaches ensure data integrity but reduce liveness, and eventually consistent methods may lead to data corruption over time, especially in connected data systems.
Innovation Solution
A specialized two-phase protocol that determines a transaction's outcome based on a majority vote from replicas within a predetermined set of shard members, allowing for scalable and consistent data updates by reducing the number of participants required for agreement and using a coordinator to manage membership and synchronization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If strict two-phase commit approach is used, then data consistency is ensured, but system liveness and scalability deteriorate
Solution Approach 1:
The patent segments the distributed database into multiple shards, where each shard can be independently updated and committed. This allows parallel processing of transactions across different shards, improving system liveness while maintaining consistency within each shard through the two-phase commit protocol.
Solution Approach 2:
The patent applies partial two-phase commit by requiring only a majority of replicas within each shard to commit, rather than requiring all replicas across the entire distributed system to commit. This partial action approach maintains data consistency while reducing coordination overhead and improving system liveness.
2Reliability
If strict two-phase commit approach is used, then data integrity is maintained, but system scalability deteriorates
Solution Approach 1:
By dividing the distributed database into independent shards, the patent enables horizontal scaling without increasing the complexity of the two-phase commit protocol across the entire system. Each shard can be managed independently, allowing the system to scale to larger numbers of machines while maintaining data integrity.
3Productivity
If eventually consistent methods are used, then system liveness is preserved, but data consistency deteriorates
Solution Approach 1:
The patent applies partial two-phase commit by requiring only a majority of replicas within each shard to commit, rather than requiring all replicas across the entire distributed system to commit. This partial action approach maintains data consistency while reducing coordination overhead and improving system liveness.
Data Source
AI summary
Methods of conducting database transactions. One such method comprises receiving data to be written to a database; identifying a set of shard replicas corresponding to the database to which the data is to be written; transmitting, to each of the replicas in the set, a request to write the data thereto; receiving votes back from the replicas in the set, each vote representing whether the respective replica commits to a writing of the data thereto; determining whether to commit to the writing of the data to the database according to whether a majority of the replicas of every shard having replicas in the set has transmitted a vote committing to the writing of the data thereto; and transmitting an outcome of the determining to each of the replicas in the set.


