Topic-Based Messaging for Distributed Database Lock Contention

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional database management systems face performance issues due to uncoordinated data access and lock contentions, particularly in distributed environments where processors are not tightly coupled, leading to scalability bottlenecks and delays.

Innovation Solution

A topic-based messaging architecture is implemented in a distributed data-oriented OLTP environment, utilizing a publication-subscription messaging pattern to improve scalability and reduce CPU workload by removing lock contentions and delegating communication messages to a separate message system, allowing for parallel execution of database actions across multiple phases.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If logical locks are applied to ensure data integrity in conventional database management systems, then data consistency is maintained, but system throughput deteriorates due to lock contentions and latch overhead

Engineering Contradiction:
Improvedata integrityVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the locking mechanism from the critical transaction path by introducing a separate coordination layer that uses optimistic concurrency control and version vectors. This removes the harmful latch acquisitions and releases from the main transaction flow, eliminating lock contentions while preserving data integrity through a different mechanism that doesn't block transaction execution.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces version vectors and coordination messages as intermediary elements that mediate between concurrent transactions. Instead of direct lock-based coordination, these intermediaries carry version information and conflict resolution data, allowing transactions to proceed without blocking while maintaining consistency through conflict detection and resolution at commit time.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If data is partitioned into smaller sections to reduce lock contention, then scalability is improved, but the centralized lock manager becomes a bottleneck

Engineering Contradiction:
ImprovescalabilityVSAvoidlock manager complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the centralized lock manager functionality into distributed, autonomous components at each database node. Each node independently manages its own data partitions using local version vectors and conflict resolution logic, eliminating the single point of contention. This distributed approach allows linear scalability as each node operates independently without coordinating through a central bottleneck.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent enables each database node to self-manage concurrency control for its local partitions using optimistic concurrency control and local version tracking. Nodes independently detect conflicts and resolve them without external intervention, eliminating the need for a centralized lock manager and enabling each partition to be accessed and modified autonomously by multiple transactions.

Inventive Principle:
Principle #25Self-service

3Productivity

If transactions are decomposed into smaller actions and routed to different threads, then parallel execution is improved, but coordination overhead increases

Engineering Contradiction:
Improveparallel executionVSAvoidcoordination overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by having transactions pre-decompose into fine-grained operations with explicit version vector annotations before execution. Each operation carries its version information forward, allowing threads to execute in parallel without needing to coordinate during execution. The coordination overhead is eliminated because the version tracking and conflict detection are built into the operation structure itself, not added during runtime coordination.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP3238421B1System for high-throughput handling of transactions in data-partitioned, distributed, relational database management system
Publication Date: 2021.02.17 HUAWEI TECH CO LTD
  • EP3238421B1 patent drawingFigure 1
  • EP3238421B1 patent drawingFigure 2
  • EP3238421B1 patent drawingFigure 3

AI summary

A topic-based messaging architecture (including schema, protocols, naming conventions, etc. ) is used in a distributed data-oriented OLTP environment. The topic-based messaging architecture is implemented as a type of publication-subscription ("pub-sub") messaging pattern. In one or more embodiments of the topic-based system, messages are published to "topics, " or named logical channels. Subscribers in a topic-based system will receive all messages published to the topics to which they subscribe, and all subscribers to a topic will receive the same messages. The publisher is responsible for defining the classes of messages to which subscribers can subscribe. The topic-based messaging interface improves the scalability of a distributed database management system and provides a robust mechanism for message delivery.