In synchronous I/O, the thread (a thread is just a sequence of instructions) will wait till the entire operation is finished. On the other hand, in Asynchronous I/O, the line does not wait during the operations. The operation will run in the background, and it will be called when it is finished. The Asynchronous I/O feature enables an application to have more CPU time available to perform other processing while the I/O is taking place.
LIBUV
LIBUV is another significant dependency on node.js. It gives node.js access to the machine operating system, networking, file system, and more. LIBUV is an open-source library with a strong focus on asynchronous I/O (Input-output). LIBUV is written in C programming language. Apart from focusing on the asynchronous I/O, LIBUV also implements two essential features: event loop and thread pool.
LIBUV is another significant dependency on node.js. It gives node.js access to the machine operating system, networking, file system, and more. LIBUV is an open-source library with a strong focus on asynchronous I/O (Input-output). LIBUV is written in C programming language. Apart from focusing on the asynchronous I/O, LIBUV also implements two essential features: event loop and thread pool.
You should remember that the Event Loop is the heart of Node js, which makes the node completely different from other backend languages.
Other Important Libraries
The most critical libraries for Node.js are LIBUV and V8. However, the node is not only based on V8 and LIBUV but also on a few other libraries like HTTP parser for parsing HTTP, C-ARES for DNS queries, OpenSSL for cryptography, and Zlib for file compression. When all of these components come together ideally, we end up with Node.JS ready to be used on the server-side for all of our applications.
The most critical libraries for Node.js are LIBUV and V8. However, the node is not only based on V8 and LIBUV but also on a few other libraries like HTTP parser for parsing HTTP, C-ARES for DNS queries, OpenSSL for cryptography, and Zlib for file compression. When all of these components come together ideally, we end up with Node.JS ready to be used on the server-side for all of our applications.
Event-Driven Architecture
Most of the node's core modules, like HTTP File System, are built around an event-driven architecture. The concept is quite simple. In node, there are particular objects called event emitters that emit named events as soon as something important happens in the app, like a request hitting server or a file finishing to read. Event listeners then pick up these events that we developers set up, which will fire off functions(callback functions) attached to each listener.
Most of the node's core modules, like HTTP File System, are built around an event-driven architecture. The concept is quite simple. In node, there are particular objects called event emitters that emit named events as soon as something important happens in the app, like a request hitting server or a file finishing to read. Event listeners then pick up these events that we developers set up, which will fire off functions(callback functions) attached to each listener.