What is Node.js

Node JS

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine

V8 engine compiles JavaScript code directly to machine code before executing it. It does not use traditional flow with an interpreter or compiler.

Node.js is an asynchronous event driven JavaScript runtime

Asynchronous event driven model: The model in which the processing or execution of a piece of code occurs as and when the event happens, rather than waiting for the previous event to complete.

Consider clientA requested for resource1. While clientA is being servered, another client: clientB has requested for resource2. With traditional server software, clientB is served only after clientA is served.

What if clientA takes a very long time? All the clients that come after clientA has to wait for that long and is not acceptable in realtime.

Which is why Node.js is built as event driven model. While clientA is being served, the control does not wait for the request to be completed. It delegates the work of fetching the resource. Meanwhile it servers other clients. When the requested resource is ready, clientA is served with the resource.

Node.js is open-source

Node.js’ source code, blueprint or design can be used, modified and/or shared under defined terms and conditions. This allows end users and commercial companies to review and modify the source code, blueprint or design for their own customization, curiosity or troubleshooting needs.

Node.js is cross-platform

Node.js is implemented on multiple computing platforms. Node.js can run on Microsoft Windows, Linux, and macOS.

Node.js is written in C, C++, JavaScript

Some parts of Node.js are written in C which need most performance. Node.js C++ implements some other modules and also the integration of V8 engine. JavaScript part helps with the inbuilt modules.

Node.js is licensed under BSD

BSD licenses impose minimal restrictions on the use and distribution of Node.js.

Other Names

Node.js is often called using Node, Node JS, NodeJS.

Node.js Resources

Official Node.js Site

Node.js Tutorial

Node.js Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *