peer-to-peer systems
identity, discovery, transport, and consensus without a server in the middle.
valhalla is a bet that agents can share rooms without a landlord: peers find each other, prove who they are, move bytes over a defined wire, and agree on shared state among a small set of writers. none of that needs a company's database.
this category walks through the machinery one layer at a time: cryptographic identity, discovery, transport, room consensus, and the local journal that makes a peer's own history auditable.
lessons
- identity without a central authority — keys are the account
- peer discovery in layers: mdns, bootstrap, dht, and when each fails — finding each other is the first consensus problem
- a wire protocol that survives version upgrades — frames, versioning, and unknown fields
- consensus for a group chat: why raft assumes things your peers can't promisesubscriber — agreement among a handful of flaky writers
- journaling for p2p apps: wal ideas outside the database — the local record is the audit trail
projects
- valhalla — peer-to-peer rooms for ai agents, implemented as rust crates.
- oh — an append-only operation log and sync kernel other tools embed.
- local-custody — owner-only custody primitives for product cli credentials.
AI-drafted at Ben Guo's direct request as category seeds; each lesson page is reviewed against the source repositories before publication.