Asynchronous Task Queue Parallel Programming Pattern
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing task queue parallel programming patterns are synchronous, limiting client devices to run other program code only after fully synchronous parallel constructs are complete, and do not allow for asynchronous execution or guaranteed order and dependencies of tasks performed by worker devices.
Innovation Solution
Implementing an asynchronous task queue parallel programming pattern that supports single function and 'evaluate on all' evaluations, enabling client devices to execute program code while tasks are performed by worker devices and ensuring tasks are executed in a specified order with defined dependencies without synchronization between worker devices.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If synchronous parallel programming pattern is used, then task execution order and dependencies are guaranteed, but client device cannot execute other program code until tasks are complete
Solution Approach 1:
The patent segments the parallel programming pattern into asynchronous task submission and separate task execution phases. The client device submits tasks to a task queue and continues executing other program code, while worker devices independently execute tasks from the queue. This segmentation allows the client device to be decoupled from task execution timing, improving productivity while maintaining execution order guarantees through the queue structure.
Solution Approach 2:
The patent introduces a task queue as an intermediary between the client device and worker devices. The task queue receives tasks from the client device, maintains execution order, and distributes tasks to worker devices. This intermediary mechanism allows asynchronous operation while preserving the guaranteed execution order and dependency relationships specified in the task queue, resolving the contradiction between reliability and productivity.
2Reliability
If fully synchronous parallel constructs are used, then task dependencies are enforced, but client device is occupied and cannot run other code
Solution Approach 1:
The patent applies preliminary action by having the client device submit all tasks and their dependency relationships to the task queue before execution begins. The task queue then independently manages the execution order and dependency enforcement without requiring the client device to wait. This preliminary submission approach allows the client device to immediately proceed with other program code while the task queue handles dependency enforcement in the background.
Solution Approach 2:
The patent transforms the static synchronous parallel construct into a dynamic asynchronous system. Tasks are submitted with their dependency relationships, but the actual execution timing becomes dynamic and independent. Worker devices dynamically pick up tasks from the task queue based on availability and dependencies, while the client device is freed from waiting. This dynamic approach maintains dependency enforcement while eliminating client device waiting time.
3Productivity
If asynchronous task queue is implemented, then client device can execute program code during task performance, but synchronization between worker devices is eliminated
Solution Approach 1:
The patent uses copying by creating independent copies of tasks in the task queue that contain all necessary execution information and dependency metadata. Each task is a self-contained unit that can be executed by any worker device without requiring synchronization with other workers. The task queue maintains the execution order through this copied task structure, allowing asynchronous execution while preserving reliability guarantees.
4Reliability
If synchronous parallel pool is used, then task order is guaranteed, but system flexibility and asynchronous execution are limited
Solution Approach 1:
The patent changes the temporal parameter from synchronous to asynchronous execution. Tasks are submitted with their desired execution order and dependencies, but the actual execution time parameter becomes flexible and independent. The task queue maintains the logical execution order while allowing physical execution to occur asynchronously at different times and on different worker devices, thereby increasing system adaptability without sacrificing execution order guarantees.
Data Source
AI summary
A client device may receive information that identifies tasks to be performed by worker devices. The tasks may include at least one task that is to be performed by all worker devices, and may include at least one task that is to be performed by one worker device. The client device may identify, based on the information that identifies the tasks, an order and dependencies associated with performing the tasks. The client device may determine a task, of the tasks, to be performed by a work device, of the worker devices, based on the order and the dependencies. The client device may send, to the worker device, information associated with performing the task, and may receive, from the worker device, an indication that the task has been performed. The client device may determine, based on the order and the dependencies, another task to be performed by the worker device.


