I am learning through the architecture of Node.js. I have following questions.
Go through these points:-
V8 engine is the engine for coaches of train. It has certain responsibilites including providing event loop to run asynchronous task.
Event loop is the core to perform async tasks. As soon as,C++ Web APIs finish a function(task) , callback is called.It is moved to event queue and waits untill stack becomes empty. Thus, event queue is part of event loop and are generated by event loop.
V8 engine is used to execute the javascript code we write and libuv is a lbrary used to provide multi threading feature in Nodejs to execute long running processes.
Event loop is single threaded but Nodejs is not single threaded as it has a libuv threadpool in its runtime which is responsible for multi threading.
Browsers APIs also provide event loop.