Ah, the great and crazy Node.js Event Loop. Often talked about, rarely intimately known. What does the Node.js Event Loop do? What does it provide the programmer? Let’s dive in and talk about what the event loop is and does and how it can help you in your day to day development.
In the case of most pre-node.js Javascript, it existed in the browser and took user events manipulate the content of the rendered page in the browser. Manipulating these events were the only real interaction the code had. It was a single route of actions that the programmer had to deal with. Besides the DOM (that’s another whole discussion) the Javascript world on the browser side was relatively simple.
Enter server side JavaScript via Node.js. All of a sudden JavaScript now can deal with all of the interactions on a server. This changes the paradigm of JavaScript development dramatically, from a single event happening at a time to the need for many things to start, stop and evolve over time. So how does JavaScript, and Node.js, deal with this new complexity on the server side?
Your new post is loading...