Asynchronous Data Objects for Event-Driven Programming

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Event-driven programming languages face scalability issues due to blocking operations during concurrent events, as they require thread resources even when waiting for data, leading to inefficiencies with many connections.

Innovation Solution

The introduction of asynchronous data objects that suspend and redirect thread resources, allowing for the recreation of execution stacks without blocking, enabling efficient handling of incomplete data streams and minimizing thread usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If blocking operations are used to wait for data availability, then the program can ensure data is ready before processing, but thread resources are consumed and scalability deteriorates under concurrent events

Engineering Contradiction:
Improvedata readiness assuranceVSAvoidscalability under concurrent events
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent introduces an intermediary mechanism (event loop with callback registration) between the blocking operation and the processing logic. Instead of directly blocking the thread, the system registers a callback and returns control to the event loop, which acts as a mediator to resume execution when data becomes available. This resolves the contradiction by ensuring data readiness through the callback mechanism while preventing thread blocking, thereby maintaining scalability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent applies preliminary action by registering the callback function in advance before the actual data processing occurs. The event loop is pre-configured to handle the resumption of execution when data becomes available. This allows the system to prepare the processing pipeline upfront without committing thread resources to blocking, thus maintaining both reliability and scalability.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If thread resources are allocated for waiting operations, then execution can resume when data is available, but resource consumption increases and limits the number of concurrent connections handled

Engineering Contradiction:
Improveexecution resumption capabilityVSAvoidthread resource consumption
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

The patent implements self-service by allowing the event loop to automatically manage the resumption of execution without requiring dedicated thread resources. When data becomes available, the event loop itself handles the callback invocation and execution resumption. This eliminates the need for persistent thread allocation while maintaining the capability to resume execution, thereby reducing resource consumption and increasing the number of concurrent connections that can be handled.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent extracts the waiting functionality from the thread execution model and places it in the event loop architecture. Instead of threads waiting for data, the event loop extracts and manages the waiting state through callback registration and event-driven resumption. This separation allows execution to resume when data is available while minimizing thread resource consumption, as the event loop can manage multiple callbacks with a single thread.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If traditional thread-based blocking operations are used, then the programming model remains simple and intuitive, but the system cannot efficiently handle large numbers of concurrent connections

Engineering Contradiction:
Improveconcurrent connection handling capacityVSAvoidprogramming model complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent applies universality by designing the event loop to handle multiple types of operations through a unified callback mechanism. The same event loop infrastructure manages data availability callbacks, connection events, and processing resumption across different concurrent connections. This multi-functional approach increases adaptability for handling large numbers of connections while keeping the programming model relatively simple, as developers only need to register callbacks without managing thread complexity.

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

Solution Approach 2:

The event loop serves as an intermediary layer between simple callback registration and complex concurrent execution management. It mediates between the intuitive programming model (register and forget) and the complex task of coordinating multiple concurrent operations. This intermediary absorbs the complexity of thread management and synchronization, allowing the surface-level programming model to remain simple while achieving high concurrent connection handling capacity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11609745B2Asynchronous data objects for an event driven programming language
Publication Date: 2023.03.21 MCAFEE LLC
  • US11609745B2 patent drawing
  • US11609745B2 patent drawing
  • US11609745B2 patent drawing

AI summary

A method for increasing scalability of asynchronous data processing includes interpreting a computer program for reading data from an input data stream, wherein the input data stream is defined in the program as an object having a function for obtaining more data from the input data stream; determining that additional data from the input data stream is required to continue execution of the function in a thread of the interpreted computer program; suspending execution of the thread responsive to a determination that the additional data is unavailable; saving a state information for the suspended thread, wherein the saved state information includes information to allow resumption of the suspended thread; generating an event indication upon availability of at least some of the additional data; and resuming execution of the suspended thread of execution and providing the additional data as a result of the function.