InterviewSolution
| 1. |
What do you mean by libuv in Node.js? |
|
Answer» libuv is a fabulous asynchronous IO library. It has a high productive event loop, and additionally has a separate answer for io blocking activity. It has an interior laborer thread pool for io blocking operation(E.g. submit io blocking work through uv_queue_work). So it accomplishes incredible execution by consolidating both asynchronous event loops and thread pools for non-io blocking and io blocking activity. It is a decent DECISION for superior server. If the synchronous thread pool model is what you are used to on an everyday basis, you may find the asynchronous model somewhat hard, particularly when you have to decide when is the best time to discharge the "HANDLES". If you do not get that RIGHT, libuv will crash and make your troubleshooting difficult. libuv is a Cross-platform I/O abstraction library that supports asynchronous I/O based on event loops.It is written in C and released under the MIT Licence. libuv support Windows IOCP, epoll(4), kqueue(2), and Solaris event ports. Initially, it was DESIGNED for Node.js but later it is also used by other software projects. Reference : https://en.wikipedia.org/wiki/Libuv |
|