Projects / DistLab

Systems

DistLab

A local laboratory for distributed systems, built with Rust, Tauri, and React. Fourteen scenarios ship with the lab: checkout latency, duplicate delivery, leader election, stale reads, contended locks, and majority commit. The page runs the graph on its own. The desktop app starts a local engine where each service is its own process, with Docker Postgres for real rows and Jaeger for traces when they are available.

RustTauriReactTokioOpenTelemetry

01 Walkthrough

One short demo and two screens from the product.

VIDEO COMING SOON

Preview not available yet

PICTURE COMING SOON

Preview not available yet

Coming soon
PICTURE COMING SOON

Preview not available yet

Coming soon

02 Stack layers

Lab

ReactScenario graphTrace strip

Engine

RustTokioOne process per service

Side effects

PostgresJaegerOTLP

03 Architecture

REQUESTPOST /run { scenario: checkout }tracing
runspawnfaultswritespanstraceLab UIGraph · faultsCLIENTRust engineSupervisorSVCServicesOne process eachSVCQueueDeliveryQUEUEPostgresDocker · rowsDATAJaegerOTLPEXT

The lab sends a scenario to the Rust engine. The supervisor starts one process per service, pushes faults, and streams the trace. Postgres and Jaeger attach when Docker is available.

  • Fourteen scenarios, from checkout latency to lost quorum
  • Desktop engine: one process per service, faults over HTTP
  • Optional Docker Postgres and Jaeger; the browser lab needs no install

04 Engineering challenges

01

Same lesson, two runtimes

The browser lab runs the graph in the page. The desktop build starts the Rust engine so each service is a real process with its own address.

02

Faults on a live path

Latency, dropped calls, crashes, and partitions are pushed to the running processes over a control endpoint, then the trace records every hop.

03

Real rows and real traces

When Docker is up, a database call writes a Postgres row and spans go to Jaeger. Without it, the engine keeps a stand-in so the lesson still runs.

04

Consensus you can rerun

Leader election, majority commit, lost quorum, and failover are scenarios. Change a fault and run the same path again.

05 Trade-offs & decisions

One process per servicevsIn-memory simulation only

Process boundaries, ports, and crashes match the failure modes the lessons are about.

TaurivsElectron

The shell stays small and the engine stays Rust, next to the same core the CLI serves.

Shipped scenariosvsBlank canvas only

Fourteen lessons open with a known fault. The graph is still editable once you are inside.