Fastify goes LTS with 1.0.0!

Fastify
Node.js Collection
Published in
3 min readMar 6, 2018

--

This article was co-written by Tomas Della Vedova, who is a software enginner based in Italy and lead enginneer at LetzDoIt, & Matteo Collina, who is a Node.js TSC member and principal architect at nearForm.

After a year and a half of very active development with 1562 commits by 67 individuals through 75 releases, Fastify is graduating to 1.0.0! This marks a very important moment for any project that follows semver as we are finalizing our public API (no more breaking changes for a while) and enter a Long Term Support cycle. We are committed to keeping 1.0.0 stable and safe for at least a year (6 months of active support + 6 months of security fixes).

Fastify is very simple to use and install, simply type`npm i fastify` and then:

Our story

It has been a long journey beginning in the summer of 2016, when we started developing fast-json-stringify, a little library that doubled the throughput of `JSON.stringify`. In September 2016, Fastify was born. We initially focused only on performance, but after the first iterations, we realized that performance is not the only important aspect that a framework should offer. So, we started thinking about a way to empower developer productivity and extend the framework itself. By offering the possibility to add plugins and interact with the framework API and lifecycle directly, we enhanced the developer experience.

While we were continuously improving and optimizing, the stability and resiliency of the API was our main focus. This iterative process finally came to fruition when we perfected the performance and the overall usability of the framework. Fastify 1.0.0 was finally ready to be launched.

Features

Fastify offers:

  • the familiar “callback style” API for die-hard Node.js developers;
  • async/await, because we like ES6 too;
  • HTTP2 support;
  • a powerful hook system that allows the developer to interact with the lifecycle of the application with a minimum overhead;
  • support of Express-style middlewares;
  • validation of incoming data with JSON-schema;
  • zero-cost decorators to enhance the base API;
  • a router based on a radix prefix tree, built with performance in mind;
  • a built-in logger, because full auditability is a critical feature in enterprise applications (and it’s very easy to underestimate the cost of logging);
  • a flexible plugin system based on a direct acyclic graph, based on Avvio, which enables our awesome ecosystem;

There are more than 50 plugins that have been developed, including those for template rendering, React integration, GraphQL support, serving static files, and database drivers.

Courtesy of Roberta Doyle https://unsplash.com/photos/dqmmx51pVf8

Open Source Impact

Open Source is in our hearts. We try to release every feature as a separate package to enable others to use them in their project. That’s how we believe the project and its ecosystem can organically evolve.

As part of our investment to share the knowledge we gained during the development, we focused on compiling an exhaustive documentation, including our technical decisions.

As a result we have a comprehensive guide to plugins in our Hitchhiker’s Guide to Plugins, a thorough introduction to the framework in our Getting Started Guide, and we recently published some suggestions on how to create quality plugins for the ecosystem. For this reason, we strongly encourage third party developers to share their efforts to help continuously improving the ecosystem.

Collaborate, collaborate, collaborate!

During the past year a lot of amazing people joined our team, and we would like to thank them: Tommaso Allevi, Dustin Deus, Luciano Mammino, Evan Shortiss, James Sumners and Nathan Woltman.

Each one of them contributed to the development and the delivery of what we are all proud today to announce: Fastify 1.0.0. This was a cooperative effort done together with all the other contributors that assisted us through this journey. We would also love to thank our sponsors, LetzDoIt and nearForm that enabled Tomas and Matteo to work on Fastify as part of their daily job.

So welcome everyone and enjoy Fastify v1.0.0!

Related post and talks:

--

--