← Back
Home › Systems › Networking and edge

p2p-network

peer-to-peer network with a DHT

BitTorrent, libp2p

SystemTechniques · 15Primitives · 55 p2p-network Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Epidemic broadcastdistributed · medium: Gossip-based message dissemination (push/pull, gossipsub mesh) with bounded fan-outKademlia dhtdistributed · medium: XOR-metric DHT with k-buckets and iterative parallel lookupsPrimary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›NAT traversal (STUN, ICE, TURN)media · medium: Learn your public address with STUN, swap candidate addresses over signalling, test pairs with ICE checks, and fall back to a TURN relay if no direct path works.›Peer to peer swarmingnetworking · medium: BitTorrent-style piece exchange: rarest-first, choking, tit-for-tat, hash-verified piecesQUICnetworking · medium: Encrypted, multiplexed transport over UDP with 1-RTT setup, independent streams and connection migration; the transport of HTTP/3.›Cryptographic hashes (SHA-2, BLAKE3)security · low: Collision-resistant fingerprints of data; SHA-256 for interoperability, BLAKE3 for speed, HMAC/HKDF for keyed uses.›Merkle treedata-structures · low: Hash tree for verifying and diffing large datasets with logarithmic proofsLedbat congestion controlnetworking · low: Delay-based less-than-best-effort congestion control (uTP) for background transfersHdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesProcess supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›Digital signatures (Ed25519)security · low: Small, fast, deterministic public-key signatures that prove who produced a message; the default for tokens, releases and protocols.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Noise protocolsecurity · low: Noise framework handshakes (IK, XX): DH patterns, chaining keys, transport ciphersGraceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›Cooperative schedulingconcurrency · low: Green threads/coroutines yielding at await points on a user-space schedulerRecord replaydistributed · low: Record every nondeterministic input (time, randomness, I/O, model and tool outputs, per-tick player input) and re-execute deterministically for debugging, replays and state rebuildPRNGs (PCG, xoshiro)numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›Bloom filterdata-structures · low: Bit array answering "definitely not present" or "probably present" in about 10 bits per key for 1 % false positives; inserts are cheap, deletes impossible.›Event deduplication windowdistributed · low: Keep the ids of recently accepted events for a time window and drop repeats; memory stays bounded by rotating time buckets instead of per-entry timers.›Message sequence numbersdistributed · low: A per-stream counter on every message lets the receiver detect loss, duplicates and reordering, ack cheaply and resume after reconnect with "send from N".›Reliable UDPgame-networking · low: Transport over UDP: each packet carries a sequence number, an ack and a 32-bit ack history; only chosen messages are made reliable.›+ 8 more techniques+ 39 more primitives

Similar systems

Share the most building blocks with this one.