In-Memory Snapshot Data Structure for Consistent Distributed Database Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed database management systems (DBMS) face delays in processing updates, leading to data consistency issues, where clients may read inconsistent data due to the time gap between updating and propagating changes across computing nodes.

Innovation Solution

Implementing an in-memory snapshot data structure that acknowledges updates before propagating changes to storage devices, ensuring consistent query results by using in-memory data structures until storage updates are completed.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If updates are propagated to storage devices before acknowledgment, then data consistency is improved, but processing latency increases

Engineering Contradiction:
Improvedata consistencyVSAvoidprocessing latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by updating in-memory data structures and local indexes before propagating changes to storage devices. The acknowledgment is sent to the client immediately after the in-memory update, allowing the write operation to proceed asynchronously in the background without blocking the client response.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The write operation is segmented into multiple independent phases: (1) update in-memory data structures and send acknowledgment, (2) propagate changes to local indexes, and (3) write to storage devices. Each phase can proceed independently, allowing the system to provide immediate acknowledgment while completing the full write sequence asynchronously.

Inventive Principle:
Principle #1Segmentation

2Reliability

If updates are propagated across computing nodes before acknowledgment, then data consistency is improved, but processing latency increases

Engineering Contradiction:
Improvedata consistencyVSAvoidprocessing latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system updates local in-memory data structures and local indexes as preliminary actions before propagating to remote computing nodes. The acknowledgment is sent after the local update is complete, allowing remote propagation to occur asynchronously without blocking the client response.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system maintains different quality levels for different parts of the system: local in-memory data structures are updated immediately with high consistency, while remote computing nodes receive updates asynchronously. This allows the system to provide immediate acknowledgment based on local state while remote nodes eventually converge to the same state.

Inventive Principle:
Principle #3Local quality

3Reliability

If synchronous write operations are performed, then data consistency is improved, but processing speed decreases

Engineering Contradiction:
Improvedata consistencyVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary updates to in-memory data structures and sends acknowledgments before executing the actual write operations to storage devices. This allows the system to provide immediate response to clients while the write operations complete asynchronously in the background, improving throughput without sacrificing eventual consistency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system maintains continuous useful action by allowing multiple write operations to be initiated without waiting for each to complete. Acknowledgments are sent continuously as local updates are made, while write operations to storage devices and propagation to remote nodes continue asynchronously, maximizing system throughput.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10754854B2Consistent query of local indexes
Publication Date: 2020.08.25 AMAZON TECH INC
  • US10754854B2 patent drawing
  • US10754854B2 patent drawing
  • US10754854B2 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.