Parallel Pipeline Pattern

Learn the Parallel Pipeline design pattern and its usage.

Intent

This pattern allows concurrent execution of the steps of a multistep process by maintaining the message order. The Parallel Pipeline pattern is also known as the Pipeline pattern.

Context and problem

The free performance lunch has been over for more than ten years now. The CPU clock speed has stopped increasing in favor of a number of cores. Software written for sequential execution is not getting faster on newer CPUs. The software has to be built for parallel processing to gain an advantage of the increasing number of cores. To illustrate the problem, let’s have a look at the following banking example with an ATM processing flow that consists of four steps:

The steps are tightly coupled together and executed sequentially, one after another. The processing thread must execute the complete flow before handling the next request, regardless of whether a step is CPU-intensive, IO-intensive (and the thread is waiting), requires a connection to an external system, requires error handling, or retries, etc. ...

Access this course and 1400+ top-rated courses and projects.