Synchronous Operation Execution in Asynchronous Node.js Runtime

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In asynchronous operational environments, such as those utilizing the Node.js runtime, there is a challenge in executing synchronous operations efficiently due to the default asynchronous execution model, which can lead to issues with CPU-intensive applications requiring coordinated thread operations.

Innovation Solution

The implementation of a method and system that determine if an operation is synchronous, sending requests through a dual data buffer with a locked mutex to block subsequent operations until completion, allowing for synchronous execution within an asynchronous environment by using execution and communication threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If asynchronous execution model is used in Node.js runtime environment, then system responsiveness and non-blocking operations are improved, but execution of synchronous operations becomes inefficient and complex

Engineering Contradiction:
Improvesystem responsivenessVSAvoidexecution model complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the execution model by introducing separate execution threads and communication threads. The execution thread handles synchronous operations while the communication thread manages asynchronous events, allowing the system to support both execution modes without forcing a choice between them.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (the communication thread acting as a mediator) that translates between synchronous operation requests from the execution thread and asynchronous event notifications, enabling synchronous operations to function within the asynchronous Node.js runtime without directly compromising system responsiveness.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If synchronous operations are implemented in asynchronous environment using thread blocking, then operation completion assurance is improved, but system throughput and concurrency are reduced

Engineering Contradiction:
Improveoperation completion assuranceVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies local quality by making threads selective in their blocking behavior. Only the execution thread blocks when performing synchronous operations, while the communication thread remains non-blocking to maintain system responsiveness. This localized application of blocking minimizes the impact on overall system throughput.

Inventive Principle:
Principle #3Local quality

3Reliability

If dual data buffer with locked mutex is used for synchronous operation communication, then thread coordination and data integrity are improved, but access overhead and operation speed are increased

Engineering Contradiction:
Improvedata integrityVSAvoidoperation speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent implements periodic action through alternating lock/unlock cycles of the mutex. The mutex is locked only during critical data exchange moments between threads and unlocked during non-critical periods, allowing the system to maintain data integrity while minimizing the time spent in locked state and thus reducing overhead.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS12045669B2Execution of a synchronous operation in an asynchronous operational environment
Publication Date: 2024.07.23 MICRO FOCUS LLC
  • US12045669B2 patent drawing
  • US12045669B2 patent drawing
  • US12045669B2 patent drawing

AI summary

A method for execution of a synchronous operation in an asynchronous operational environment includes receiving, by a processor, a first operation from program code executing within the asynchronous operational environment with the program code being run on an execution thread and a communication thread. The method also includes determining, by the processor, if the first operation is a synchronous operation. The method further includes that if the first operation is a synchronous operation, sending a request from the execution thread to the communication thread to perform the first operation and blocking execution of a subsequent operation until a response to the request from the communication thread for the first operation has been completed.