Introduction to Node.js

Understanding Node.js

Node.js is Ryan Dahl’s platform for running JavaScript-based web applications which was introduced in 2009. With this platform, you can run JavaScript from the server side. In addition, Node.js also has its own server library so you don’t need to use web server programs like Nginx and Apache.

How Node.js works

Node.js works with the concept of non-blocking and single-threaded. To understand the meaning of these two concepts, consider the explanation in this section. Take program A as an example. This program works with the concept of blocking and multi-threaded. In its performance, program A’s algorithm consists of several processes. Due to its blocking nature, the program algorithm will not continue until one process has not been completed. On the other hand, program B is non-blocking and single-threaded. Programs B and A have the same algorithm. However, the performance of program B will not stop at one process if the next process does not require the output of the previous process. This is what is meant by the concept of non-blocking. In addition, program B only allocates threads to the active process. In program A, threads are assigned to all processes, both active and not. By looking at this context, you can understand that program B, which is non-blocking and single-threaded, can work more efficiently and use less resources than program A.

            Examples of websites and applications using Node.js

                Sites and applications that use Node.js include:

  • Netflix
  • Linkedln
  • Medium

The need for digital IT is needed in daily activities, Bead IT Consultant is the right choice as your partner, visit our website by clicking this link: www.beadgroup.com