View profile

Adventures in Nodeland by Matteo Collina - Issue #2

Matteo Collina
Matteo Collina
Hi Everyone! I’ve started a newsletter to share my thoughts on technology, the advancements of Node.js and to keep all of you up-to-date of what I’m working on. This newsletter might be weekly, biweekly or monthly… we’ll see how it evolves in the coming months.

Matteo Collina
If you are the CEO of a company and you complain that @nodejs (or any other Open Source project) is lacking a certain feature, you are implicitly saying that you do not want to allocate any budget to the maintenance of a key piece of the platform you rely on. You should do better
My usual/weekly rant about companies not wanting to contribute to Node.js continues. Node.js does not have a company behind it, but it’s volunteer-based from interested companies. There is no “Node.js product” to buy. If you are a company and would like to allocate either one of your engineers (even part time) or some funds, feel free to contact me.
I’ve recently been fascinated by the possibilities of WebAssembly and this week and using it inside my projects is starting to become a go-to strategy to increase performance. What do you think of AssemblyScript?
As a bonus, calling into WASM is going to get faster in V8 v9.0!
V8
🔥 What’s new in V8 v9.0?

RegExp match indices, faster super property access, inlined JS-to-Wasm calls and more!

https://t.co/iYTOKp8vXE
Did you know...
Did you know that when you create an Error in V8/Node.js/Chrome, all the closures are retained until .stack is called? If you end up caching a promise that could potentially error, make sure to call .stack - otherwise it could cause a leak. See https://bugs.chromium.org/p/v8/issues/detail?id=4714 and https://bugs.chromium.org/p/v8/issues/detail?id=2340 for more details.
Upcoming Talk on Redis Autopipelining
Matteo Collina
What's the difference in enabling autoPipelining in @nodejs ioredis? 39k req/s vs 23 k req/s on my system. https://t.co/PuvHLogruO
I have been preparing a new talk on the concept of Auto Pipelining which I prototyped in https://github.com/mcollina/ioredis-auto-pipeline and my colleague Paolo Insogna added to ioredis in https://github.com/luin/ioredis/pull/1201. You can see it explained in the following picture:
How auto pipeline works
How auto pipeline works
Fastify
I fixed a nasty bug in Fastify where a developer error would have led to a swallowed exception and an end user timeout: https://github.com/fastify/fastify/pull/2942. Lesson learned in OSS: “if a developer could make a mistake, they will. Code defensively.” This fix will be released soon!
As something new, you can check out the new release of fastify-jwt and a module called get-jwks that we have been working on at NearForm.
fastify-jwt and get-jwks in action
fastify-jwt and get-jwks in action
I would like to thank Simon for this nice video on Fastify!
Talk: Make the most of modern JavaScript with Fastify (2021-02-25) – Simon Plenderleith
fastify-multipart got a new release (v4.0.3), improving the test coverage.
Module of the week!
A bloom filter is a probabilistic data structure: after training with a set of data, it can tell if an element is definitely not part of that set, or possibly so. I had some fun with https://www.npmjs.com/package/bloom-filters and it works wonders. I used this to speed up a proof-of-concept by 10x.
The bloom-filters module
The bloom-filters module
Conferences
This week I will be speaking at two events! Next Wednesday I will be speaking at https://cityjsconf.org/ about Undici, new HTTP client for Node.js. On Thursday, I’ll be keynoting at Codemotion Italy with a title “Be the Glue”!
CityJS Conference 2021, London, 26 March 2021
Thanks!
I would like to thank you all for the warm support of this newsletter! Thank you all. As usual, let me know if there are things you’d like us to improve!
Did you enjoy this issue? Yes No
Matteo Collina
Matteo Collina @matteocollina

I write about my journey as a core contributor of Node.js, as an author and a maintainer of many modules - including Fastify and Pino. In addition, I speak at conferences, and I will add links to all my talks in case you missed one.

If you don't want these updates anymore, please unsubscribe here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.