When types aren't enough - Contracts for building robust systems
April 26th 2019 14:30 - 15:15
It’s mentally taxing to work in a system with a large number of services. One of the ways to combat that cognitive load is to use types to specify contracts between services. This system works well if you need to know if a key is a string or an integer.
But it turns out types fall short in their ability to specify the important properties of your system. At bleacher report we’ve been feeling this pain accutely. In order to remedy this problem we’ve been building our own contract system. These contracts are applied at runtime and provide a common language for specifying the data moving through your system.
In this talk we’ll discuss the tradeoffs between type systems and contract systems, we’ll show the decisions that we made in our contract language, and finally discuss how to implement a basic system for specifying data.
Chris is a software engineer building services and applications for Bleacher Report. Although he started out writing C for embedded systems, these days he spends his time in Elixir, Haskell, Go, and Rust. When not writing code for work, Chris can be found writing code for fun, talking about the joys...