Node (Node.JS) for Beginners

Profile photo of community Teacher: community

Course Description

Why and Why Node.JS?

Node.js, often called simply “Node” in conversation, is a development platform built on top of Google’s V8 JavaScript virtual machine. While JavaScript engines (including V8) are traditionally run in Web browsers to form the client side of a client/server application, the Node.js libraries are focused on building server-side applications in JavaScript.

Node.js is intended to run on a dedicated HTTP server and to employ a single thread with one process at a time. Node.js applications are events-based and run asynchronously. Code built on the Node platform does not follow the traditional model of receive, process, send, wait, receive. Instead, Node processes incoming requests in a constant event stack and sends small requests one after the other without waiting for responses.

This is a shift away from mainstream models that run larger, more complex processes and run several threads concurrently, with each thread waiting for its appropriate response before moving on.

One of the major advantages of Node.js, according to its creator Ryan Dahl, is that it does not block input/output (I/O). Some developers are highly critical of Node.js and point out that if a single process requires a significant number of CPU cycles, the application will block and that the blocking can crash the application. Proponents of the Node.js model claim that CPU processing time is less of a concern because of the high number of small processes that Node code is based on.

Skip to toolbar