Event Queuing System for Out-of-Order Message Reordering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Social networking platforms face issues with event messages arriving in arbitrary order due to different routing paths, leading to misrepresentation of messaging content and negatively affecting user experience when simply processed in the order received.

Innovation Solution

An event queuing system is implemented to receive and reorder event messages based on priority rules, such as timestamp, sequence number, and message type, ensuring they are displayed in the intended order, using an API and database systems to store and update messages accurately.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If event messages are processed in the order received, then processing simplicity is improved, but message ordering accuracy deteriorates

Engineering Contradiction:
Improveprocessing simplicityVSAvoidmessage ordering accuracy
Core Design Contradiction:
Ease of operationVSManufacturing precision

Solution Approach 1:

The system assigns sequence numbers to event messages in advance before they are received, based on the chronological order of events. This preliminary ordering allows messages to be sorted accurately when received out of order, resolving the contradiction between simple processing and accurate ordering.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

An event queue data structure is introduced as an intermediary between message reception and message processing. The queue maintains messages in chronological order using sequence numbers, allowing the system to process messages in the correct order without complex real-time sorting logic.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Manufacturing precision

If event messages are reordered based on sequence numbers, then message ordering accuracy is improved, but processing complexity increases

Engineering Contradiction:
Improvemessage ordering accuracyVSAvoidprocessing complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

Event messages carry their own sequence numbers as metadata, making them self-identifiable in terms of chronological order. The processing system simply needs to sort messages by these pre-assigned sequence numbers without requiring complex external ordering logic.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system changes the parameter used for ordering from reception time to sequence number assignment time. This parameter change simplifies the ordering process because sequence numbers are assigned in strict chronological order at the source, making the sorting operation straightforward.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If the system waits for all event messages to arrive before processing, then message completeness is improved, but response time deteriorates

Engineering Contradiction:
Improvemessage completenessVSAvoidresponse time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary filtering and processing of event messages that have arrived, using their sequence numbers to determine if they can be processed independently. Messages with complete dependency chains are processed immediately, while others are held in the queue, balancing completeness and response time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of waiting for all messages, the system processes partial sets of messages that are ready for processing. This partial action approach allows the system to respond to available data while maintaining correctness for the subset of messages that can be safely processed.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20240314100A1Messaging system of partial and out-of-order events
Publication Date: 2024.09.19 SNAP INC
  • US20240314100A1 patent drawing
  • US20240314100A1 patent drawing
  • US20240314100A1 patent drawing

AI summary

Methods, systems, and computer readable medium are provided for receiving an event message in a plurality of event messages, the event message comprising a sequence number and associated data, identifying the event message as an out-of-order event message based on the sequence number, assigning a priority level to the out-of-order event message based on a plurality of priority rules, and placing the out-of-order event message in a primary queue of messages based on the priority level assigned to the event message.