Message Queue Pre-Reading for FIFO Processing Speed

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional message management systems in cloud computing face performance limitations due to sequential consumption requirements and random disk writes, which hinder processing speed and disrupt the first-in first-out (FIFO) characteristic of message queues, especially when concurrent consumption is not supported.

Innovation Solution

A message management method and apparatus that record and adjust a number range of consumable messages in a message queue, allowing for efficient pre-reading and management based on message status changes, ensuring the FIFO characteristic while improving processing speed by pre-reading messages with smaller numberings first and expanding the range for failed consumption attempts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Stability of the object's composition

If messages are consumed sequentially to maintain FIFO characteristic, then message order is preserved, but processing speed is limited

Engineering Contradiction:
ImproveFIFO characteristicVSAvoidprocessing speed
Core Design Contradiction:
Stability of the object's compositionVSProductivity

Solution Approach 1:

The system performs preliminary actions by pre-reading message bodies from disk to cache memory in advance of actual consumption. This allows the message queue metadata to maintain sequential FIFO ordering while the actual message data is loaded into cache for faster subsequent access, thus preserving order while improving processing speed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system segments message management into two independent parts: metadata management (which maintains sequential FIFO order for reliability) and message body storage (which can be pre-loaded into cache for speed). This segmentation allows the metadata to enforce strict ordering while the cached message bodies enable parallel pre-reading operations.

Inventive Principle:
Principle #1Segmentation

2Reliability

If message attributes are modified to track consumption status, then message tracking is improved, but random disk writes increase affecting system performance

Engineering Contradiction:
Improvemessage trackingVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system extracts the message body data from the metadata structure and stores it separately in cache memory. Only essential metadata (message IDs, offsets, consumption status) remains in the queue structure, while full message contents are loaded into cache. This reduces the amount of data that needs to be written to disk and allows faster access to message contents.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system introduces a cache memory as an intermediary layer between disk storage and consumption processing. The cache acts as a buffer that holds pre-read message data, reducing the frequency and impact of disk writes. This intermediary allows the system to maintain reliability through proper metadata tracking while improving performance by minimizing random disk access.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If messages are pre-read from disk to cache, then processing speed is improved, but disk I/O operations increase

Engineering Contradiction:
Improveprocessing speedVSAvoiddisk I/O time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary pre-reading of message bodies from disk to cache before actual consumption occurs. By loading messages into cache in advance based on predicted consumption patterns, the system reduces the critical path I/O operations during actual message processing, thus improving processing speed while managing disk I/O through batch operations.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11165740B2Message sending method and terminal device
Publication Date: 2021.11.02 ALIBABA GROUP HOLDING LTD
  • US11165740B2 patent drawing
  • US11165740B2 patent drawing
  • US11165740B2 patent drawing

AI summary

Embodiments of the present disclosure provide to a message management method and apparatus. The message management method includes: recording, in a memory, a number range of consumable messages in a message queue, wherein the number range includes numberings of the consumable messages; and adjusting the number range and managing the messages according to status changes of the messages in the message queue.