---
title: "We Put a Distributed Database In the Browser – And Made a Game of It!"
description: "TigerBeetle's deterministic simulator, the VOPR, is compiled to WebAssembly via Zig and wrapped in a playable browser game that runs real TigerBeetle replicas across three levels."
url: "https://swe.quest/articles/we-put-a-distributed-database-in-the-browser-and-made-a-game-of-it-0b24aa4c3e59c84b"
canonical: "https://tigerbeetle.com/blog/2023-07-11-we-put-a-distributed-database-in-the-browser"
source: "TigerBeetle"
published: "2023-07-11"
difficulty: "easy"
kind: "Announcement"
reading_minutes: 5
tags: ["formal-methods","consensus","testing","webassembly","zig"]
---

# We Put a Distributed Database In the Browser – And Made a Game of It!

A post on [TigerBeetle](https://swe.quest/sources/tigerbeetle.md), published 2023-07-11, 5 min read, Announcement. Original: [https://tigerbeetle.com/blog/2023-07-11-we-put-a-distributed-database-in-the-browser](https://tigerbeetle.com/blog/2023-07-11-we-put-a-distributed-database-in-the-browser)

## Summary

TigerBeetle's deterministic simulator, the VOPR, is compiled to WebAssembly via Zig and wrapped in a playable browser game that runs real TigerBeetle replicas across three levels. The levels run under perfect conditions, then Jepsen-style network faults, crashes and latency, and finally up to 8% read and 9% write storage corruption per replica. The VOPR mocks all network and storage I/O in a single process, verifies linearizability and dilates time: 3.3 seconds of simulation covers 39 minutes of real-world testing, and a day covers two years. Getting the whole cluster under WebAssembly's 2 GiB memory limit was the main porting challenge, and the post contrasts VSR's round-robin view changes with Raft's randomized elections.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Formal methods](https://swe.quest/tags/formal-methods.md) (Architecture & design)
- [Consensus](https://swe.quest/tags/consensus.md) (Distributed systems)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Zig](https://swe.quest/tags/zig.md) (Languages)

## Prerequisites

- consensus protocol basics ([easy posts on Consensus](https://swe.quest/tags/consensus.md?difficulty=easy))
- fuzzing ([easy posts on Vulnerability research](https://swe.quest/tags/vulnerability-research.md?difficulty=easy))

## Keywords

TigerBeetle, VOPR, Viewstamped Replication, Protocol-Aware Recovery, WebAssembly, Zig, Jepsen, deterministic simulation testing

## Related posts

- [Protocol-Aware Deterministic Simulation Testing](https://swe.quest/articles/protocol-aware-deterministic-simulation-testing-7f3b613be8faf2a6.md): TigerBeetle · 2026-08-20 · Hard · 10 min read · Formal methods, Testing, Consensus, Replication, Storage engines
  TigerBeetle's deterministic simulator (the VOPR) has full visibility into each replica's consensus and storage state, so it can check invariants that black-box tools like Jepsen or Antithesis cannot see through user-facing APIs.
- [Simulation Testing For Liveness](https://swe.quest/articles/simulation-testing-for-liveness-7a5ba398eed57d56.md): TigerBeetle · 2023-07-06 · Hard · 4 min read · Formal methods, Testing, Consensus, Distributed systems, Resilience
  TigerBeetle's VOPR simulator now has a "liveness" mode alongside its "safety" mode, because uniformly random, eventually-healing faults can never surface livelocks such as a permanently asymmetric partition that triggers endless view changes.
- [A Descent Into the Vörtex](https://swe.quest/articles/a-descent-into-the-vortex-6dcd52020263ac13.md): TigerBeetle · 2025-02-13 · Medium · 3 min read · Testing, Chaos engineering, Distributed databases, Zig
  TigerBeetle has added Vortex, a non-deterministic, generative full-system test harness that complements its Deterministic Simulation Testing by exercising real production binaries and client libraries from the outside in.
- [Random Fuzzy Thoughts](https://swe.quest/articles/random-fuzzy-thoughts-74b3f2f1b21a2499.md): TigerBeetle · 2023-03-28 · Medium · 9 min read · Testing, Formal methods, Distributed systems, Zig
  Treating a fuzzer's byte slice as a finite PRNG unifies coverage-guided fuzzing with structured property-based testing: the entropy length measures input complexity, gives test-case minimization almost for free, and tells interactive simulations when to stop injecting faults.
- [A Tale Of Four Fuzzers](https://swe.quest/articles/a-tale-of-four-fuzzers-88cabf77780814b8.md): TigerBeetle · 2025-11-28 · Hard · 32 min read · Testing, Replication, Distributed systems, Formal methods, Zig
  TigerBeetle's Adaptive Replication Routing (ARR) puts the primary in the middle of a replication ring so no single dropped message is critical.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
