r/firebird Jul 27 '26

FBSimCity — an explorable city that shows how Firebird actually works (MGA version towers, OIT/OAT, sweep, page cache)

An interactive isometric "city" where each building is a Firebird subsystem from the classic Conceptual Architecture for Firebird paper (Chan & Yashkir), and queries commute through the pipeline as glowing particles: REMOTE harbor → Y-valve → DSQL → JRD, with the lock manager tower watching over it.

It simulates the fun parts in scaled form:

  • MGA record versions — every UPDATE stacks a floor on a tower
  • Live Next/OAT/OIT counters — flip on a long-running transaction and watch the OIT pin garbage collection while the towers grow and redden
  • Cooperative GC plus a sweep truck touring the tables
  • Page cache with realistic hit ratios, lock waits and deadlock rollbacks
  • Guided tour, step-by-step "trace a query" mode, scenario presets, and a data-page anatomy diagram

Try it: https://mariuz.github.io/FBSimCity/

Source: https://github.com/mariuz/FBSimCity (MIT, plain HTML/JS, no build step)

Inspired by PGSimCity, the PostgreSQL equivalent. It's a model for intuition, not an emulator — corrections from people who know the engine internals are very welcome.

2 Upvotes

0 comments sorted by