Stream into the Future
summary
Node streams gain concrete features: Node 10 ships experimental async iterators, Node 12 unflags them and adds readable.from, letting code consume streams with for await and process huge files in constant memory. Use pipeline (or pump) to avoid leaked file descriptors; the async-iterator implementation preserves backpressure and shows no performance penalty. Missing pieces include a Transform.from equivalent and a clean writable iterator protocol; prototypes and demos compile and run.
AI-written summary · about
chapters (19)
- 0:00Stream into the Future @matteocollina
- 1:09What is a Stream?
- 1:21A stream is like an Array
- 2:05Who understand Node.js Streams anyway?
- 3:34Handling backpressure is hard.
- 5:24Error handling is complex
- 6:51All the best features of Node.js relies on Streams
- 8:24do NOT work well with
- 8:34Changing the behavior of Node.js streams will break everybody
- 9:56Async Iterator
- 19:24Demo!
- 21:02What about Writable?
- 23:18How does it all work?
- 23:35The AsyncIterator protocol
- 25:18wrap the 'readable' event!
- 27:41performance penalty in using AsyncIterators with streams!
- 28:07WHATWG VS Node.js streams
- 29:44WHATWG streams are
- 30:34of adding them to Node.js core is ecosystem compatibility.
related talks
34mStream into the Future
25mAsync Iterators: A New Future for Streams
28mThe good, the bad and the ugly of nodejs streams
23mAsync Iterators: a new future for streams
31mBelieve in Streams
35mStreams: The data structure we need
26mOMG Streams!
24mGenerating async iterators is ekstreamly easy, I Promise ;)
