
Concurrency vs parallelism in Go: applied to Event Sourcing and CQRS
Rob Pike said in 2012: "Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once." Everyone nods at the conference. Nobody asks a question. And then you go home and still have no idea what it actually changes in your code. This article starts from scratch: what the difference is, how Go expresses it with goroutines and channels, and why it matters as soon as you start working with architectures like Event Sourcing or CQRS. No advanced Go knowledge required. The difference with a cooking analogy Imagine a single chef preparing ten dishes at once. He starts the risotto, sears the scallops, checks on the sauce, comes back to the risotto. He only does one thing at a time — but he manages ten things by juggling his attention. That's concurrency . Now put ten chefs in the same kitchen. Ten dishes are cooking physically at the same time , each at their own station. That's parallelism . The difference in one sentence: Concurrency = managing mu
Continue reading on Dev.to
Opens in a new tab

