Shadow Queues for Message Recovery in Distributed Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed computing environments, the premature deletion of messages from messaging queues due to 'all or nothing' transaction behavior hinders failure recovery and excessively consumes system resources, as messages are removed before all asynchronous hops are completed, leading to resource inefficiencies.

Innovation Solution

Implementing shadow queues that store message addresses separately from primary queues, allowing for message recovery by maintaining a redundant copy of message addresses until all tasks are completed, thereby reducing resource consumption and enabling effective failure recovery.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of energy

If messages are deleted from the message store after a single transaction completes, then system resources are freed up, but message recovery capability is lost and system reliability deteriorates

Engineering Contradiction:
Improvesystem resource consumptionVSAvoidmessage recovery capability
Core Design Contradiction:
Loss of energyVSReliability

Solution Approach 1:

The queue structure is segmented into multiple shadow queues (e.g., shadow queue 1, shadow queue 2) that maintain separate copies of message addresses. This segmentation allows the system to delete messages from the primary message store after one shadow queue processes them, while retaining recovery capability through other shadow queues. The primary queue and multiple shadow queues operate independently, enabling resource optimization without sacrificing reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system implements a discard-and-recover mechanism where messages are deleted from the primary message store after successful processing by one transaction, but can be recovered from shadow queues if failures occur. The shadow queues maintain redundant copies of message addresses, allowing the system to recover and reprocess messages if needed, thus balancing resource management with reliability.

Inventive Principle:
Principle #34Discarding and recovering

2Reliability

If messages are retained in the message store for all asynchronous hops, then message recovery capability is maintained, but system resources are excessively consumed

Engineering Contradiction:
Improvemessage recovery capabilityVSAvoidsystem resource consumption
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The system segments message storage across multiple queues: a primary queue for active processing and multiple shadow queues for redundancy. This allows messages to be removed from the primary message store after one transaction completes successfully, reducing resource consumption while maintaining recovery capability through shadow queues that retain message addresses.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system creates copies of message addresses in shadow queues rather than retaining original messages in the primary message store. This copying mechanism enables recovery capability while significantly reducing resource consumption, as shadow queues store only essential message address information rather than full message content throughout the entire processing lifecycle.

Inventive Principle:
Principle #26Copying

3Stability of the object's composition

If the system implements 'all or nothing' transaction behavior with rollback, then transaction integrity is maintained, but message deletion occurs prematurely before all asynchronous hops complete

Engineering Contradiction:
Improvetransaction integrityVSAvoidmessage availability for recovery
Core Design Contradiction:
Stability of the object's compositionVSReliability

Solution Approach 1:

The transaction processing is segmented across multiple independent queues. When a transaction fails and rollback occurs, the message address remains in shadow queues rather than being deleted from the system. This allows the message to be recovered and reprocessed by subsequent transactions, maintaining both transaction integrity through rollback and message availability for recovery through shadow queue persistence.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system implements beforehand cushioning by maintaining shadow queues with message address copies before transaction completion. This preparatory redundancy ensures that if an 'all or nothing' rollback occurs, messages are not lost but remain available in shadow queues for recovery, thus cushioning against the harmful effect of premature deletion while maintaining transaction integrity.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

4Reliability

If shadow queues store redundant message addresses, then message recovery capability is enhanced, but queue complexity increases

Engineering Contradiction:
Improvemessage recovery capabilityVSAvoidqueue structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The shadow queues serve multiple functions: they act as backup storage for message addresses, enable recovery after rollback, and allow continued processing by subsequent transactions. This multi-functionality justifies the added structural complexity, as the same shadow queue infrastructure supports both normal operation and failure recovery scenarios without requiring separate dedicated recovery mechanisms.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS9189303B2Shadow queues for recovery of messages
Publication Date: 2015.11.17 TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD
  • US9189303B2 patent drawing
  • US9189303B2 patent drawing
  • US9189303B2 patent drawing

AI summary

A method, system and computer program product for handling an electronic message in a data processing system are disclosed. The method comprises receiving an electronic message and storing the electronic message in a message store. An address of the electronic message is stored in a primary queue and the address of the electronic message is stored in one or more configured shadow queues. Responsive to successful completion of one or more tasks related to the electronic message, the address of the electronic message is deleted from the associated queue, and responsive to completion of all tasks related to the electronic message, the electronic message is deleted from the message store.