Log-Based Transaction Management for Distributed State Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed applications face challenges in maintaining high performance and consistency of application state changes due to increased complexity and size, with traditional locking mechanisms becoming bottlenecks and 'stop-the-world' techniques being problematic for latency-sensitive applications.

Innovation Solution

A dynamic directed acyclic graph (DAG) of replication nodes is used to manage application state changes, allowing for asynchronous propagation of configuration-delta messages and avoiding the need for synchronization, thus enabling continuous state transition processing even with divergent node views and minimizing downtime due to node failures or changes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If locking mechanisms are used to manage application state changes, then consistency of state information is improved, but application performance becomes bottlenecked

Engineering Contradiction:
Improveconsistency of state informationVSAvoidapplication performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system segments the monolithic locking mechanism into distributed lock records stored in a log. Each state change is represented as an individual record in the log, allowing parallel processing of multiple state transitions without mutual exclusion, thereby eliminating the performance bottleneck while maintaining consistency through the sequential nature of log entries.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The log acts as an intermediary between state change requests and the application state. Instead of direct locking operations, state changes are first recorded in the log as immutable entries, and then applied asynchronously. This intermediary layer decouples the consistency guarantee from the performance path, allowing high-throughput state transitions.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If stop-the-world techniques are used to propagate state changes, then consistency among components is improved, but latency increases for mission-critical applications

Engineering Contradiction:
Improveconsistency among componentsVSAvoidlatency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system maintains continuous operation by applying state changes asynchronously from the log without stopping the application. The log records state transitions immutably, and these transitions are continuously applied to component state in the background, eliminating stop-the-world pauses while ensuring consistency through the ordered, sequential nature of log entries.

Inventive Principle:
Principle #20Continuity of useful action

Solution Approach 2:

State changes are preliminarily recorded in the log before being applied to components. This preliminary recording in immutable log entries ensures that the state transition is committed and ordered before actual component state updates occur, guaranteeing consistency without requiring synchronous coordination or application pauses.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If traditional locking mechanisms are used, then state transition consistency is improved, but the system cannot handle very high rates of state transitions

Engineering Contradiction:
Improvestate transition consistencyVSAvoidstate transition rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent replaces the mechanical locking system with a log-based event recording system. Instead of using mutexes and locks that serialize access, the system records state transitions as sequential log entries that can be processed in parallel. The consistency guarantee comes from the immutable, ordered nature of the log rather than from mutual exclusion, enabling high-throughput state transitions.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

4Reliability

If synchronous state propagation is used, then consistency is improved, but downtime increases during node failures or changes

Engineering Contradiction:
Improveapplication state consistencyVSAvoiddowntime
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system dynamically adapts to node failures and changes by continuously processing state transitions from the log. When nodes are added, removed, or fail, the system dynamically reconfigures which nodes receive and apply log entries, without requiring synchronous coordination or downtime. The log serves as the single source of truth that all nodes can independently process at their own pace.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS9323569B2Scalable log-based transaction management
Publication Date: 2016.04.26 AMAZON TECH INC
  • US9323569B2 patent drawing
  • US9323569B2 patent drawing
  • US9323569B2 patent drawing

AI summary

A first transaction manager of a partitioned storage group stores a first conditional commit record for a first write of a multi-partition transaction based on a first conflict detection operation. A second transaction manager stores a second conditional commit record for a second write of the transaction based on a second conflict detection operation. A client-side component of the storage group determines that both writes have been conditionally committed, and stores an unconditional commit record in a commit decision repository. A write applier examines the first conditional commit record and the unconditional commit record before propagating the first write to the first partition.