Go: Code that Grows with Grace
summary
Starts from a minimal TCP hello server and grows into a chat-roulette that pairs TCP connections by having each acceptor try to read and write on a package-level channel of io.ReadWriteCloser; the first blocked acceptor and the second ready acceptor are matched by a select. Concurrency uses lightweight goroutines (the code changes by only three characters: "go "), copies are coordinated with an error channel to signal copy termination, websocket handlers and a bot implementing ReadWriteCloser plug in without changing the core.
AI-written summary · about
chapters (5)
related talks
24mMastering Concurrency in Go: From Patterns to Production
16mIn the land of Gophers from age 3
47mUnbounded Concurrency in Go
54mComplex Concurrency Patterns with Go
29mGoing Infinite: Handling 1 Million Websocket Connections in Go
32mConcurrency Patterns in Go
27mProduction Ready Concurrency
16mIn the Land of Gophers (from Age 3)
