Chapter 9: Asynchronous Programming in Node.js
This chapter discusses the benefits and challenges of asynchronous programming in JavaScript. Asynchronous concepts are rarely evident in other languages, but it’s impossible to avoid them in Node.js.
You may have written asynchronous event handling functions in client-side JavaScript. These should run quickly, and pages don’t remain open for long; a bug could cause problems for an individual user, but a browser restart or page reload would fix it. However, your Node.js app is the central point of access for all users and must remain active without a restart. A small asynchronous bug can generate memory leaks that eventually crash the application.
This is one of the biggest causes of confusion when ...
Get Node.js: Novice to Ninja now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.