Concurrency in Go. Developing Parallel Applications in Go
Concurrency in Go. Developing Parallel Applications in Go
Summary:
Introduction
The book «Concurrency in Go. Developing Parallel Applications in Go» (original title — Concurrency in Go: Tools and Techniques for Developers) by Katherine Cox-Buday is one of the most authoritative guides to concurrent programming in the Go language. Published in 2017 by O'Reilly, it quickly became a go-to book for developers seeking to master goroutines, channels, and complex synchronization patterns. Across 238 pages, the author not only explains the syntax but immerses the reader in the philosophy of parallelism adopted in Go and teaches how to write reliable, efficient, and safe code.
What This Book Is About
The book is structured as a sequential journey from the basics to advanced techniques. The first part is devoted to theoretical foundations: what concurrency is, how it differs from parallelism, the Go memory model, and basic synchronization primitives (mutexes, WaitGroup, atomics). Then the author moves to the central topic — goroutines and channels — showing how to build composable and scalable systems with them. Special attention is given to patterns: pipeline, fan-in/fan-out, or-done-channel, tee-channel, bridge-channel, and others. The book concludes with an analysis of real-world examples — from a simple web crawler to implementing a worker pool and graceful shutdown. Each chapter contains practical code examples and warnings about typical mistakes (deadlock, race condition, goroutine leak).
Who This Book Is For
The book is aimed at Go developers already familiar with the basics of the language (syntax, types, functions). It will be useful both for beginners just starting to understand goroutines and for experienced engineers wanting to systematize their knowledge and learn about advanced patterns. If you write microservices, network utilities, data stream processors, or any systems where performance and parallel processing are important — this book is for you. It will also be helpful for developers from other languages (Python, Java, C#) transitioning to Go and wanting to understand its unique approach to concurrency.
What the Reader Will Learn
- Basics of concurrency in Go: memory model, goroutines, channels, select, sync package.
- Parallel programming patterns: pipeline, fan-out/fan-in, or-done, tee-channel, bridge-channel.
- Managing goroutine lifecycle: graceful shutdown, contexts (context.Context), operation cancellation.
- Avoiding errors: deadlock, race condition, goroutine leak, mutual deadlocks.
- Testing concurrent code: go test -race, mocks, deterministic testing.
- Real-world examples: web crawler, worker pool, event processing system.
Strengths of the Book
The first and foremost advantage is depth and structure. The book doesn't just list APIs but explains why certain decisions were made in Go (for example, "don't communicate by sharing memory; share memory by communicating"). The second is practical orientation: each pattern is accompanied by code that can be immediately run and modified. The third is emphasis on composability: the author teaches how to build complex systems from simple, well-isolated components. The fourth is clear language and excellent examples; even complex concepts (like the or-done-channel) are explained simply. Finally, the book contains valuable advice on debugging and profiling (pprof, trace), which is rarely found in other guides.
Who It Is Recommended For
I strongly recommend this book to everyone who writes in Go and wants to go beyond "Hello, World". It will be especially useful for:
- Backend developers creating high-load services;
- DevOps engineers writing tools in Go (CLI, agents, metric collectors);
- Students and teachers of courses