In this article, we will discover some aspects of Node.js. We will do so by discussing some topics such as: uses cases of Node.js, how Node.js achieves concurrency and its main design pattern.
How Node.js Achieves Concurrency
Node.js achieves its "concurrency" by relying upon its runtime construct called the event loop. The event loop is at the core of every Node.js application because it is through it that Node.js can achieve its high input and output (IO) volumes. The way it works at a high level is that it heavily relies on the asynchronous programming concept to enable the application to be non-blocking. That is, request/statement 2 does not wait for request 1 to finish and request/statement 3 does not wait for request/statement 2 to finish before it can proceed. And the same applies to every other task that needs to be performed by the runtime.
Some Node.js Design Patterns
Putting it All Together