Database Server Update Latency via Tentative Commit
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed databases, making definitive changes to the database can be delayed due to long latency in writing to long-term storage, and existing protocols risk inconsistencies if the primary server fails before acknowledging changes to secondary servers.
Innovation Solution
Implement a database server that stores tentative changes in a low-latency memory and only commits them permanently after receiving acknowledgement from secondary servers, allowing for reduced latency and robust change management by promoting secondary servers to primary roles.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the primary server waits for acknowledgement from secondary servers before committing changes to long-term storage, then database integrity is ensured, but update latency increases due to sequential write operations
Solution Approach 1:
The primary server performs preliminary actions by writing changes to long-term storage before receiving acknowledgements from secondary servers. This allows the commit process to proceed without waiting for network round-trips, reducing latency while maintaining integrity through subsequent validation
Solution Approach 2:
The commit process is segmented into multiple independent phases: (1) primary server writes to its own storage, (2) primary server sends changes to secondary servers, (3) secondary servers acknowledge receipt, (4) primary server validates successful propagation. This segmentation allows parallel execution of independent operations
2Loss of time
If the primary server commits changes before receiving acknowledgement from secondary servers, then update latency is reduced, but system consistency is compromised if the primary server fails
Solution Approach 1:
Secondary servers provide feedback acknowledgements to the primary server confirming successful receipt and application of changes. The primary server uses this feedback to determine whether to proceed with final commit or initiate rollback, enabling consistency without blocking the commit process
Solution Approach 2:
The system prepares compensatory measures in advance by implementing rollback capabilities and transaction logging. If the primary server fails after committing but before secondary servers acknowledge, the system can detect the inconsistency and recover by rolling back the unacknowledged changes
Data Source
AI summary
A database server for implementing a distributed database, the server having access to a data store holding a first copy of the database managed by the database server and having a processor and interfacing means for client communication and for communication with a second database server managing a second copy of the database, the database server may implement a change to the database communicated from the client by the steps of: communicating the change to the second database server; storing in the first copy of the database a tentative record of the change; and on receiving from the second database server a storing record acknowledgement about the change in the second copy of the database: instructing the second database server to store a permanent record of the change in the second copy of the database and storing in the first copy of the database a permanent record of the change.


