16 Asynchronous Programming
My advice is you should be able to do more than you do, than to do more than you can.—Bertold Brecht
The architecture of Node.js expects an application to be run in one process and one thread. The advantage of this is that you don’t need to worry about concurrency and the resource access problems it creates. To avoid performance issues caused by this architecture, most of the platform’s features are implemented in such a way that much of the work can be outsourced, allowing Node.js to remain responsive. The key to this is the asynchronous processing of tasks. So far, you’ve already learned about some of the features of JavaScript and Node.js that can help you deal with asynchronicity. In this chapter, you’ll get to ...
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