Adventures in Nodeland logo

Adventures in Nodeland

Subscribe
Archives
September 20, 2021

Adventures in Nodeland - Issue #27

Hi Everyone,

Last week I have been busy doing Open Source, leading projects, organizing NodeConf and the Italian NearForm meetup. There are a few new releases to talk about, so let’s dive in…

…litterally! Last weekend a few colleagues at NearForm traveled from all over Italy, France, Portugal and Serbia to Milano Marittima for a retreat! It has been an amazing experience. This is probably the part of of NearForm I missed the most: meeting people from all over the places and spend some quality time with them. If you are interested in participating in the next meetup, check us out at!

Shaping a better world
NearForm is working to shape a better world with open, creative software and we are looking for people to join our team. Contact us for your next career move
www.nearform.com
Shaping a better world
NearForm is working to shape a better world with open, creative software and we are looking for people to join our team. Contact us for your next career move
www.nearform.com

Last but not least, this Wednesday (2021/09/22) I will be speaking at the Red Hat DevNation Day 2021 on “Why Fastify”. Check it out:

DevNation Day 2021 | Red Hat Developer
DevNation Day 2021 | Red Hat Developer
DevNation Day is a free, all-day immersive virtual experience created to bring you the most exciting developer and technology updates. It will cover five topics areas: Kubernetes/OpenShift, Java, Python, and JavaScript. You will hear from Red Hat Developer experts as well as leaders from across a number of companies and industries, including IBM, Oracle, and more. Stay up-to-date on the latest technologies from the comfort of your own desk, and interface with our speakers through polls, chats, and on-stage participation. We look forward to ‘seeing’ you there!
developers.redhat.com

On the 20th of October I will be delivering a Workshop on Fastify. The price is 20€ and it will all go to charity.

NodeConf Remote · Europe's largest Node.js conference
NodeConf Remote brings speakers and devs from across the globe together for 4 full days of talks and workshops centred around the Node.js framework.
www.nodeconfremote.com

Node.js

There is a good & bad news regarding ESM & Node.js core. However I think I need to provide a bit more context before breaking the news. I have always been a critic of the mass-move to ESM as recommended by a few other OSS maintainers as ESM was lacking certain features that we rely on every day while developing Node.js applications: module mocking and tracing / APM. ESM makes module resolution static and deterministic (which is good) but it cannot be altered at runtime and in order to support module mocking, tracing, code coverage and other things you need to install a loader before Node.js starts. This fundamental feature is actively worked on and it is not stable yet: we have just landed a significant breaking change to improve it. We are sorry this will disrupt some of your workflows.

esm: consolidate ESM Loader methods by JakobJingleheimer · Pull Request #37468 · nodejs/node
GeoffreyBooth added a commit that referenced this pull request yesterday
github.com
esm: consolidate ESM Loader methods by JakobJingleheimer · Pull Request #37468 · nodejs/node
GeoffreyBooth added a commit that referenced this pull request yesterday
github.com

We have also released v4.6.0 of Undici last week which includes many fixes and a few new features. Application Performance Monitoring providers are starting to investigate how to support Undici: we added diagnostic_channel support, you can find the docs in https://github.com/nodejs/undici/blob/main/docs/api/DiagnosticsChannel.md.

Release v4.6.0 · nodejs/undici · GitHub
An HTTP/1.1 client, written from scratch for Node.js - Release v4.6.0 · nodejs/undici
github.com
Release v4.6.0 · nodejs/undici · GitHub
An HTTP/1.1 client, written from scratch for Node.js - Release v4.6.0 · nodejs/undici
github.com

Over the weekend I landed a new option to Node.js HTTP/1.1 server to limit the number of maximum connections. This will be useful to help the coordination between the load balancer and Node.js servers to spread the load evenly between all the available peers.

Limit requests per connection by fatal10110 · Pull Request #40082 · nodejs/node · GitHub
Limit requests per connection by fatal10110 · Pull Request #40082 · nodejs/node · GitHub
Trying to close #40071 Still missing tests and docs
github.com

Fastify

Las tweek has seen some activity on Fastify with me releasing v3.21.1, v3.21.2 and v3.21.3 in rapid succession. Check them out.

Release v3.21.1 · fastify/fastify · GitHub
github.com
Release v3.21.1 · fastify/fastify · GitHub
github.com
Release v3.21.2 · fastify/fastify · GitHub
github.com
Release v3.21.3 · fastify/fastify · GitHub
github.com

You can read more about the main change in the two following links, one describing the problem and a small PR describing the solution. They are worthwhile to read to understand more how debug JavaScript performance issues regarding shapes and megamorphic code. Read up:

Are conditionally set decorated properties deoptimized? · Issue #3316 · fastify/fastify · GitHub
Over the past week or so I started to learn how V8 optimizes property access through shapes and inline caches by following the blog post link in the decorators documentation (Shapes and IC + Optimizing Prototypes). After reading this and…
github.com
Are conditionally set decorated properties deoptimized? · Issue #3316 · fastify/fastify · GitHub
Over the past week or so I started to learn how V8 optimizes property access through shapes and inline caches by following the blog post link in the decorators documentation (Shapes and IC + Optimizing Prototypes). After reading this and…
github.com
Enforce the same shapes by mcollina · Pull Request #3317 · fastify/fastify · GitHub
Fixes #3316 Enfore the same shape for: Request Reply
github.com
Enforce the same shapes by mcollina · Pull Request #3317 · fastify/fastify · GitHub
Fixes #3316 Enfore the same shape for: Request Reply
github.com

We also shipped a new features for mercurius-auth to support authorization on type definition inside GraphQL schema.

Release v1.2.0 · mercurius-js/auth
• updated to support directive on type by @dragonfriend0013 in #26 Full Changelog: v1.1.0…v1.2.0
github.com
Release v1.2.0 · mercurius-js/auth
• updated to support directive on type by @dragonfriend0013 in #26 Full Changelog: v1.1.0…v1.2.0
github.com

Pino

Thanks to Igor Savin and the maintainers of colorette, we fixed an old regression in pino-pretty that caused colors to not be rendered in certain cases. Now it’s fixed!

Release v7.0.1 · pinojs/pino-pretty · GitHub
Release v7.0.1 · pinojs/pino-pretty · GitHub
🌲Basic prettifier for Pino log lines. Contribute to pinojs/pino-pretty development by creating an account on GitHub.
github.com

Interesting news

Here are a few articles that sparked some insights, I think you might find them interesting too.

The effects of remote work on collaboration among information workers | Nature Human Behaviour
The coronavirus disease 2019 (COVID-19) pandemic caused a rapid shift to full-time remote work for many information workers. Viewing this shift as a natural experiment in which some workers were already working remotely before the pandemic enables us to separate the effects of firm-wide remote work from other pandemic-related confounding factors. Here, we use rich data on the emails, calendars, instant messages, video/audio calls and workweek hours of 61,182 US Microsoft employees over the first six months of 2020 to estimate the causal effects of firm-wide remote work on collaboration and communication. Our results show that firm-wide remote work caused the collaboration network of workers to become more static and siloed, with fewer bridges between disparate parts. Furthermore, there was a decrease in synchronous communication and an increase in asynchronous communication. Together, these effects may make it harder for employees to acquire and share new information across the network. Using a large dataset of workers’ technology use from before and after the COVID-19 pandemic, Yang et al. find that firm-wide remote work caused the collaboration networks of information workers to become more static and siloed and communication to shift to more asynchronous media.
www.nature.com
The effects of remote work on collaboration among information workers | Nature Human Behaviour
The coronavirus disease 2019 (COVID-19) pandemic caused a rapid shift to full-time remote work for many information workers. Viewing this shift as a natural experiment in which some workers were already working remotely before the pandemic enables us to separate the effects of firm-wide remote work from other pandemic-related confounding factors. Here, we use rich data on the emails, calendars, instant messages, video/audio calls and workweek hours of 61,182 US Microsoft employees over the first six months of 2020 to estimate the causal effects of firm-wide remote work on collaboration and communication. Our results show that firm-wide remote work caused the collaboration network of workers to become more static and siloed, with fewer bridges between disparate parts. Furthermore, there was a decrease in synchronous communication and an increase in asynchronous communication. Together, these effects may make it harder for employees to acquire and share new information across the network. Using a large dataset of workers’ technology use from before and after the COVID-19 pandemic, Yang et al. find that firm-wide remote work caused the collaboration networks of information workers to become more static and siloed and communication to shift to more asynchronous media.
www.nature.com
Cross-Account Container Takeover in Azure Container Instances
This post is also available in: Executive Summary
unit42.paloaltonetworks.com
Cross-Account Container Takeover in Azure Container Instances
This post is also available in: Executive Summary
unit42.paloaltonetworks.com
The Show Must Go On: Securing Netflix Studios At Scale
Written by Jose Fernandez, Arthur Gonigberg, Julia Knecht, and Patrick Thomas In 2017, Netflix Studios was hitting an inflection point from a period of merely rapid growth to the sort of explosive growth that throws “how do we scale?”
netflixtechblog.com
The Show Must Go On: Securing Netflix Studios At Scale
Written by Jose Fernandez, Arthur Gonigberg, Julia Knecht, and Patrick Thomas In 2017, Netflix Studios was hitting an inflection point from a period of merely rapid growth to the sort of explosive growth that throws “how do we scale?”
netflixtechblog.com
Don't miss what's next. Subscribe to Adventures in Nodeland:

GitHub X YouTube LinkedIn