Skip to Content
Beautiful JavaScript
book

Beautiful JavaScript

by Anton Kovalyov
August 2015
Intermediate to advanced
168 pages
3h 44m
English
O'Reilly Media, Inc.
Content preview from Beautiful JavaScript

CHAPTER TEN

The Node.js Event Loop

If you’re using Node.js, chances are that you started tinkering with it after getting tired of hearing everyone rave about this platform for building fast servers using JavaScript.

You went on the Node.js website and read this: “Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.”

Now, if you have experience building event-driven servers, this will already make enough sense to you. (And this chapter is probably not for you!) However, if you’re like me, when you read this you probably decided to quit programming, because here’s a platform for developers and I’m a developer, but I’m too stupid to understand why I should care!

Okay, maybe that was a little bit of an exaggeration. You didn’t quit programming, and you’re not stupid for not understanding why you should care about Node.js.

My goal is that, by the end of this chapter, you will be proud to tell the world you understand how the Node.js event loop works and start receiving your much-deserved LinkedIn endorsements for “Node.js event loop.”

Event-Driven Programming

At a high level, event-driven programming is when a system expresses its interest in a particular set of events, provides a way to be alerted when said events happen, and responds to them using callbacks.

What do these terms mean, though? An event is some change in a system’s state. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Rediscovering JavaScript

Rediscovering JavaScript

Venkat Subramaniam
JavaScript

JavaScript

T. J. Crowder

Publisher Resources

ISBN: 9781449371142Errata Page