The P2P Engineer’s Field Manual
A 7-day engineering crash course — distributed networking, from Kademlia to production profiling.
Seven focused chapters — one per day, ninety minutes each — taking you from
DHT theory to hand-written binary protocols, NAT traversal, Noise handshakes, and the profiler
flame graphs that prove your optimizations actually worked. Every chapter ends in a runnable lab.
Format: 7 chapters · 1–2 hrs each · Stack: Node.js · Holepunch ecosystem · Prereq: working JavaScript
Syllabus
- Day 1: Distributed Hash Tables & Kademlia — the XOR metric that organizes the swarm
- Day 2: BitTorrent & Hypercore — swarms, incentives, and append-only logs
- Day 3: UDP, TCP/IP & NAT Traversal — how peers behind routers actually connect
- Day 4: Binary Protocols & Serialization — framing, varints, zero-copy formats
- Day 5: Cryptographic Primitives — Ed25519, Noise, AEAD, Merkle trees
- Day 6: High-Performance JS Networking — buffers, backpressure, the event loop
- Day 7: Profiling, Optimization & Integration — flame graphs and the capstone build
Each day ends in a runnable lab. Do them in order — every chapter leans on the one before it.