Concurrent Linked Hash Map for Lock-Free Cache Synchronization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing networked memory systems face challenges in synchronizing data across cache nodes without locking the system, which affects scalability and resilience, especially in distributed environments where each cache node needs to be synchronized.

Innovation Solution

The implementation of a concurrent linked hash map using doubly linked nodes and a hash table, with techniques like compare-and-swap (CAS) and the use of classes like ConcurrentSkipListMap and FIFODataContainer, ensures thread-safe and performant operations by allowing atomic updates and maintaining a lock-free, concurrent doubly linked list.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If locking mechanism is used to synchronize cache nodes, then data consistency is improved, but system availability and scalability deteriorate

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem availability
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent replaces the mechanical locking system with a software-based optimistic concurrency control mechanism using version numbers and compare-and-swap operations. Instead of using physical or logical locks that block access, the system allows concurrent reads and writes with version tracking, eliminating the need for locking while maintaining data consistency through conflict detection and resolution.

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

Solution Approach 2:

The patent introduces version numbers as an intermediary mechanism to mediate between concurrent access and data consistency. Each cache entry includes a version number that acts as a mediator to track modifications without requiring locks. The version number enables the system to detect conflicts and resolve them through compare-and-swap operations, allowing high availability while ensuring consistency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If locking mechanism is used to synchronize cache nodes, then data consistency is improved, but system complexity increases

Engineering Contradiction:
Improvedata consistencyVSAvoidsynchronization complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent replaces complex locking mechanisms with simpler version number tracking and compare-and-swap operations. The locking system required multiple lock acquisition and release operations, potential deadlocks, and complex conflict resolution. The version-based system simplifies this to atomic compare-and-swap operations that are easier to implement and reason about, reducing synchronization complexity while maintaining consistency.

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

3Reliability

If fixed replicas are distributed across cache nodes, then resilience to server failure is improved, but scalability deteriorates

Engineering Contradiction:
Improveresilience to server failureVSAvoidscalability
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent transforms the static replica distribution into a dynamic system where each cache node maintains a view of the entire distributed cache through version numbers. Instead of fixed replicas, the system dynamically determines which node has the latest version of each entry through version comparison. This allows the system to scale by adding nodes without being constrained by a fixed replication factor, as the version-based coordination enables any node to serve any entry.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8719307B2Concurrent linked hashed maps
Publication Date: 2014.05.06 RED HAT INC
  • US8719307B2 patent drawing
  • US8719307B2 patent drawing
  • US8719307B2 patent drawing

AI summary

An apparatus and a method for forming a concurrent linked hash map is described. Doubly linked nodes of a linked list are formed in a data container of a networked memory. A hash table is generated from the doubly linked nodes. A parent node is located in the hash table to update a reference of a node in the data container. The parent node is processed in a forward direction of the linked list.