Google I/O 2012 - Go Concurrency Patterns
Channel:Google for Developers · Length:51:27 · Published:2012-07-02 · Views:895457
Summary
Rob Pike's Google I/O 2012 talk shows how goroutines and channels solve tricky concurrency problems with simple Go code. It features a playful goroutine demo with gophers passing messages and a search engine example.
Why HN recommends it
The canonical recommendation for learning Go concurrency, praised as entertaining and clarifying when to use channels versus mutexes.
Great talk by Rob Pike — HN, 2012
C, C++, Rust, Go & systems languages · Distributed systems
Subtitles (excerpt)
ROB PIKE: Hi, everyone. Wow. Voice is always so big. Thanks for coming. I'm going to be talking today about Go concurrency patterns. My name is Rob Pike, and I work on the Go team at Google. First of all, let me give us a little background. When Go came out in November of 2009, a lot of people were immediately fascinated by the features of Go that provided concurrency, and wanted to play with them and goof around. But also, a lot of people had questions about them. And there's a question about why concurrency's even in the language. What exactly do I mean by concurrency? What is the origin of the ideas? And what is it all useful for? And today I'm going to talk about all those things, but I'm mostly going to talk about how you use the features. But I need to give you a little background. So if you look around in the world at large, what you see is a lot of independently executing things. You see people in the audience doing their own thing, tweeting while I'm talking and stuff like that. There's people outside, there's cars going by. All those things are independent agents, if you will, inside the world. And if you think about writing a computer program, if you want to simulate or interact with that environment, a
On Hacker News
For those who don't know who Rob Pike is, he's pretty awesome, helped create UTF-8 among other things, and now works on Go. [LINK] He has given some really great Go talks which are available on youtube, about an hour each: Origins of Go Concurrency Style - [LINK] Lexical Scanning in Go - [LINK] Go Concurrency Patterns (One of my favorites) - [VIDEO] — canthonytucci, 2013-09
Great talk by Rob Pike: [VIDEO] "Go Concurrency Patterns" with cute little gophers playing Chinese whispers with megaphones — mseepgood, 2012-07
Not quite. Erlang uses the Actor model which delivers messages asynchronously to named processes. In Go, messages are passed between goroutines via channels, which provide a synchronization mechanism (when un-buffered). The ability to synchronize allow one to setup a "rhythm" to computation that the Actor model is explicitly not designed to do. Also, note that a process must know its consumer in … — pbohun, 2025-11
This is true, that's exactly what exceptions are. One could argue (I would) that this is a very powerful part of Python, but the indeterminate nature of the exception (where is it coming from, how is it defined, what should I provide to my client) makes it easier to catch exceptions as they percolate upward, but more difficult to correctly know how to handle them (especially as the permutations a… — gunapologist99, 2022-06
Rob Pike did a number of interesting talks on concurrency in Go. If you search "Go concurrency" on YouTube there are more good talks. Go Concurrency Patterns [VIDEO] Concurrency Is Not Parallelism [LINK] — staunch, 2018-08
Related videos
- Lexical Scanning in Go - Rob Pike · GoogleFOSSSydney · 51:17
- TMS Bicycle, stable without gyros or trail (TMS=two-mass-skate) · Arend Schwab · 2:39
- Origins of Go Concurrency style by Rob Pike · jasonofthel33t · 38:19
- How Analog Color TV Works: The Beginnings · Technology Connections · 13:14
- Pitfall: A Classic Game Postmortem · GDC Festival of Gaming · 1:00:34
- SQLite: The Database at the Edge of the Network with Dr. Richard Hipp · Method · 59:58
- Oculus Connect 2: Live Coding Session with John Carmack · Meta VR · 1:05:21
- TWiST #46 with David Heinemeier Hansson · ThisWeekinStartups · 1:57:11
- Steve Jobs' 2005 Stanford Commencement Address · Stanford · 15:04
- The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019 · GOTO Conferences · 42:02
- CppCon 2015: Andrei Alexandrescu “std::allocator...” · CppCon · 1:12:27
- "Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson · Strange Loop Conference · 40:20
- CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step” · CppCon · 59:33
- RustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West · Rust Programming Language · 42:29
- Erlang Factory 2014 - That's 'Billion' with a 'B': Scaling to the Next Level at WhatsApp · Erlang Solutions · 49:15
- "Turning the database inside out with Apache Samza" by Martin Kleppmann · Strange Loop Conference · 47:42