Skip to content

Put the SWIM mesh at the top of the README as a terminal demo - #10

Merged
lgoyal6 merged 1 commit into
mainfrom
docs/swim-demo
Aug 25, 2026
Merged

Put the SWIM mesh at the top of the README as a terminal demo#10
lgoyal6 merged 1 commit into
mainfrom
docs/swim-demo

Conversation

@lgoyal6

@lgoyal6 lgoyal6 commented Aug 25, 2026

Copy link
Copy Markdown
Owner

The README's only images were two benchmark charts at line 205, well below where anyone scrolls. The Pages demo covers the transport half only, so the membership half had nothing a visitor could see without building the project.

mesh_node runs on the in-process SimNet and a virtual clock, so this is the real implementation rather than an animation: five nodes gossiping, one partitioned away, 1020 ms to the first SUSPECT, 2020 ms to reconverge after the heal, and the reachable node never falsely confirmed dead.

The two demos now split cleanly. Browser demo for the transport, this recording for membership.

Why narrating the numbers is safe here

They are identical on macOS and Linux as of the SimNet determinism fix in #9, which is the payoff for that change: before it, the same seed drew different sequences per standard library and these numbers would have been platform-specific.

I also checked the default seed is a hardcoded constant (20260720ull in demo/mesh_node.cc:94) rather than anything time-derived, before committing to "reproducible". Worth noting a small pre-existing wart found while checking: mesh_node --help does not print help, because strtoull("--help") returns 0 and it runs with seed 0 instead. Left alone, out of scope here.

Reproducible, not a screen capture:

./docs/demo-setup.sh && vhs docs/demo.tape

The README's only images were two benchmark charts at line 205, well below
where anyone scrolls, and the Pages demo covers the transport half only. The
membership half had nothing a visitor could see without building the project.

mesh_node runs on the in-process SimNet and a virtual clock, so the recording
is the real implementation rather than an animation, and it is deterministic:
1020 ms to the first SUSPECT, 2020 ms to reconverge after the heal, and the
partitioned node never falsely confirmed dead. The two demos now split cleanly,
the browser one for the transport and this one for membership.

Those numbers are the same on macOS and Linux as of the SimNet determinism fix,
which is what makes narrating them in the recording safe. I verified the
default seed is a hardcoded constant rather than anything time-derived before
committing to that claim.

A VHS tape, so it re-records when the demo changes:
./docs/demo-setup.sh && vhs docs/demo.tape
@lgoyal6
lgoyal6 merged commit 2ac2bde into main Aug 25, 2026
12 checks passed
@lgoyal6
lgoyal6 deleted the docs/swim-demo branch August 25, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant