title: Understanding streams in Node.js
body: <p>I am currently trying to wrap my head around Node's streams. I think I got the idea, but I am not sure. What puzzles me is <a href="https://github.com/dominictarr/event-stream">this quote by Dominic Tarr</a>:</p>
  
  <blockquote>
    <p>Streams are nodes best and most misunderstood idea, [...]</p>
  </blockquote>
  
  <p>As Dominic is definitely a very clever guy (and I guess more clever than me) I am not sure if I really understood streams correctly, or if I missed the point ;-). Hence I would like to explain how I understood streams and ask you for approval or refusal.</p>
  
  <p>My basic understanding of streams is that streams are an abstract wrapper of transporting data from a source to a target. There are readable and writable streams, and duplex stream which are readable and writeable. The idea is to abstract away the actual source or target, so that you can focus on dealing with streams without the need to know what actual resource you are dealing with. You are just accessing a stream for reading and / or writing.</p>
  
  <p><strong>Is my understanding of Node.js streams correct?</strong>  Basically, this is the same idea as it is with streams in .NET (which has been my background for the last 12 years or so).  <strong>How do Node.js streams differ from streams in .NET?</strong></p>
  
  <p>To give an example: It does not matter if I want to read from a file or a network resource, I just abstract the actual source away using a stream and then read from that stream. I could even change the source, but my stream-reading code would still work exactly the same way.  Is this correct?</p>