The most important discovery for me is the following: When we think about event loop, we are trying to define one point of view and order things depending on that, but in fact, this diagram shows, that there are at least two of them. Let me explain what I mean: So from the application point of view, your loop starts from TIMERS step, it executes Timers, Pending callbacks, idle + prepare, and only after that your app is ready for POLL But when we think on request processing level, our event loop first step is POLL and moves forward to check and close callbacks, then loops back to timers. That's why we think that timers are under prioritized by the system, because our point of view in most cases stands on poll stage. And from that point of view that's correct, your set timeout will be handled later. Close callbacks, per my understanding needs more examples. Because how the regular http request works? We open connection, and then we close the http connection, not only socket connection. So by keeping that in mind, we can understand that our timers will execute when we already sent response and closed the connection. P.S. Guys, this is how I understand this, and my thoughts can be mistaken, so please improve me if I'm wrong.
every time I look such videos, I discover more and more, and understanding it better and better. so thanks a lot for your work!!! really best explanation maybe "on the market"
When you dropped a video on Event Driven Architecture I asked for implementation some of its parts please do consider my request make something on implementation of EDA
wow. I read the official doc and was perplexing for an hour straight. and you smashed it in 10 mins. just wow. you've earn 1 more sub.
Happy to hear that! 😊
The most important discovery for me is the following:
When we think about event loop, we are trying to define one point of view and order things depending on that, but in fact, this diagram shows, that there are at least two of them.
Let me explain what I mean:
So from the application point of view, your loop starts from TIMERS step, it executes Timers, Pending callbacks, idle + prepare, and only after that your app is ready for POLL
But when we think on request processing level, our event loop first step is POLL and moves forward to check and close callbacks, then loops back to timers.
That's why we think that timers are under prioritized by the system, because our point of view in most cases stands on poll stage. And from that point of view that's correct, your set timeout will be handled later.
Close callbacks, per my understanding needs more examples. Because how the regular http request works? We open connection, and then we close the http connection, not only socket connection. So by keeping that in mind, we can understand that our timers will execute when we already sent response and closed the connection.
P.S. Guys, this is how I understand this, and my thoughts can be mistaken, so please improve me if I'm wrong.
every time I look such videos, I discover more and more, and understanding it better and better. so thanks a lot for your work!!! really best explanation maybe "on the market"
Thanks a lot, amigo! ❤️
Great explaining try to make a video on worker threads and clusters too that can help to understand use of multi core for optimization
Already have, check out the Node.js playlist 😉
When you dropped a video on Event Driven Architecture I asked for implementation some of its parts please do consider my request make something on implementation of EDA
Bruh your voice 😮💨🔥
Thank you!
So cool!
great content
Thanks❤
Thank you
Under the Huth 😁