Concurrency and Asynchronous Patterns
In the previous chapter, we covered architectural design patterns: patterns that help with solving some unique challenges that come with complex projects. Next, we need to discuss concurrency and asynchronous patterns, another important category in our solutions catalog.
Concurrency allows your program to manage multiple operations simultaneously, leveraging the full power of modern processors. It’s akin to a chef preparing multiple dishes in parallel, each step orchestrated so that all dishes are ready at the same time. Asynchronous programming, on the other hand, lets your application move on to other tasks while waiting for operations to complete, such as sending a food order to the kitchen and serving other customers until the order is ready.
In this chapter, we’re going to cover the following main topics:
- The Thread Pool pattern
- The Worker Model pattern
- The Future and Promise pattern
- The Observer pattern...