Node.js Event Loop Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ย. 2024

ความคิดเห็น • 15

  • @rushingwp
    @rushingwp 2 หลายเดือนก่อน +2

    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.

  • @tigranbalayan6521
    @tigranbalayan6521 หลายเดือนก่อน

    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.

  • @olehmikadze3653
    @olehmikadze3653 3 หลายเดือนก่อน +3

    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"

  • @vinayakporwal9885
    @vinayakporwal9885 3 หลายเดือนก่อน

    Great explaining try to make a video on worker threads and clusters too that can help to understand use of multi core for optimization

  • @prashlovessamosa
    @prashlovessamosa 3 หลายเดือนก่อน

    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

  • @spartondon3591
    @spartondon3591 2 หลายเดือนก่อน

    Bruh your voice 😮‍💨🔥

  • @julio3592
    @julio3592 2 หลายเดือนก่อน

    Thank you!

  • @MusaAytmamatov
    @MusaAytmamatov 2 หลายเดือนก่อน

    So cool!

  • @NguyenNgoc-b3e
    @NguyenNgoc-b3e 3 หลายเดือนก่อน

    great content

  • @yadneshkhode3091
    @yadneshkhode3091 3 หลายเดือนก่อน

    Thanks❤

  • @TheAbiGeorge
    @TheAbiGeorge 3 หลายเดือนก่อน

    Thank you

  • @axel_huth
    @axel_huth 3 หลายเดือนก่อน

    Under the Huth 😁