Member-only story

Concurrency x Parallelism

Tomas Svojanovsky
4 min readSep 1, 2023

--

Concurrency and parallelism are two important concepts in computer science, but they are often confused. In this article, we will discuss the difference between these two concepts and how they can be used to improve the performance of systems.

In today’s world of web applications, I/O operations can have a big impact on performance. These operations include downloading web pages, communicating with microservices, and running database queries. A slow I/O operation can make a web application feel sluggish and unresponsive.

A web request or communication with a microservice may take hundreds of milliseconds, or even seconds if the network is slow. A database query could be time intensive, especially if that database is under high load or the query is complex.

Concurrency

Concurrent tasks are tasks that are happening at the same time, but not necessarily simultaneously.

For example, a cook might be preparing two different pizzas. While the oven is preheating, the cook could start mixing the flour and salt together with olive oil. They could also start working on the second pizza base while the first base is finishing mixing. In this model, the cook is switching between different tasks concurrently.

--

--

Tomas Svojanovsky
Tomas Svojanovsky

Written by Tomas Svojanovsky

I'm a full-stack developer. Programming isn't just my job but also my hobby. I like developing seamless user experiences and working on server-side complexities

No responses yet