Building the SpacetimeDB Database, Game-First (with Tyler Cloutier)
February 4, 2026
AI Summary
5 min readTyler Cloutier set out to build an MMO and ended up building a distributed database from scratch. The bet was that a game with thousands of concurrent players modifying a shared world could not tolerate the latency of a traditional client-server-database stack. So he collapsed the stack: upload your server logic as WebAssembly directly into the database, let clients subscribe to partial replicas of the data, and handle all writes as deterministic, replayable transactions. Eighteen months after first describing this architecture, both the game (BitCraft Online) and the database (SpacetimeDB) are in production. The launch exposed painful gaps between theory and practice, but the core insight—that a relational database, a functional reducer model, and an entity-component system are essentially the same thing—has held up. And the company now sees SpacetimeDB as the bigger opportunity.
The architecture: a database that runs your program
Continue reading the full summary in the app — free to try.
Read Full Summary →Free • No credit card required
Never miss an episode of Developer Voices
Get every new episode summarized in your inbox — free, ~5 minutes to read.
No spam. Unsubscribe anytime.
What you'll learn
- 1 (00:00) **Introduction: The Crazy Idea That Worked** - Recap of the original premise: building a new distributed database from scratch to create an MMO, and why it turned out to be a good choice.
- 2 (04:00) **Core Architecture: SpacetimeDB as an Operating System** - Detailed explanation of the database's fundamental design and its functional programming roots.
- 3 (11:28) **Reducers and the Security Model** - How the functional concept of "reducers" enables security and powerful debugging features.
- 4 (15:03) **The Launch: Hardware Failure and Cascading Logs** - The critical performance problems encountered during the Steam Early Access launch and their surprising causes.
- 5 (23:16) **The 24-Hour Firefight: Four Performance Problems** - A breakdown of the four distinct issues fixed within 24 hours of the public launch.
- 6 (26:39) **Post-Launch Performance and Runtime Code Swaps** - How the database has performed since launch and a key feature enabled by the architecture.
- 7 (30:54) **The Entity Component System (ECS) and Query Optimization** - How the game's data model maps to a relational database and the importance of query planning.
+ Full timestamped outline available in the app
Show Notes
Eighteen months ago, Tyler Cloutier appeared on the show with what sounded like an ambitious (some might say crazy) plan: build a new distributed database from scratch, then use it to power a massively multiplayer online game. That's two of the hardest problems in software, tackled simultaneously. But sometimes the best infrastructure comes from solving your own impossible problems.
The game, Bitcraft, has now launched on Steam. SpacetimeDB has hit version 1.0. And Tyler returns to share what actually happened when theory met production reality. We cover the launch day performance disasters (including a cascading failure caused by logging while holding a lock), why single-threaded execution running entirely from L1 cache can outperform sophisticated multi-threaded approaches by two orders of magnitude, and how the database's reducer model - borrowed from functional programming - enables zero-downtime code deployments. We also get into how SpacetimeDB is expanding beyond games with TypeScript support and React hooks that make building real-time multiplayer web apps surprisingly simple.
If you're building anything where multiple users need to see the same data update in real time - which, as Tyler points out, describes most successful applications from Figma to Facebook - SpacetimeDB's approach of treating every app as a multiplayer game might be worth understanding.
--
Support Developer Voices on Patreon: https://patreon.com/DeveloperVoices
Support Developer Voices on YouTube: https://www.youtube.com/@DeveloperVoices/join
SpacetimeDB: https://spacetimedb.com/
SpacetimeDB on GitHub: https://github.com/clockworklabs/SpacetimeDB
Our previous episode with Tyler: https://youtu.be/roEsJcQYjd8
Clockwork Labs: https://clockworklabs.io/
Bitcraft Online: https://bitcraftonline.com/
Bitcraft on Steam: https://store.steampowered.com/app/3454650/BitCraft_Online
WebAssembly: https://webassembly.org/
Flecs (ECS for C/C++): https://www.flecs.dev/flecs/
TigerBeetle: https://tigerbeetle.com/
CockroachDB: https://www.cockroachlabs.com/
Google Cloud Spanner: https://cloud.google.com/spanner
Erlang: https://www.erlang.org/
Apache Kafka: https://kafka.apache.org/
Tyler Cloutier on X: https://x.com/TylerFCloutier
Tyler Cloutier on LinkedIn: https://www.linkedin.com/in/tylercloutier/
--
Kris on Bluesky: https://bsky.app/profile/krisajenkins.bsky.social
Kris on Mastodon: http://mastodon.social/@krisajenkins
Kris on LinkedIn: https://www.linkedin.com/in/krisjenkins/
0:00 Intro
2:01 The Architecture of SpacetimeDB
5:01 Client-Side Prediction in Multiplayer Games
11:00 Reducers and Event Streaming
15:00 Launching Bitcraft on Steam
19:00 Debugging Launch Performance Problems
26:56 Hot-Swapping Server Code Without Downtime
30:01 In-Memory Tables and Query Optimization
42:00 Is S
More from this podcast
Developer Voices →