This is easily the best programming video I've ever seen. You took a subtle and tricky concept (one which I suspect most software engineers don't actually understand), and explained it simply enough that a child could understand. Not to mention excellent production values. Super excited to have found this channel, and I can't wait to see what you make next!
Great job One suggestion: try a background video with less volume, no lyrics (human sound), and slower beats. That music is not just supposed to make the viewer excited or attracted, just makes it a lill colorful. Thanks
Just found this video, great work man. My 2 cents: I think the conversation about asynchronousity is incomplete without thinking about how threads and context switching are handled at the OS level. Without the concepts of yielding, interrupts and a priority queue for threads, I was confused for the longest on time on how the computer just magically knows when to switch from one task to another and when it knows that an IO task is complete. I feel like the next step after this video would be to tackle scheduling in OSes because I feel like a lot of programmers on the internet find it to be impenetrable when it's really not that hard!
I agree. I watched the video expecting a more advanced explanation. I'm currently amateurly designing the scheduler of a multi-tasking processor and wanted to learn of current solutions.
Thank you! Really glad I landed on this video, I don't remember the last time someone explained things as simply and effectively as this. Keep up the good work! Will regularly check your channel for any doubts.
Dude amazing video and excellent job on explaining this topic because it was true hassle for me too understand. Just a couple of tips for in the future: 1: Choose a different music with lower BPM and lower it by 20% 2: A better microfoon or remove static noise in post production For the rest killer video!!!
This is the best video I watched regarding the I/O and CPU tasks. The code example cleared many things for me. Thanks a lot man. Please keep making videos on software engineering topics.
It's a great explanation of complex concept. Divinding work time into CPU and IO time is a realy great concept for understanding this. Now I understand why Node.js is so popuar for web development. Thanks!
Your voice is perfect for these videos! You've come so far in the last decade, awesome stuff! Works like clockwork...wink wink nudge nudge. Anyway, I enjoyed this. I'm subscribing and hitting the bell!
First of all, thanks, very good animation. But, it misses an important point. Blocking IO isn't really blocking. Request goes to sleep mode when it waits for IO, giving resources to other threads - if following your analogy, the waiter's soul jumps into another waiter to do stuff, while the first one is waiting (sleeping) for customers to read the menu, etc. And you can have tons of threads to serve as many customers as you can possibly have. However, in reality, there is context switching between threads, and between threads and kernel. And this is what makes this approach slower. This is the most interesting part which I've never seen yet anybody covering in understandable way.
Blocking I/O is blocking in the sense that the thread performing I/O is occupied and can't work on other tasks. Like you said, the thread is sleeping and doesn't take up much compute resources, but it's still occupied. That's why blocking I/O with low thread count causes CPU underutilization and request slowdown, and why as I mention in the video, folks using blocking I/O usually crank up the thread count to compensate, but that has its own drawbacks as you mention.
@@StudyingWithAlex Yes, bascially you described the video and my comment again ;) What I'm saying is that one could think that "hey just increase thread count and no need to care about non blocking io, ugly async programming etc" but increasing thread count creates problems, and that's the most interesting part, because it's exactly the reasoning behind non blocking i/o, but no one can explain it properly in details. I.e. everybody just have to trust that threads have drawbacks, but no exact step by step comparison.
This is the best explanation I've seen on non-blocking I/O. Thank you SOOOO much for this video! It clarified so many questions I had. @4:20 of your video, you listed three examples of I/O (inactive time): - reading from filesystem - making network requests - waiting for time to pass Would executing a long-running database query qualify as a I/O or CPU? The database would be doing all the heavy compute. Would NodeJS be able to move onto other active tasks while the database query is running? Or will a thread be tied to the database query?
This is easily the best programming video I've ever seen. You took a subtle and tricky concept (one which I suspect most software engineers don't actually understand), and explained it simply enough that a child could understand. Not to mention excellent production values. Super excited to have found this channel, and I can't wait to see what you make next!
No need for me to leave a comment, then. You've said it perfectly my friend 👍😁
10000%. Honestly great video - thank you
2:10
Thought you did a fantastic job explaining Non-blocking I/O. I was super bummed when I saw you only had two other videos. Makes some more vids!!!
I will :)
Where did you go? 😢
Seriously, this video should be the must for every beginner learning nodejs. Super important concept, but in super easy words and animations.
Great job
One suggestion: try a background video with less volume, no lyrics (human sound), and slower beats. That music is not just supposed to make the viewer excited or attracted, just makes it a lill colorful. Thanks
Just found this video, great work man.
My 2 cents: I think the conversation about asynchronousity is incomplete without thinking about how threads and context switching are handled at the OS level. Without the concepts of yielding, interrupts and a priority queue for threads, I was confused for the longest on time on how the computer just magically knows when to switch from one task to another and when it knows that an IO task is complete. I feel like the next step after this video would be to tackle scheduling in OSes because I feel like a lot of programmers on the internet find it to be impenetrable when it's really not that hard!
I agree. I watched the video expecting a more advanced explanation. I'm currently amateurly designing the scheduler of a multi-tasking processor and wanted to learn of current solutions.
Great video. Cleared up a lot of confusion regarding how javascript works as a single threaded server. 👍🏼
Glad you liked it!
Great explanation , finally I understood what is non blocking I/O .
🙌
Loved the analogies and animations!
Thank you! Really glad I landed on this video, I don't remember the last time someone explained things as simply and effectively as this. Keep up the good work! Will regularly check your channel for any doubts.
Man that's HUGE, i finally understand this heavy topic as if it was a piece of cake, you're the GOAT ♥♥ Thanks for your effort ♥
This is absolutely the best explanation video about async I've ever seen. Amazing work!
Dude amazing video and excellent job on explaining this topic because it was true hassle for me too understand. Just a couple of tips for in the future:
1: Choose a different music with lower BPM and lower it by 20%
2: A better microfoon or remove static noise in post production
For the rest killer video!!!
This is one of the best explanations of this concept I've ever seen. Well done!
This is the best video I watched regarding the I/O and CPU tasks. The code example cleared many things for me. Thanks a lot man. Please keep making videos on software engineering topics.
It's a great explanation of complex concept. Divinding work time into CPU and IO time is a realy great concept for understanding this. Now I understand why Node.js is so popuar for web development. Thanks!
This is the most crisp and clear explanation for non blocking I/O in layman terms, thanks a lot
Thank you. Almost 10y fiddling with web dev and never bothered to check this, sounds awesome to implement
i think this is the best computer science video ive ever watched with regards to visually understanding due to the graphics
This was super well presented and produced. Keep up the good work!!
This is how the knowledge should be taught. Thanks for sharing
This was super helpful, thank you!
I HAVE NEVER SEEN A BETTER TUTORIAL THAN THIS ONE DUUUUUDDDEEEE, YOU ARE AMAZING!!!
Thank you very much no one explains this topic well, or they don't explain it at all!
Just what I needed. Thanks mehn
Excellent Video! best explanation so far with visual representation.
I usually don't comment. but you really make things very simple to understand. Thank you!
Thanks, all of your video are easily digested! Maybe you can decrease the background music volume to 10% or 20%.
Best explanation I have come accross, on this topic.
Good work, hope you have more similar video.
Absolutely mind-blowing video, hats off to you sir
Fantastic video, Alex. Your channel is VERY underrated.
amazing explanation, I learned redis uses similar model as nodejs, would love your video on that!
wow, each of these is better than the last. Your hard work really shows!!!
Wow! Explanation is so good with the graph.
you make great content, don't stop until the top
This is a treasure! Such a great and simple explanation! Thank you
dude, make more videos! Such high quality stuff 👏
Found this on Reddit. This was really helpful. Thanks 👍
One of the best videos for the concept!!!
Thanks for making this video, it's easy to understand
BEST EXPLANATION OF THE YEAR
Great video I hope you keep them coming
What a wonderful lecture on blocking!!
Thank you so much for this video. Best explanation ever !
You're great at explaining things. It's much clearer to me now. Thanks.
BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!This is cool, well done!
very decently explained. now i understand when to pick a (non-)blocking io framework
Great explanation saw couple of your videos and both are awesome keep up the good work
Super helpful. Thanks
Fantastic video! Thank you Alex
By far the best explanation! Keep up the fine work
Your voice is perfect for these videos! You've come so far in the last decade, awesome stuff! Works like clockwork...wink wink nudge nudge. Anyway, I enjoyed this. I'm subscribing and hitting the bell!
You just explain it so well !
This is exactly the video I need.
Beautifully explained 👌
Very top notch quality!
Keep on doing such kind of videos. That really helped.
Great one! Keep it up Alex.
Excellent explanation!
Great video! The explanation was on-point and easy to understand, and the animations made it easy to follow.
Bravo!!! Excellent explanation!! 👏👏👏
First of all, thanks, very good animation.
But, it misses an important point. Blocking IO isn't really blocking. Request goes to sleep mode when it waits for IO, giving resources to other threads - if following your analogy, the waiter's soul jumps into another waiter to do stuff, while the first one is waiting (sleeping) for customers to read the menu, etc. And you can have tons of threads to serve as many customers as you can possibly have. However, in reality, there is context switching between threads, and between threads and kernel. And this is what makes this approach slower. This is the most interesting part which I've never seen yet anybody covering in understandable way.
Blocking I/O is blocking in the sense that the thread performing I/O is occupied and can't work on other tasks. Like you said, the thread is sleeping and doesn't take up much compute resources, but it's still occupied. That's why blocking I/O with low thread count causes CPU underutilization and request slowdown, and why as I mention in the video, folks using blocking I/O usually crank up the thread count to compensate, but that has its own drawbacks as you mention.
@@StudyingWithAlex Yes, bascially you described the video and my comment again ;) What I'm saying is that one could think that "hey just increase thread count and no need to care about non blocking io, ugly async programming etc" but increasing thread count creates problems, and that's the most interesting part, because it's exactly the reasoning behind non blocking i/o, but no one can explain it properly in details. I.e. everybody just have to trust that threads have drawbacks, but no exact step by step comparison.
I was struggling with this concept for months. you cleared my doubt. thanks man
Great explaination , one of the best videos
I just wanted to break the like button by clicking on it many times.
What a great explaination sir
Thanks so much
thank you soo much for this video brother . love from INDIA
This very well explained the concept with animations and examples. Thanks for the great work
Really great video, but I highly recommend using background music without vocals, or it gets much harder following what you say. 😊😉
Great video because it explains a hard thing simple
This is the best explanation I've seen on non-blocking I/O. Thank you SOOOO much for this video! It clarified so many questions I had.
@4:20 of your video, you listed three examples of I/O (inactive time):
- reading from filesystem
- making network requests
- waiting for time to pass
Would executing a long-running database query qualify as a I/O or CPU? The database would be doing all the heavy compute. Would NodeJS be able to move onto other active tasks while the database query is running? Or will a thread be tied to the database query?
Wow this video was amazing, thank you so much
top notch content. i can already envision this being a big education channel. Keep it up !
Great explanation.
It was super helpful. Thanks much for clarifying.
That's huge, great job, u saved my life.
Best explanation, Thanks for the video
nice explanation! Thank you! Alex!
Great explanation. Simple and precise. Exactly what I needed. Thanks.
This is wonderful!
Thanks so much, this was super helpful!
Thank you so much for this video.
Very well presented. Waiting for more of such content 😊
Incredible video!
Thanks for making it simple and more understandable
Great video. But I thought the video would have more details on how non blocking io itself is implemented in node.
Very informative video, but it would be good to have it w/o music
My gosh, where have you been my whole life.
Really great video!
Wow you did very good on this video! well explained! hope you make many more on all topics lol
Great video!!!!! i loved it so much
Great video and animations, very explicative, thank you
awesome explanation!
Thanks for the video ❤
Great explanation! Thank you.
awesome, well done!
Thanks you so much for the wonderful explanation It really helped me clearing the concept
Thank for sharing
Great video, Thanks
Amazing video !
that's a nice one mate thank you!
Great video man