I have recently found that this version of one of my best talks ever “Stream Into the Future” has almost 30 thousands view on youtube! I’m sincerely impressed, thank you all for watching it. If you have not watched this, it’s a really instructive talk on the “future” of Node.js streams at the time… however we have mostly implement all of what I mentioned in the talk, I guess I should do a new stream talk! Would you be interested?
One important fix we shipped last week is within sonic-boom, a fundamental dependency of pino. In order to provide the throughput increase as well as the development experience everybody relies upon, I created sonic-boom as a stream replacement from Node.js core process.stdout. sonic-boom offered two modes of operation, synchronous and asynchronous. In synchronous mode, all strings written are immediately flushed to the operating system buffers - the throughput of this solution is entirely dependent on the destination performance. In asynchronous mode, strings are buffered until the previous one finishes. Unfortunately due to some other limitations (too long for this newsletter), we have to limit the maximum chunk size to 16MB. The changes Robert Nagi and myself did made sure that a string is never split across two writes, making asynchronous logging safer in case multiple processes are writing to the same destination concurrently. The day were pino ships asynchronous logging by default is coming - it might happen as soon v8, likely a year or so from now.