swactor/crates/swactor-gossip
zacheryasc 74b92d71ab refactor(core): lock-free tick timings, infallible channel push (#28)
Make mailbox push infallible and replace the locked tick-timing buffer with a
lock-free ring.

- channel: HybridChannel::push and Sender::send now return () — overflow always
  absorbs, never rejects — dropping the Result<(), T> surface and its callers.
- stats: tick_timings moves from Mutex<VecDeque> to a lock-free crossbeam
  ArrayQueue (drop-oldest-on-full), removing the per-tick lock.
- ripple the signature change through worker/runtime/config; drop worker_benchmarks.
- expand runtime_api tests around the new channel/stats shapes.

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-10 07:35:58 +00:00
..
docs/connectome feat: gossip simulation (#21) 2026-02-08 16:18:39 +00:00
examples feat: gossip simulation (#21) 2026-02-08 16:18:39 +00:00
src refactor(core): lock-free tick timings, infallible channel push (#28) 2026-02-10 07:35:58 +00:00
tests feat: gossip simulation (#21) 2026-02-08 16:18:39 +00:00
Cargo.toml feat: gossip simulation (#21) 2026-02-08 16:18:39 +00:00
README.md feat: gossip simulation (#21) 2026-02-08 16:18:39 +00:00

swactor-gossip

Epidemic gossip protocol built on the swactor actor runtime.

Nodes exchange state via randomized push-gossip and converge to a consistent view using last-writer-wins versioned values.

Crate layout

  • protocol — GossipActor, GossipMessage, GossipState (the core protocol implementation)
  • sim — simulation harness with configurable topologies (Ring, Star, FullMesh, Chain, Partitioned) and optional partition healing
  • trace — per-tick event log and SimulationTrace for post-run analysis
  • properties — metrics extraction (delivery ratio, convergence round, redundancy, load balance, etc.) and property-based assertions over traces
  • report / property_report — self-contained HTML report generators for single-run and multi-scenario results

Tools

Dashboard (gossip-dashboard crate)

A live web dashboard that streams simulation progress to a browser in real time. See crates/gossip-dashboard/.

cargo run -p gossip-dashboard --example dashboard
# or with a TOML config:
cargo run -p gossip-dashboard --example dashboard -- crates/gossip-dashboard/examples/sim.toml

HTML report

The gossip_sim example runs a simulation and writes a standalone HTML report:

cargo run -p swactor-gossip --example gossip_sim

Property report

Runs multiple scenarios and generates an HTML report checking gossip protocol properties (convergence, consistency, load balance):

cargo run -p swactor-gossip --example gossip_property_report