Knowing Our Motivations

Let's examine some key reasons to decide whether to use the worker layer in our project.

Importance of concurrency

Adding concurrency has a price, and it is one that nearly every team will need to pay. Here are some of the reasons for relying on it, to name but a few:

  • Modern developers build distributed, concurrent systems.

  • Even the most straightforward web projects are split into pieces.

  • The web server itself exists to run one user’s request concurrently with others.

  • The browser, static content server, and database all use concurrent processes.

All but the most basic developers need to deal with concurrency issues presented by those layers, whether or not they decide to introduce their processes or threads. Knowing how these pieces work will make us better programmers.

Still, we will want to decide whether to code worker machinery ourselves or rely on the work of others to do the job for us. To make that determination, we’ll quickly discuss the reasons we might want to introduce workers. We’ll focus on three of them:

  • Concurrency

  • Isolation

  • Scalability

Concurrency

In the simplest terms, concurrency means doing more than one thing at the same time.

Get hands-on with 1200+ tech skills courses.