Skip to content

Repository files navigation

Quorum

Quorum demo: network partition, divergence, and reconciliation

An interactive visualization of the CAP theorem. A single bank account is mirrored across three branches (New York, London, Tokyo). Cut the network and watch the system trade Consistency for Availability in real time.

The idea

A distributed store can't have all three of Consistency, Availability, and Partition tolerance at once. Since networks fail, partition tolerance isn't optional — so the real choice is C vs A. Quorum turns that choice into a button.

  • Network healthy → all branches agree. You get both C and A.
  • Network cut → the cluster splits into a majority (2 nodes) and a minority (1 node), and you pick a mode:
    • CP — the minority branch refuses writes (no quorum), so data stays correct everywhere but that branch is unavailable.
    • AP — every branch keeps serving, so balances drift apart until the link heals and last-write-wins reconciles them.

Stack

  • Backend — TypeScript + Express. A single Bank class owns all state and the CAP rules (quorum checks, replication, reconciliation) as small, readable methods.
  • Frontend — React + Vite. Renders server state only; never re-implements the rules.
  • Deploys as one service — Express serves both the API and the built UI.

Run locally

  • pnpm install
  • pnpm dev

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages