O'Reilly logo

The Node Craftsman Book by Manuel Kiessling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required