Node JS Tutorial for Beginners #13 - Streams and Buffers

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

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

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

    Not only did I learn about buffers & streams --- I learned a new word: TRAVELATOR (0:53). Here in America, we just call it "That thing at the airport that you stand on and it does all your walking for you."

    • @matheusbnedel
      @matheusbnedel 6 ปีที่แล้ว +15

      you mean a flat escalator

    • @jeremiahglover7562
      @jeremiahglover7562 6 ปีที่แล้ว +12

      Moving walkway.

    • @ShaharHarshuv
      @ShaharHarshuv 6 ปีที่แล้ว +6

      Brilliant. like an elevator, but for traveling instead of elevating.

    • @newuser689
      @newuser689 6 ปีที่แล้ว +9

      or horizontal escalator which is a weird oxymoron

    • @JohnWilson-mk2jp
      @JohnWilson-mk2jp 5 ปีที่แล้ว +8

      Or... when they are used to move things rather than people... a conveyor belt.

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

    This was very well thought out stream explanation. I appreciate you putting time into showing a visual example and creating a story around it

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

      Thank you, glad you like :)

  • @TruthSeekerClub
    @TruthSeekerClub 5 ปีที่แล้ว +16

    I almost cried doing my research to understand this topic xD
    ...
    Advice to who is watching.
    He is providing good explination to the topic.. Never miss a word specially those who is details oriented.

  • @brokenblades1759
    @brokenblades1759 7 ปีที่แล้ว +86

    A `Stream` is just that. Suppose you are filling a pool (transferring a file). It will take a LONG time for the kids (user) to play (get it) if you wait until the pool is full (transfer is complete). A stream allows the kids to play before the pool is full by allowing them to bathe (access) in the water (the data) as it flows (is being transferred).
    A `Buffer` You can think of a buffer as a bucket of water, passing smaller bits of water (data) at a time. Once a bucket is full it goes from our water source (file in the server) to the pool (client) to be used by the kids (user).

  • @YosepRA
    @YosepRA 3 ปีที่แล้ว +4

    Timeless explanation. Simple, concise, and fun. It unlocks a few doors of hypothesis on my rough understanding of streams.

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

    I'm not even learning nodejs, but this is one of the best video explaining streams and buffers

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

    This tutorial series is great. Thanks for taking the time to make this. You rule. The people that dislike these videos must be mad jelly or just cray af.

  • @janedoe8901
    @janedoe8901 5 ปีที่แล้ว

    This is the best tutorial series I've ever used, thanks! Chopping every topic into a 5min segment really helps keep my attention span alive

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

    Your story together with visual explanation of Streams and Buffer made it so clear! Subscribed!

  • @ooodeii
    @ooodeii 5 ปีที่แล้ว

    This is the first channel i search for as soon i have anything new I wanna learn

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

      Thanks Uday :)

  • @rexmane11
    @rexmane11 7 ปีที่แล้ว +25

    Woow, I now understand what goes on behind the scenes when youtube buffers, thank you! new subscriber here :)

    • @NetNinja
      @NetNinja  7 ปีที่แล้ว

      Awesome, thanks :)

    • @nabeeltech7885
      @nabeeltech7885 6 ปีที่แล้ว

      bro i cant install mongo db in win32 it says different processor can u please guide how?

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

    The example made so much sense! thumbs up!

  • @gamingparlour1732
    @gamingparlour1732 5 ปีที่แล้ว +3

    legend says the kid has become ninja and he is making other kids achieve their candies

  • @uwemneku1917
    @uwemneku1917 2 ปีที่แล้ว

    I've been trying to understand this concept for as long as possible and this video really helped me understand it. And the icing on the cake is that with the illustration, this is something I'll never forget. Thank you 😊

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

    Your explanations are amazing: Clear, short, pictorial, rememberable!

  • @TheGuroguro12
    @TheGuroguro12 7 ปีที่แล้ว +3

    Thank you so much, u r unbelievably good teacher, I think Stanford is going to be happy to have u as a teacher. seriously.!!

    • @NetNinja
      @NetNinja  7 ปีที่แล้ว

      +Guram Kankava :). Thanks so much!

  • @clublati
    @clublati 7 ปีที่แล้ว

    That moment when you said 'streaming video' everything made sense to me. Thanks for the great video!

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

    I can say this was the best explaining and visualizing i have seen in a while
    Thank you so much ,really ❤

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

    wow.. i was really ready for that story.
    made my life easier, thank you so much!

  • @Mathspy
    @Mathspy 7 ปีที่แล้ว +4

    Truly the legacy of the Ninjas lives on

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

      Haha indeed they do! (|:|)-\

  • @Zenzodiene
    @Zenzodiene 8 ปีที่แล้ว

    Awesome explanation! I loved the story! Better than all those theoretical explanations you can find on the internet!

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

    Subscribed.
    Great diagrams, makes it easy to understand

  • @cristhianjesus8978
    @cristhianjesus8978 2 ปีที่แล้ว

    Thank you for making this topic so simple to understand! AMAZING!

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

    I like how you break up theory and demo into separate videos. It's like a node.js travelator.

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

    What a great explanation !! Can you please make more videos on nodejs ?
    It would be really appreciated if you can create videos for database connectivity.
    Thanks a lot !!

  • @wheresmydrink420
    @wheresmydrink420 4 ปีที่แล้ว

    I'm not sure what Node JS is, but I am leaning Java right now and no one explains streams and buffers well, so thank you.

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

    Brilliant explanation thanks

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

    Love the story! Hope it all worked out for the forest man.

    • @paulbrugger9610
      @paulbrugger9610 5 ปีที่แล้ว

      It didn't. As he said at 0:41 the kids were real sods.

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

    Imagine how hard my life would have been without this, needing to transfer 100s of large video files from the browser, to a small k8s pod with 1 GB memory, to an SMB server (🤮).
    Thanks for the video. Great explanation.

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

      Glad I could help! :) thanks for watching

  • @extraclassic
    @extraclassic 6 ปีที่แล้ว

    The best tutorial when I ever seen. Great job

  • @jorims8537
    @jorims8537 2 ปีที่แล้ว

    perfect example. got it right away! thanks :)

  • @koustubhmuktibodh4901
    @koustubhmuktibodh4901 6 ปีที่แล้ว

    What a perfect explanations. Hope such should be of Angular 2 also. There are no good tutorials on angular 2

  • @grasplearning4597
    @grasplearning4597 3 ปีที่แล้ว

    absolutely amazing explanation
    loved It ♥♥♥

  • @sorover111
    @sorover111 4 ปีที่แล้ว

    This is awesome work man.. keep it up!

  • @afsarzan
    @afsarzan 6 ปีที่แล้ว

    I am his big fan. what a beautiful explanation.

  • @ziga328
    @ziga328 6 ปีที่แล้ว

    You explain things so well, thank you for a great video and series!

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

    Give that man a medal

  • @aryakabiri7272
    @aryakabiri7272 3 ปีที่แล้ว

    great explanation, thank you so much

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

    Gr8 tutorial on booffers

  • @gaganry
    @gaganry 6 ปีที่แล้ว

    Well that was a heart touching story... They should make a movie out of it...

  • @pasizdobrekuce
    @pasizdobrekuce 6 ปีที่แล้ว

    That is absolutely brilliant. Thank you.

  • @kyrylobuchynskyi7227
    @kyrylobuchynskyi7227 5 ปีที่แล้ว

    Excellent explanation!

  • @infotainment999
    @infotainment999 7 ปีที่แล้ว

    Learned something new! YESSS! Ty Ninja

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

    Good explanation.

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

      Glad it was helpful!

  • @raihanahmed8271
    @raihanahmed8271 3 ปีที่แล้ว

    Excellent. Thanks a lot.

  • @jurajzovinec
    @jurajzovinec 4 ปีที่แล้ว

    Net Ninja: "I ve got true story i wanna tell you".
    Me: Started to listening more carefuly.
    Net Ninja: "Guy who lived in the woods, one day he came across this huge NODE JS candy rock".
    Me: Noding my head as a sign of believeness to this epic story.
    LOL everything ninja says I want to understand eventhough I know it is nonsense ! Brilliant teacher !

  • @irfanbabar8424
    @irfanbabar8424 7 ปีที่แล้ว

    brilliant explanation

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

    What 's the difference bitween this and the TCP mentioned at tuto#11 ??

  • @mayur_madhwani03
    @mayur_madhwani03 2 ปีที่แล้ว

    Thanks for the video man

    • @NetNinja
      @NetNinja  2 ปีที่แล้ว

      No problem 👍

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

    Very Good Teacher ☺♥ :)

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

    Thank you so much for this video!

  • @stefanomartell8413
    @stefanomartell8413 5 ปีที่แล้ว

    Good and simple explanation. Quick question: how can you generate a pdf with Node.js and Buffers? I want to generate the pdf in the server then pass it to the client and open the newly generated pdf in a new window. Thanks for your help

  • @eduardomacedo2504
    @eduardomacedo2504 7 ปีที่แล้ว

    Amazing video! Subscribed!

  • @TheDevOpsEngineer
    @TheDevOpsEngineer 8 ปีที่แล้ว

    THANKS YOU SIR!! You are amazing!!!

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

    Excellent! Thank you..

    • @NetNinja
      @NetNinja  7 ปีที่แล้ว

      Thanks so much :)

  • @bisahealth3783
    @bisahealth3783 5 ปีที่แล้ว

    Got a serious question with regards to live stream, is it possible to stream a file such that when a new client connects, the client starts streaming from the current position of the file instead of starting from beginning?

  • @srimalnishantha6700
    @srimalnishantha6700 7 ปีที่แล้ว

    Very useful. Thanks.

  • @the_real_vdegenne
    @the_real_vdegenne 7 ปีที่แล้ว

    thanks so much, the story is pretty neat lol

  • @bryanurizar
    @bryanurizar 4 ปีที่แล้ว

    Does that mean when we see a video buffer right at the start that we haven't received the first pack/chunk of data?

  • @tuyishime2501
    @tuyishime2501 4 ปีที่แล้ว

    i like the way he pronounces buffer, custom,chunk

  • @VelizFrancia2012
    @VelizFrancia2012 5 ปีที่แล้ว

    Is there any way to request a video (hosted in firebase) and create a blob object with the data requested?

  • @sanjitraman
    @sanjitraman 5 ปีที่แล้ว

    this is brilliant!

  • @TheFRspinner
    @TheFRspinner 8 ปีที่แล้ว

    Hi, may I know which package you installed in order to get the nodejs autocomplete?

  • @thriftsimple561
    @thriftsimple561 6 ปีที่แล้ว

    Did you say "travelator"? I'm guessing that's Brit speak for conveyor belt? :-P Awesome tutorial! Thanks!

  • @elinriahi7969
    @elinriahi7969 7 ปีที่แล้ว

    excellent , thanks very much

  • @blazingbane5565
    @blazingbane5565 5 ปีที่แล้ว

    What is the difference between buffet in stream and packets!
    Even packets stores small data

  • @george4746
    @george4746 7 ปีที่แล้ว

    by the way what software are you using for presentation ?

  • @Nlyf11
    @Nlyf11 8 ปีที่แล้ว

    Which theme do you use man?
    Been searching for hours. :=

  • @siddharthasoma6983
    @siddharthasoma6983 6 ปีที่แล้ว

    Best!!🙌🙌😁

  • @FarukShaikh12
    @FarukShaikh12 5 ปีที่แล้ว

    Hi Net ninja awesome explanation could you please help me out for a real world example for streaming apart from videos streaming :)

  • @melsaied101
    @melsaied101 3 ปีที่แล้ว

    Thank you

  • @MathGarb
    @MathGarb 8 ปีที่แล้ว

    Love the vids

  • @zeyadyousef3606
    @zeyadyousef3606 4 ปีที่แล้ว

    is this avaible with Django?

  • @lucianacarlacastrosilva8311
    @lucianacarlacastrosilva8311 6 ปีที่แล้ว

    Beautifull!!

  • @keivansf3459
    @keivansf3459 2 ปีที่แล้ว

    Amazing

  • @GreggRoberts
    @GreggRoberts 7 ปีที่แล้ว

    Crikey I missed a bunch of videos. The auto play was on and I had to go outside so now I can't remember where I was lol

  • @AGriffith
    @AGriffith 3 ปีที่แล้ว

    i honestly don't see why this would help in node js, I mean, I've seen some people doing res.write(chunk) and at the end they do res.end(), so... whats the point there if the answer will only arrive to the user until res.end() is executed, makes no sense to me

  • @davoodazadin948
    @davoodazadin948 4 ปีที่แล้ว

    Hello , i tried your code and some other guys code but i still cant do this 😔: please help , So
    I splited a file using split command in linux now i have 10 small files and i want to give the names of these small files to the nodejs script so i can send the original file using these small files but the user must not receive multiple files insted he must receive only one file , but every code i tried closed the stream after the some files have been sent . 🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔, to be honest iam new to Nodejs and i kind of disliked it help me get my trust back , Thanks in advanced

  • @ahmedhussein8177
    @ahmedhussein8177 6 ปีที่แล้ว

    Would you please create RxJS course!!

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

    thanks

  • @EverlastingUniverse
    @EverlastingUniverse 7 ปีที่แล้ว

    I liked the Story!!! and video . Can I get some candy too :-)

  • @martinschukwuma8947
    @martinschukwuma8947 3 ปีที่แล้ว

    Nice

  • @danldg9052
    @danldg9052 7 ปีที่แล้ว

    For a moment I thought I am in wrong tutorial. Good example though.

  • @ivandrofly
    @ivandrofly 7 ปีที่แล้ว

    Very conscienceconscience :)

  • @pman-codes
    @pman-codes 6 ปีที่แล้ว

    This is not nodejs streams and buffers this is just explanation for what streams and buffers mean. not specific to node. was expecting that.

  • @Uthael_Kileanea
    @Uthael_Kileanea 2 ปีที่แล้ว

    "True story", you say? Well, it IS on TH-cam so it must be true.

  • @Adhithya2003
    @Adhithya2003 3 ปีที่แล้ว

    You sound somewhat like Daily dose of internet.

  • @catalinim4227
    @catalinim4227 6 ปีที่แล้ว

    why not take the kids to the rock... ?

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

      they were too lazy to move.

  • @monesulhaque2877
    @monesulhaque2877 8 ปีที่แล้ว

    rock eater kid :P

  • @johnpzaccari
    @johnpzaccari 5 ปีที่แล้ว

    ...... still hard

  • @rushwaa1399
    @rushwaa1399 4 ปีที่แล้ว

    Why do u use hard british accent?? There are many indians there who watch your videos and try to grasp the precious knowledge???

  • @KRameezAhsan
    @KRameezAhsan 4 ปีที่แล้ว

    savage kids eating nodejs rocks..

  • @probinebusiness4367
    @probinebusiness4367 8 ปีที่แล้ว

    so much talk

  • @TheMobiusBR
    @TheMobiusBR 5 ปีที่แล้ว

    boofer

  • @cryptoboy1461
    @cryptoboy1461 5 ปีที่แล้ว

    The example made so much sense! thumbs up!

  • @louismefor9539
    @louismefor9539 5 ปีที่แล้ว

    Got a serious question with regards to live stream, is it possible to stream a file such that when a new client connects, the client starts streaming from the current position of the file instead of starting from beginning?

  • @ninjarogue
    @ninjarogue 3 ปีที่แล้ว

    excellent thank you!

    • @ninjarogue
      @ninjarogue 3 ปีที่แล้ว

      are buffers and packets the same thing?