Projects

OpenJS World: A “Fast” Introduction to Fastify

During OpenJS World, which was held virtually in June 2021, we heard from many inspiring people involved in all areas of technology, including Matteo Collina from Fastify.

OpenJS World: A “Fast” Introduction to Fastify

During OpenJS World, which was held virtually in June 2021, we heard from many inspiring people involved in all areas of technology, including Matteo Collina from Fastify. We hope to highlight speakers in a way that allows for people to hone in on the part of the talk that interests them the most.

Open source projects are as good as their communities. Matteo Collina from NearForm provided the OpenJS World audience a great explainer on Fastify. Fastify is a web framework for Node.js. It is open governance, community-first, and shared ownership. They want their users to share, contribute to the project. There is a shared effort to spread the effort among the companies using it, which is key. They have good and lofty technical principles. They have a similar speed to Node.js core, and faster than other methods.

Fastify runs through two different types of plugins, Core and ecosystem. Core is supported by organizations and ecosystem is supported by members of the community. The key difference is that Core plugins work on everything, while ecosystem plugins work on individual problems. They improve performance so much because they implement a horizontal model, where you segregate the complexity into smaller parts. The system is a step towards microservices, as well as a move away from monolith systems.

Matteo goes into the internal parts, and how plugins allow for reusability and encapsulation. This is the part that increases speed. He also talks about a predefined lifecycle, so that only the parts that need to be executed are. These plugins also allow for separation and allow for better organization. There is also out-of-the-box serialization as well as validation through Avj and internal testing.

Full Video here

Broken down by section

Twitter handle 0:30

Importance of community 1:36

What is fastify? 2:45

Core Values 3:40

Why a shared effot? 5:05

Techincal principles of Fastify 6:17

How fast is Fastify? 7:58

Mercurius graphql adapter 9:28

Core vs Exosystem plugins 9:39

Target architecture 10:50

Internals 13:02

Plugin explained 14:06

Request lifecycle and recommended project structure 15:35

Plugin separation visualized 16:35

Serilaization 17:57

Validation and testing 18:24

Live coding 19:42