In-Memory Snapshot Data Structure for Distributed Database Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed database management systems (DBMS) face delays in updating data, leading to data consistency issues, where clients may read inconsistent or outdated data due to high-latency write operations and replication across computing nodes.

Innovation Solution

Implementing an in-memory snapshot data structure that acknowledges updates before propagating changes to storage devices, allowing for immediate consistency in query results by using an in-memory snapshot to provide committed data until storage updates are completed.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If updates are propagated to storage devices before acknowledgment, then data durability is improved, but update processing time increases

Engineering Contradiction:
Improvedata durabilityVSAvoidupdate processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by writing update data to a buffer memory before the storage device write operation completes. The acknowledgment is sent to the client before the storage write is fully completed, allowing the update processing time to be reduced while maintaining data durability through the buffer memory that holds the data until the storage write completes.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If data is replicated across multiple computing nodes, then system availability is improved, but data consistency time increases

Engineering Contradiction:
Improvesystem availabilityVSAvoiddata consistency time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by preparing update data in buffer memory at the primary computing node before replication to secondary nodes. This allows the primary node to acknowledge the update immediately while secondary nodes process the replication in the background, reducing the overall data consistency time while maintaining system availability through replication.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The buffer memory acts as an intermediary between the primary computing node and secondary computing nodes during data replication. It holds the update data temporarily, allowing the primary node to send acknowledgments quickly while enabling secondary nodes to retrieve and process replication data at their own pace, thus reducing data consistency time without compromising availability.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If in-memory snapshot is used for read operations, then read consistency is improved, but memory resource consumption increases

Engineering Contradiction:
Improveread consistencyVSAvoidmemory resource consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The system applies local quality by maintaining in-memory snapshots only for specific data items that require immediate read consistency, rather than maintaining snapshots for all data. This selective approach allows read consistency to be improved for critical operations while limiting memory resource consumption to only where necessary.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9576038B1Consistent query of local indexes
Publication Date: 2017.02.21 AMAZON TECH INC
  • US9576038B1 patent drawing
  • US9576038B1 patent drawing
  • US9576038B1 patent drawing

AI summary

A distributed database management system may comprise a plurality of computing nodes. A request to update an item maintained by the system may be acknowledged as durable and committed once an entry corresponding to the request has been written to a log file and quorum among the computing nodes has been achieved. Improved consistency may be achieved by maintaining snapshots of committed item states within queryable in-memory snapshot data structures. Range queries may be performed by merging a secondary index with the snapshots and applying filters. Projections may be completed by retrieving additional data from an item collection maintain on one or more storage devices.