NodeJS Architecture - I/O

แชร์
ฝัง

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

  • @dog4ik
    @dog4ik ปีที่แล้ว +38

    I was always wondering how single threaded js backends can accept so many concurrent connections. Great article!

    • @333ruka
      @333ruka ปีที่แล้ว +3

      remember event loop ?

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

    what i picked. we do thread pooling for I/O to keep the loop busy & make a callback when we have data ready (os cached data)

  • @wrlee
    @wrlee ปีที่แล้ว +2

    The definition of "blocking" is not simply semantics, it's a matter of stratifying the kinds of blocking you are talking about. Simply stated, blocking is when the application's execution is waiting for something to happen. Waiting for the kernel to transfer a buffer to app/user space is quite different than waiting for data to appear on a socket, but both are "blocking," at different _layers_-the former is more local while the later is dependent on external activity. We might even describe the wait for a CPU instruction to complete to be blocking-a hyper-local form of blocking. So we can analyze blocking by looking at the system architecture and what the application is waiting on: user, internet network (and other non-deterministic external systems), infrastructure architecture (e.g., external storage vs internal storage), operating system, bus architecture, CPU. The solution for mitigating blocking effects on applications depends on the solutions to circumventing delays between and within those layers.

  • @biplobmanna
    @biplobmanna ปีที่แล้ว +2

    Very informative, but now I have more questions about how the underlying syscalls work. Time to dive into the rabbit hole.

  • @Forest_Abby
    @Forest_Abby 5 หลายเดือนก่อน +1

    Hi mate, nice video! It makes things clearer and reveals the magic behind the scenes.

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

    Thanks. I taken your udemy course. Excellent discussion on database.. Now onward u you are a role model related to software area

  • @elakstein
    @elakstein ปีที่แล้ว +1

    If you are doing cpu intensive task then it will block other tasks as everything is running on a single thread.
    Let's say you do a math heavy calculation and it takes 3 seconds to complete. Then your application will be blocked for those 3 seconds and it won't be able to do anything else.
    In cases like this, multi threaded application will do better, as these type of computation you can do in a separate thread.

  • @sandeepparmar3113
    @sandeepparmar3113 ปีที่แล้ว

    Really Intringing , Changed my perspective of NodeJS. And as alwyas great content.

  • @abbasramees4238
    @abbasramees4238 ปีที่แล้ว +1

    I read that async operations like network request and async file reading are executed once the stack is empty, so, until then, where are these async operations stored? did Node use any queue data structure for that

  • @timibolu
    @timibolu ปีที่แล้ว

    Thank you very much. This is very valuable information.

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

    good explanation

  • @shivraj1459
    @shivraj1459 ปีที่แล้ว +1

    super helpful following you since I discovered you .Can you please make a video about auth server and resource server relating to your recent linkedIn post?

  • @CamaradaArdi
    @CamaradaArdi ปีที่แล้ว

    Where do the quotes come from? I've done a google search and I got no results aside from your post

  • @nadaquever5161
    @nadaquever5161 ปีที่แล้ว

    tyvm mr. nasser. kickass content

  • @tenthlegionstudios1343
    @tenthlegionstudios1343 ปีที่แล้ว +8

    Great video. A more in depth video on this I found useful was by Kprotty about Zig's IO. He goes super deep into all of this, and does an iceberg on concurrent models and IO. Very cool. ScyllaDB is at the bottom of this iceberg. It also goes in depth into rust tokio and GOs IO model. And it expands a lot on IOuring. Also Bun (competitor to node) basically just uses KProttys implementation of IO to greatly outperform node. Bun uses zig under the hood and is basically rewriting the parts of node that interact with the OS kernel. Link Here: th-cam.com/video/Ul8OO4vQMTw/w-d-xo.html

    • @biplobmanna
      @biplobmanna ปีที่แล้ว +1

      Can you share the link?

    • @tenthlegionstudios1343
      @tenthlegionstudios1343 ปีที่แล้ว

      @@biplobmanna th-cam.com/video/Ul8OO4vQMTw/w-d-xo.html&ab_channel=ZigSHOWTIME

    • @aadhinana
      @aadhinana ปีที่แล้ว

      th-cam.com/video/Ul8OO4vQMTw/w-d-xo.html

    • @eldhoabraham8716
      @eldhoabraham8716 ปีที่แล้ว

      Please share link

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

    Good stuff.

  • @aliadel1723
    @aliadel1723 ปีที่แล้ว

    Node can be multithreaded with the worker thread. or am I wrong?

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

      for very simple compute, it is single-threaded. for async io / dns etc mentioned in this video, nodejs is multi threaded

  • @IgorRoztr
    @IgorRoztr ปีที่แล้ว

    Love these deeep dives ;)

  • @isurucumaranathunga
    @isurucumaranathunga ปีที่แล้ว

    Really Really Really appreciate your effort and thank you so much for this valuable content Hussein. I love you content so much. Hussein what about the Vert.x library in JAVA. It is also using this asynchronous processing using a concept called verticles and event bus. I highly appreciate if you could do a content on that also. Looking forward for another great content like this. Thanks

  • @mahedihassanshawon4821
    @mahedihassanshawon4821 ปีที่แล้ว

    Thanks! for these contents

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

    Great