Type safety across microservices with Zod
June 25, 2024
Hall B
English | Intermediate

TypeScript provides great type safety as long as your code doesn't do any I/O operations. However, most Node.JS applications do tons of I/O - reading from a database, handling HTTP requests, reading messages from queues etc. How can we guarantee that the shape of objects we receive matches our types? When working with tens or hundreds of microservices, that could really become a problem.

Enter Zod - a schema validation library with built in type inference mechanism. With Zod, you can ensure that external inputs conform to your specified types, preventing the ingress of invalid data.

In this presentation, I will explain the challenge of maintaining type safety across I/O operations. I will provide a brief demonstration of Zod, showcasing its capabilities, and then explain how we leverage Zod at RiseUp, to prevent invalid data - whether from HTTP request or database queries - from reaching our business logic.

_- shahar- Node speaker
Shahar Kedar
Principal Engineer
Riseup 500_250

I'm a Principal Engineer at RiseUp, an Israeli Fintech company. I have over 20 years of experience in software engineering, with over 10 years specifically focused on Node.js. I'm passionate about building products from "zero to one" that have a real impact on people's lives. I love geeking out about distributed systems architecture and type safety. In my spare time, I enjoy playing chess, reading fantasy books, and working in the communal garden next to my home.

Cancellation Policy

Sponsor Cancellation:

In case of cancellation of the event, we will offer a full refund to all attendees and sponsors.

Attendee cancellations:

Up to 30 days prior to the event – 100% Refund.
30-14 days prior to the event – 50% Refund.
No refund will be offered later than that.