Database Query Execution with Selective Consistency Guarantees
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed database systems, ensuring strong consistency for all queries can be inefficient, leading to increased response times and user dissatisfaction due to delayed reflection of entity changes in query results.
Innovation Solution
A method that selectively guarantees strong consistency by executing a first query on a portion of the database without strong consistency and a second query on a strongly consistent portion, merging the results to provide up-to-date information relevant to the user while conserving computing resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If strong consistency is guaranteed for all queries by applying all data operations to all replicas before query processing, then data consistency is improved, but query response time deteriorates
Solution Approach 1:
The patent segments the database into multiple portions and divides queries into two types: strongly consistent queries that access specific portions requiring consistency, and eventually consistent queries that access other portions without strict consistency requirements. This segmentation allows the system to apply strong consistency guarantees only where necessary, rather than across the entire database, thereby reducing the time overhead while maintaining data consistency for critical operations.
Solution Approach 2:
The patent applies different consistency quality levels to different portions of the database based on local requirements. Certain database portions are configured with strong consistency guarantees while others use eventual consistency. This local differentiation allows the system to optimize query response times for non-critical data while ensuring data consistency for critical operations, resolving the contradiction between consistency and response time.
2Reliability
If strong consistency is enforced across all database operations, then data accuracy is improved, but system efficiency deteriorates
Solution Approach 1:
The patent segments database operations into those requiring strong consistency and those that can tolerate eventual consistency. By categorizing operations and applying appropriate consistency models to each segment, the system maintains data accuracy for critical operations while improving overall system efficiency by avoiding unnecessary consistency checks for non-critical operations.
Solution Approach 2:
The patent applies strong consistency guarantees partially, only to the extent necessary for specific database portions and query types. Rather than enforcing strong consistency excessively across all operations, the system applies it selectively where needed, thereby maintaining data accuracy for critical operations while preserving system efficiency through reduced overhead for other operations.
3Reliability
If all data operations are applied to all database replicas before query processing, then consistency is improved, but computational overhead increases
Solution Approach 1:
The patent segments the database into multiple portions with different consistency requirements. For queries accessing portions with eventual consistency, the system does not require all data operations to be applied to all replicas, thereby reducing computational overhead. For portions requiring strong consistency, the system applies operations selectively, avoiding the overhead of propagating all operations to all replicas across the entire database.
Solution Approach 2:
The patent applies different consistency quality levels to different database portions based on local requirements. This allows the system to reduce computational overhead by avoiding unnecessary data operation propagation to all replicas for portions that do not require strong consistency, while still maintaining consistency for portions where it is necessary.
Data Source
AI summary
A server system having one or more processors and memory stores a plurality of entities in one or more databases, where the one or more databases do not guarantee strong consistency of the stored entities. The server system executes a first query against at least a first portion of the one or more databases to generate a first set of results that is not guaranteed to be strongly consistent. The server system also executes a second query, where executing the second query includes performing a consistency operation, the consistency operation guaranteeing that a second portion of the one or more databases is strongly consistent. After performing the consistency operation, the server system generates a second set of results from the second portion and merges the first set of one or more results and the second set of one or more results.


