DEV Community

Margo McCabe for HarperDB

Posted on • Updated on

Livestream Event: Build a REST API using Fastify & HarperDB

Join HarperDB & top Fastify maintainer, Ethan Arrowood, for this live code along event!

Alt Text

Fastify: The fast & low overhead web framework for Node.js

HarperDB hosted Ethan Arrowood, a top open source maintainer for Fastify and Microsoft Engineer, for a virtual livestream on January 26th. Ethan built a REST API using Fastify with HarperDB. Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture.

Ethan highlighted best practices for general data organization, running HarperDB in Fastify, using Undici to make high throughput requests to HarperDB, and building an API in Fastify. For the demo, Ethan ran HarperDB locally in a Docker container, so you can do the same or you can spin up a HarperDB Cloud instance. You can access and manage either/both through the Management Studio. All the resources you need to code along are below:

This event is for developers of any skill level, and will help you strengthen your Fastify and app development skills, as well as general database / data management knowledge. (You'll also be able to see some sweet new HarperDB features in action like JWT Authentication!)


Meet Ethan

@ethanarrowood is a Software Engineer 2 at Microsoft, based out of Boston, MA. Apart from his professional work, Ethan is an active Node.js open source community member. He is a maintainer for Fastify, contributor to Node.js and Undici, and is involved in many other community-related aspects. In addition, he enjoys the outdoors and can often be found hiking, climbing, and skiing around the Northeast.

Meet HarperDB

HarperDB is a distributed database focused on making data management easy. It has an easy to use REST API, and supports NoSQL and SQL including joins. HarperDB leverages standard interfaces so that you can use the reporting and analysis tools that best meet your needs. Great for use cases where you need rapid application development, integration, edge computing, distributed computing, and real-time operational analytics. If you want to learn more before the event, you can check out the SDK's in the HarperDB Marketplace, read about HarperDB's technology, or read our other articles.

Meet Fastify

Fastify is a fast and low overhead web framework for Node.js. It's inspired by Hapi and Express, and is one of the fastest web frameworks in town. Fatify lists its core features as:

  • Highly performant: super fast, depending on the code complexity we can serve up to 30 thousand requests per second.
  • Extendible: Fastify is fully extensible via its hooks, plugins and decorators.
  • Schema based: even if it is not mandatory we recommend to use JSON Schema to validate your routes and serialize your outputs, internally Fastify compiles the schema in a highly performant function.
  • Logging: logs are extremely important but are costly; we chose the best logger to almost remove this cost, Pino! Developer friendly: the framework is built to be very expressive and to help developers in their daily use, without sacrificing performance and security.
  • TypeScript ready: we work hard to maintain a TypeScript type declaration file so we can support the growing TypeScript community.

Fun fact - Jaxon, our VP of Product, recently mentioned that HarperDB currently uses Express for our internal API, but we're ripping it out and replacing it with Fastify. Our internal benchmarks say this will increase API performance by at least 50%, but we're hoping for double that.

Alt Text

Top comments (0)