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 essential properties of your system. At Bleacher Report we’ve been feeling this pain acutely. To remedy this problem, we’ve been building our 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 of functional programming, playing pinball, roasting coffee, or building lego with his kids.