Visualizing the Node.js execution model

For the chapters that follow it's important to fully understand what it means, conceptually, that a Node.js application has synchronous and asynchronous operations, and how both operations interact with each other.

Let's try to build this understanding step by step.

The first concept that we need to understand is that of the Node.js event loop. The event loop is the execution model of a running Node.js application.

We can visualize this model as a row of loops:

I've drawn boxes because circles look really clumsy in ASCII art. So, these here look like rectangles, but please imagine them as circles - circles ...

Get The Node Craftsman Book now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.