Node is a new platform for creating web applications, that offers some significant advantages over more traditional environments.
To understand what makes Node so powerful, we need a little background on how the web works. Website and web apps are hosted on servers that are connected to the internet. Each time you visit a website, your browser sends a request to the server. The server will process that request, then send back the data your browser needs to display the page you want to look at. Until now, most servers had to process things in a sequential basis. Broadly speaking, this means that some parts of code can get blocked from running until the previous section of code has finished.
Node brings a number of benefits but the main one is it’s ability to multitask. Node is non-blocking, allowing it to run code asynchronously. Where other servers would have to wait patiently for one bit of code to finish, Node can crack on running the rest of the code. The end result is software that can be run far more efficiently, delivering far more power for far less resources.
The non-blocking nature of Node does have drawbacks. It certainly adds some fun considerations for programmers, and in some specific computational tasks that Node will not perform well at, but on balance, Nodes ability to run code asynchronously has made it the default choice for many projects.
In most web applications, the conversation between the web browser and the server is quite one sided. The browser has to initiate things with a request to the server, then the server can send an appropriate response. But what if the server wants to initiate the conversation? Perhaps it has updated information for the browser. Node allows real time communications between the browser and the server in both directions.
Node is a very powerful and flexible server platform that has some distinct advantages over many common alternatives. While there are some situations where Node is not going to be the best choice, they are fairly specific scenarios. Node is quickly becoming the go to platform for creating web apps, and for very good reason.