A DNS resolver
Build and parse UDP packets bit by bit. Resolve names by walking the hierarchy from the root servers.
Go · Rust · Python
Bencode, trackers and the peer-to-peer protocol. Download a real file by talking to real peers.
Build it in your language
The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.
BitTorrent is a complete distributed system you can build on your own: peer discovery, a binary protocol with a handshake, block transfer and integrity verification. And you check the result by opening the downloaded file.
You'll start by decoding a .torrent and finish downloading a real file from several peers at once, in parallel, checking every piece against its hash before writing it to disk.
12 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.
A bencode decoder, file metadata and the infohash.
Tracker queries and the list of available peers.
Handshake, protocol messages, and downloading one verified piece.
Several peers in parallel, retries, and final assembly on disk.
Build and parse UDP packets bit by bit. Resolve names by walking the hierarchy from the root servers.
Go · Rust · Python
Build a Model Context Protocol server from scratch with JSON-RPC, tools, and resources.
TypeScript · Python · Go
From raw bytes to a 200 response. Parse requests, manage connections and serve concurrent traffic.
Go · Python · C · Rust