Lock-Free Message Processing via Partition Keys

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Network nodes in telecommunications face issues with message processing, such as race conditions and out-of-order processing due to the lack of guaranteed sequence in message handling, which can lead to service interruptions and are exacerbated by lock-based mechanisms that introduce memory overhead and diagnostic challenges.

Innovation Solution

Implementing a lock-free communications processing system where messages are assigned to queues based on partition keys, allowing each thread to process messages in a First-In, First-Out (FIFO) order, thereby ensuring ordered processing without the need for locks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If lock-based mechanisms are implemented to prevent out of order processing, then message processing order is improved, but memory overhead and system complexity increase

Engineering Contradiction:
Improvemessage processing orderVSAvoidlock mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system divides messages into different partitions based on partition keys, creating separate processing queues for each partition. This segmentation allows messages with the same partition key to be processed in order by dedicated threads without requiring locks, while different partitions can be processed in parallel, resolving the contradiction between maintaining order and reducing complexity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces partition keys as an intermediary mechanism that indirectly controls message processing order. Instead of using direct lock-based synchronization, the partition key routes messages to specific queues where ordering is naturally maintained by the queue structure itself, eliminating the need for complex lock management.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If lock mechanisms are used per call flow, then race conditions are mitigated, but memory requirements increase due to lock contention overhead

Engineering Contradiction:
Improverace condition preventionVSAvoidmemory requirements
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

By segmenting the message stream into multiple partitions based on partition keys, the system eliminates the need for per-call-flow locks. Each partition is processed by a dedicated thread or queue, which naturally prevents race conditions without requiring additional lock structures in memory, thus reducing memory requirements while maintaining reliability.

Inventive Principle:
Principle #1Segmentation

3Reliability

If lock-based processing is implemented, then message order is maintained, but system performance decreases due to contentions and deadlocks

Engineering Contradiction:
Improvemessage processing orderVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system segments the processing workload into multiple independent partitions, each handled by its own thread or queue. This allows parallel processing of different partitions while maintaining order within each partition, significantly improving throughput compared to sequential lock-based processing while preserving message order guarantees.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic partitioning where messages are routed to different queues based on their partition keys. This dynamic approach allows the system to adapt to varying message patterns and utilize multiple processing threads concurrently, improving productivity while maintaining order through the queue structure rather than static locks.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10798609B2Methods, systems, and computer readable media for lock-free communications processing at a network node
Publication Date: 2020.10.06 ORACLE INT CORP
  • US10798609B2 patent drawing
  • US10798609B2 patent drawing
  • US10798609B2 patent drawing

AI summary

Methods, systems, and computer readable media for lock-free communications processing at a network node are disclosed. One method occurs at a first network node configured to add messages to a plurality of queues, wherein each of the plurality of queues is accessed by one of a plurality of threads. The method comprises receiving a first message associated with a first mobile subscriber; determining that the first message is associated with a first partition key; assigning, based on the first partition key, the first message to a first queue of the plurality of queues, wherein the first queue includes messages associated with the first mobile subscriber and wherein the first queue is accessible by a first thread of the plurality of threads; and processing, by the first thread, messages of the first queue in a first in, first out order.