In one sentence: Node.js shines in time period internet applications using push technology over web sockets. What’s thus revolutionary regarding that? Well, when over twenty years of unsettled-web supported the stateless request-response paradigm, we tend to finally have internet applications with time period, two-way connections, wherever each the consumer and server will initiate communication, permitting them to exchange knowledge freely. This can be in stark distinction to the standard internet response paradigm, wherever the consumer perpetually initiates communication. To boot, it’s all supported the open internet stack (HTML, CSS and JS) running over the quality port eighty.
One may argue that we’ve had this for years within the sort of Flash and Java Applets—but actually, those were simply sandboxed environments exploitation the net as a transport protocol to be delivered to the consumer. Plus, they were run in isolation and infrequently operated over non-standard ports, which can have needed further permissions and such.
With all of its blessings, Node.js currently plays an essential role within the technology stack of the many high-profile corporations WHO rely upon its distinctive edges.
In this post, I’ll discuss not solely however these blessings are accomplished, however additionally why you would possibly need to use Node.js—and why not—using a number of the classic internet application models as examples.
The main plan of Node.js: use non-blocking, event-driven I/O to stay light-weight and economical within the face of data-intensive time period applications that meet distributed devices.