- 03 Aug 2023
- 2 Minutes to read
- Print
- DarkLight
Technical Multi-Threading Overview
- Updated on 03 Aug 2023
- 2 Minutes to read
- Print
- DarkLight
Overview
Through the utilization of the Flow Engine, users may process through desired sets of data. As a way to increase the rate by which these items are processed, Decisions offers specific steps designed to leverage the power of multiple Flows through the use of Multi-Threading.
Though similar to some of Decisions' other Asynchronous processes, these steps allow each process to execute alongside one another, executing a more true Multi/Parallel Processing.
The following document defines and describes the following concepts relative to Decisions:
- Multi-Processing
- Parallel Processing
- Multi-Threading
Multi-Processing
A Computer Process is the execution of a task or action by a CPU (Central Processing Unit).
Multi-Processing, as its name implies, is the running of multiple processes. This term also refers to a system's ability to support more than one processor (hence Multi-Processing) to share task burden.
For example, running a Web Browser and Notepad application at the same time, on the same computer, could be considered Multi-Processing; two separate processes, regulated by PC resources, running to perform distinct tasks.
Similarly, Decisions is coded to intelligently utilize a Server's Multi-Core Architecture to distribute processing power burden.
Parallel Processing/Parallel Approvals
In computing, Parallel Processing divides a job into subparts for distribution among available Processors, thereby executing the job in less time.
While there are no Flow Design Behavior types that enable conventional Parallel Processing, steps can be leveraged to achieve Parallel Approvals. This consists of sending Parallel Assignments to static or dynamic Assignees/Groups using the following Flow steps:
- Merge Step
- Branch Step
- BranchForEach
Multi-Threading
In terms of data processing and task, a Thread refers to a set of instructions that is designed to be scheduled and executed by a CPU independently of its Parent Process.
As its name suggests, Multi-Threading implies a System capable of executing multiple Threads concurrently and independently of the Parent Process. Rather than utilize multiple Processing Units to execute the desired task, Multi-Threading utilizes the power of the single CPU. Doing so allows the work to be completed by multiple Threads in a Work/Job Queue rather than with entirely new processes.
In Decisions, Multi-Threaded Flow Behavior can be achieved primarily using the Run Flows For List step or the Start Linked Flow Async step. These steps allow the primary Flow to execute multiple Flows concurrently, specifically as a method of iterating through a list of data.
For additional information regarding Multi-Threading in Decisions, see the following documents:
- Multi-Threading Flow Design
- About Sync and Async Sub Flows (see Start Linked Flow Async section)
- Run Flows For List Step
- Run Flows For List Step - Run Behaviors Detailed
Threading/Processing Relation Diagram
The figure below illustrates a basic relationship between Threading and Processing: