markjgsmith

Linkblog

A guide to reading and writing Node.js streams - Great tutorial by Matteo Collina that looks at how to use Streams in NodeJS. The article focusses on readable and writable streams, backpressure, handling errors, and advanced techniques like async iterators. The render pipelines concept I introduced to my static site generator is only partly realised, I only introduced the minimum needed to get the job done. I have partially implemented a more complete version of the feature and it’s crazy how similar in shape it is to the streams examples here, but it just uses the fs module. It would be very cool to explore using streams in the render core, certainly would be a good way to reduce memory consumption, and maybe even give a speed boost. Streams also support HTTP as well as files on the filesystem. Maybe one day ... :) blog.platformatic.dev #

For enquiries about my consulting, development, training and writing services, aswell as sponsorship opportunities contact me directly via email. More details about me here.