Deterministic Distributed Cache for SQL Query Acceleration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Cloud-based data processing systems face inefficiencies in retrieving data segments for interactive queries due to slow data retrieval from global storage, necessitating improved caching mechanisms in distributed computing environments.

Innovation Solution

A deterministic distributed cache system is implemented using consistent hashing techniques to ensure uniform token distribution across nodes, allowing for efficient data segment ownership and retrieval, with mechanisms for stabilizing and maintaining the cache state, even in the presence of node failures.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If data is retrieved from global storage for interactive queries, then data availability is ensured, but query execution speed deteriorates due to slow retrieval

Engineering Contradiction:
Improvequery execution speedVSAvoiddata retrieval time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent implements a distributed caching system that pre-loads and stores data segments in local caches on worker nodes before they are needed for query execution. The cache manager proactively manages data segmentation, hashing, and distribution to nodes, ensuring data is readily available when queries arrive, thus eliminating retrieval delays from global storage during actual query processing.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If a distributed cache is implemented to speed up data retrieval, then query processing efficiency improves, but system complexity increases due to cache management overhead

Engineering Contradiction:
Improvedata processing efficiencyVSAvoidcache management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements a self-managing distributed cache system where the cache manager autonomously handles data segmentation, hashing, distribution, and retrieval without requiring manual intervention. The system automatically detects node failures, reassignes data segments, and maintains cache coherence across the distributed cluster, reducing operational complexity while maintaining high processing efficiency.

Inventive Principle:
Principle #25Self-service

3Reliability

If data segments are cached on multiple nodes for fault tolerance, then system reliability improves, but cache consistency becomes difficult to maintain

Engineering Contradiction:
Improvesystem fault toleranceVSAvoidcache consistency
Core Design Contradiction:
ReliabilityVSStability of the object's composition

Solution Approach 1:

The patent divides the distributed cache into independent data segments, each assigned to specific worker nodes through consistent hashing. This segmentation allows the system to maintain multiple copies of data segments across different nodes for fault tolerance while keeping each segment's location and management simple and deterministic, thus maintaining cache consistency even as nodes are added or removed from the cluster.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12111832B2Techniques for a deterministic distributed cache to accelerate SQL queries
Publication Date: 2024.10.08 ORACLE INT CORP
  • US12111832B2 patent drawing
  • US12111832B2 patent drawing
  • US12111832B2 patent drawing

AI summary

Techniques for providing improved distributed caching are disclosed. A distributed computing system can be implemented with a cluster including a plurality of worker nodes configured to host one or more executors for processing data related to a query. The worker nodes can host a cache accessible to the executors. The data can be processed as a plurality of data segments. The worker nodes can be uniformly assigned a plurality of token bounds defining a range of integer token values. A hashing algorithm can be used to compute a token for each data segment associated with the query. Tasks can be launched on the executors preferentially, such that the task for processing a data segment having a token within the token bounds associated with the preferred executor. Executors can be instructed to review the associated cache to identify outlier data segments and inform other nodes in the cluster.