Error Queue for Asynchronous Event Ordering in Distributed Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Asynchronous event-based architectures face challenges in handling failures during multi-system operations, leading to data inconsistency and resource drainage due to the lack of a clear mechanism for error handling and processing order, which can result in system freezing or data corruption.

Innovation Solution

An error queue is utilized to store failure records with aggregate identifiers, allowing for alerting a remediation team and temporarily halting subsequent events associated with the same identifier, ensuring that all events are processed in order once the failure is resolved, thereby maintaining data integrity and preventing resource wastage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If events are re-attempted to be processed after failure, then transient failures may be recovered, but system resources are drained and subsequent events are frozen

Engineering Contradiction:
Improveevent processing reliabilityVSAvoidevent processing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the event processing system into multiple independent components: an error queue for storing failed events, a monitoring component for detecting failures, and a retry mechanism for selective reprocessing. This segmentation allows the system to handle failures without freezing the entire event processing pipeline, maintaining throughput while improving reliability through targeted error handling.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary error queue that sits between the event source and the event processing component. When a failure occurs, the intermediary captures the failed event and places it in the error queue, preventing it from blocking the main event processing flow. This intermediary mechanism allows continuous processing of subsequent events while enabling selective retry of failed events, thus maintaining productivity while improving reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If failed events are skipped to maintain processing flow, then system throughput is maintained, but data inconsistency and corruption occur

Engineering Contradiction:
Improveevent processing throughputVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements preliminary action by storing failed events in an error queue with retry logic before they can cause data inconsistency. The monitoring component detects failures and queues the events for later retry, ensuring that no event is simply skipped. This preliminary error handling mechanism maintains data consistency by guaranteeing that all events are eventually processed in the correct order, while the asynchronous retry mechanism preserves system throughput.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If events are processed out of order to handle failures, then processing continues, but stale data overwrites newer data causing corruption

Engineering Contradiction:
Improveevent processing continuityVSAvoidevent processing order accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The patent implements feedback through a monitoring component that tracks the status of event processing and detects failures. When a failure is detected, the monitoring component provides feedback by placing the failed event in an error queue with metadata indicating its original position in the event stream. The retry mechanism uses this feedback information to reprocess events in the correct order, ensuring that event processing order accuracy is maintained while allowing processing continuity through asynchronous error handling.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10437689B2Error handling for services requiring guaranteed ordering of asynchronous operations in a distributed environment
Publication Date: 2019.10.08 LENDINGCLUB BANK NAT ASSOC
  • US10437689B2 patent drawing
  • US10437689B2 patent drawing
  • US10437689B2 patent drawing

AI summary

When a particular event record requires a particular service, but that service has failed for the event, an error record that includes an aggregate identifier (AgID) is stored for the event in an error queue. Storing an error record in the error queue causes the service to notify a remediation team to fix the failed event. All events with the AgID in the error record are put on hold and an error record is created for each of these events. The remediation team generates a fixed version of the event record and causes the system to retry the failed service for the event based on the fixed version. If the fixed version of the event is successfully processed, then any other events with the same AgID that have error records in the error queue, are routed in order of enqueue time through the event processor to be handled.