DEV Community

FSJam Podcast

Episode 81 - Netlify Scheduled Functions with Simon Knott

We need your vote to win a Jam stack Jammie! So, go to https://fsjam.org/vote

There will also be previous guests in other categories, so make sure you vote for them too!

-------------------


In this episode we discuss the difficulties of running jobs on serverless, use cases for Netlify's Scheduled Functions, the future of Blitz.js, and the trade-offs inherent to remote work.

Simon Knott

Netlify's Scheduled Functions

Blitz.js 2.0

Links

Editor's note: When I asked Simon about tRPC he gave his understanding of the history and motivation of the project at the time of this recording, which was almost six months ago. Despite not having been heavily involved with tRPC, his explanation was basically spot on with the exception of one point which I'd like to clarify for the record and our listeners. Simon said that Alex Johansson, the lead maintainer and driving force behind tRPC, was inspired to create tRPC by his experience as an early maintainer for Blitz.js. He prefaced this by saying:

"Why I find tRPC so interesting, it's basically a lot of the ideas behind Blitz's zero-API data layer taken out from Blitz and I think (I'm not super sure about this) but I think Alex (who's the maintainer of tRPC) got the idea from Blitz. He was a maintainer of Blitz in the first couple of months and I think he then took the idea and decided to build something outside of Blitz."

It's true that Alex was an early contributor to Blitz.js and understood the philosophical alignment between the two approaches on wanting a zero-API layer. The part that's missing however, is that Alex didn't create tRPC. Colin McDonnell, creator of Zod and current head of DevRel at EdgeDB who began the project as a proof of concept in July 2020. After creating the initial proof of concept, Colin handed the project off to Alex Johansson who has been maintaining the project ever since.

Originally called ZodRPC, Colin described it as "a toolkit for creating typesafe backends powered by Zod." Zod uses a kind of schema to broadly refer to any data type which can be declared with static types in TypeScript. With ZodRPC, Colin hoped to build a new library that would extend the functionality of Zod to the point of offering an alternative to GraphQL. The key to the project's success would be retaining the simplicity of RPC calls without losing type safety. According to Colin:

"Most people use GraphQL as a massively over-engineered way to share the type signature of their API with your client. What if you could import that type signature directly into your client using plain ole import syntax? Well... you can."

Episode source