![Page 1: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/1.jpg)
The Why of Go v2Brave New World Edition
GOTO Copenhagen 2018
@carmatrocityCarmen Andoh
![Page 2: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/2.jpg)
![Page 3: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/3.jpg)
“Imagine you are a software engineer from the year 1983 who happened upon a time machine and traveled to today.”
(80s Dolorian time machines are the raddest time machines)
![Page 4: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/4.jpg)
Genealogy of Programming Languages 1956-1983
You are here
![Page 5: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/5.jpg)
Genealogy of Programming
Languages1956-2015
![Page 6: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/6.jpg)
You are here
![Page 7: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/7.jpg)
![Page 8: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/8.jpg)
Genealogy of Programming
Languages1956-2015
![Page 9: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/9.jpg)
![Page 10: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/10.jpg)
![Page 11: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/11.jpg)
![Page 12: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/12.jpg)
![Page 13: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/13.jpg)
GNU GNU’s Not Unix Project
Started in 1983
![Page 14: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/14.jpg)
![Page 15: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/15.jpg)
![Page 16: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/16.jpg)
![Page 17: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/17.jpg)
![Page 18: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/18.jpg)
![Page 19: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/19.jpg)
![Page 20: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/20.jpg)
● too simple / lack of syntactic sugar● no generics● bad dependency management● stuck in 70/80's ● error handling
● no unused imports● too opinionated● too verbose● no ternary operator● no macros or
templates
https://github.com/ksimka/go-is-not-good
Criticisms of Go
![Page 21: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/21.jpg)
![Page 22: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/22.jpg)
![Page 23: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/23.jpg)
“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.
![Page 24: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/24.jpg)
“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.
![Page 25: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/25.jpg)
“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.
![Page 26: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/26.jpg)
“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.
![Page 27: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/27.jpg)
“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.
![Page 28: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/28.jpg)
Moreover, the scale has changed: today’s server programs comprise tens of millions of lines of code, are worked on by hundreds or even thousands of programmers, and are updated literally every day. To make matters worse, build time have stretched to many minutes, even hours, even languages,on large compilation clusters,”
![Page 29: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/29.jpg)
Moreover, the scale has changed: today’s server programs comprise tens of millions of lines of code, are worked on by hundreds or even thousands of programmers, and are updated literally every day. To make matters worse, build time has stretched to many minutes, even hours, on large compilation clusters”
![Page 30: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/30.jpg)
Moreover, the scale has changed: today’s server programs comprise tens of millions of lines of code, are worked on by hundreds or even thousands of programmers, and are updated literally every day. To make matters worse, build time has stretched to many minutes, even hours, on large compilation clusters”
![Page 31: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/31.jpg)
● multicore processors● networked systems● massive computation
clusters● web programming model
● hundreds or even thousands of programmers
● large compilation clusters
![Page 32: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/32.jpg)
20182000 2005 201090s80s
Go
![Page 33: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/33.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges Go
![Page 34: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/34.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Go
![Page 35: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/35.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
![Page 36: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/36.jpg)
![Page 37: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/37.jpg)
Hard
ware
&
Com
pute
Softw
are |
La
ngua
ges
Conte
xt
20182000 2005 201090s80s
Go
UTF-8
Unix (60s)
C (68-73)
Robert Griesemer, Rob Pike, Ken Thompson
Plan 9
![Page 38: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/38.jpg)
![Page 39: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/39.jpg)
![Page 40: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/40.jpg)
Hard
ware
&
Com
pute
Softw
are |
La
ngua
ges
Conte
xt
20182000 2005 201090s80s
Go
UTF-8
Unix (60s)
C (68-73)
Plan 9 OS
Hotspot JVM
Robert Griesemer, Rob Pike, Ken Thompson
![Page 41: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/41.jpg)
![Page 42: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/42.jpg)
● Concurrency ● Distributed Systems ● Garbage Collection● Memory and Data Locality ● Readability● Simplicity
Go’s 21st Century “5th Gen” Characteristics
![Page 43: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/43.jpg)
Concurrency Why Massive Concurrency?
Why goroutines (green threads) ?
![Page 44: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/44.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
![Page 45: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/45.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
![Page 46: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/46.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
![Page 47: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/47.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
Python Twisted
![Page 48: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/48.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Python Twisted
![Page 49: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/49.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Python Twisted
Her Sutter “The Free Lunch is Over
![Page 50: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/50.jpg)
![Page 51: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/51.jpg)
Hard
ware
&
Com
pute
Softw
are |
La
ngua
ges
Conte
xt
20182000 2005 201090s80s
Go
![Page 52: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/52.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Python Twisted
Her Sutter “The Free Lunch is Over
![Page 53: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/53.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
Python Twisted
Her Sutter “The Free Lunch is Over
![Page 54: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/54.jpg)
Hard
ware
&
Com
pute
Softw
are |
La
ngua
ges
Conte
xt
20182000 2005 201090s80s
Go
![Page 55: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/55.jpg)
Hard
ware
&
Com
pute
Softw
are |
La
ngua
ges
Conte
xt
20182000 2005 201090s80s
Go
![Page 56: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/56.jpg)
Predictions for the end of Moore’s Law
![Page 57: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/57.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
Python Twisted
Her Sutter “The Free Lunch is Over
Concurrent SE: Preparing for Paradigm Shift
![Page 58: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/58.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978) Concurrent SE: Preparing
for Paradigm Shift
![Page 59: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/59.jpg)
1
Why build concurrency on the ideas of CSP?Concurrency and multi-threaded programming have over time developed a reputation for difficulty. [...]One of the most successful models for providing high-level linguistic support for concurrency comes from Hoare’s Communicating Sequential Processes, or CSP. Occam and Erlang are two well known languages that stem from CSP. Go’s concurrency primitives derive from a different part of the family tree whose main contribution is the powerful notion of channels as first class objects. Experience with several earlier languages has shown that the CSP model fits well into a procedural language framework.
![Page 60: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/60.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
Python Twisted
Her Sutter “The Free Lunch is Over
CSP Concurrent SE: Preparing for Paradigm Shift
![Page 61: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/61.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
Python Twisted
Her Sutter “The Free Lunch is Over
CSP Concurrent SE: Preparing for Paradigm Shift
![Page 62: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/62.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
![Page 63: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/63.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App logic
![Page 64: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/64.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App logic
![Page 65: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/65.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App
![Page 66: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/66.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App
![Page 67: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/67.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App
![Page 68: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/68.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App
![Page 69: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/69.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App
![Page 70: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/70.jpg)
Events, Threads and Goroutines
Nginx - event loop plus state machine model
App
![Page 71: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/71.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Concurrent SE: Preparing for Paradigm Shift
![Page 72: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/72.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Concurrent SE: Preparing for Paradigm Shift
![Page 73: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/73.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Concurrent SE: Preparing for Paradigm Shift
![Page 74: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/74.jpg)
![Page 75: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/75.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Concurrent SE: Preparing for Paradigm Shift
![Page 76: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/76.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
Concurrency
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
Concurrent SE: Preparing for Paradigm Shift
![Page 77: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/77.jpg)
![Page 78: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/78.jpg)
![Page 79: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/79.jpg)
![Page 80: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/80.jpg)
![Page 81: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/81.jpg)
![Page 82: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/82.jpg)
App
![Page 83: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/83.jpg)
App
= Threads
![Page 84: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/84.jpg)
![Page 85: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/85.jpg)
![Page 86: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/86.jpg)
![Page 87: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/87.jpg)
CONCURRENCY - Conclusions
● goroutines are a success: give you the same expressiveness of a traditional imperative programming language while hiding the event driven nature of their interactions with the outside world from the programmer.
● when goroutines do need to coordinate, they do so in user space, rather than being forced to use expensive kernel interactions.
![Page 88: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/88.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Distributed Systems Concurrent SE: Preparing for Paradigm Shift
![Page 89: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/89.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Garbage Collection Concurrent SE: Preparing for Paradigm Shift
![Page 90: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/90.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Garbage Collection Concurrent SE: Preparing for Paradigm Shift
![Page 91: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/91.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Memory Locality Concurrent SE: Preparing for Paradigm Shift
![Page 92: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/92.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Memory Locality Concurrent SE: Preparing for Paradigm Shift
Hotspot JVM
![Page 93: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/93.jpg)
Memory & Data Locality
![Page 94: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/94.jpg)
Memory & Data Locality
![Page 95: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/95.jpg)
Memory & Data Locality
![Page 96: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/96.jpg)
Memory & Data Locality
![Page 97: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/97.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Memory Locality Concurrent SE: Preparing for Paradigm Shift
Hotspot JVM
![Page 98: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/98.jpg)
Memory Locality
Java
![Page 99: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/99.jpg)
Memory Locality
Java
No value types
Everything Allocated
![Page 100: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/100.jpg)
Memory Locality
Java
No value types
Everything Allocated
Go
![Page 101: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/101.jpg)
Memory Locality
Java
No value types
Everything Allocated
Go
Structs
True Value types
![Page 102: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/102.jpg)
Memory Locality
Java
No value types
Everything Allocated
Can’t return multiple values (until 2018)
Go
Structs
True Value types
![Page 103: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/103.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Memory Locality Concurrent SE: Preparing for Paradigm Shift
Hotspot JVM
![Page 104: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/104.jpg)
When the three of us [Ken Thompson, Rob Pike, and Robert Griesemer] got started, it was pure research. The three of us got together and decided that we hated C++. [laughter] ... [Returning to Go,] we started off with the idea that all three of us had to be talked into every feature in the language, so there was no extraneous garbage put into the language for any reason.
![Page 105: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/105.jpg)
Memory Locality
Java
No value types
Everything Allocated
Can’t return multiple values
Go
Structs
True Value types
![Page 106: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/106.jpg)
Memory Locality
Java
No value types
Everything Allocated
Can’t return multiple values
Go
Structs
True Value types
compact object layout
No object headers
![Page 107: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/107.jpg)
Memory Locality
Java
No value types
Everything Allocated
Can’t return multiple values
Go
Structs
True Value types
compact object layout
No object headers
![Page 108: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/108.jpg)
Memory Locality
Java
No value types
Everything Allocated
Can’t return multiple values
Go
StructsTrue Value typesCompact object layoutNo object headersLazy initialization of collections
UTF-8UTF-16
![Page 109: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/109.jpg)
Memory and Data Locality (conclusion)
![Page 110: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/110.jpg)
Memory Locality (conclusion)
● Go gives programmers the tools to talk about memory efficiently if they need it.
![Page 111: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/111.jpg)
Memory Locality (conclusion)
● Go gives programmers the tools to talk about memory efficiently if they need it.
● Flexible
![Page 112: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/112.jpg)
Memory Locality (conclusion)
● Go gives programmers the tools to talk about memory efficiently if they need it.
● Flexible● Memory management (not an all-or-nothing like in C++ or
Rust)
![Page 113: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/113.jpg)
Readability
Readability is paramount — Rob Pike
![Page 114: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/114.jpg)
Readability
“ Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. ” — Brian Kernighan
![Page 115: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/115.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
ReadabilityConcurrent SE: Preparing for Paradigm Shift
Hotspot JVM
# of google employees in 2007: 16,805
![Page 116: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/116.jpg)
20172000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
The rise of containers + cloud-native+ ecosystemMicroservicesserverless
Readability Concurrent SE: Preparing for Paradigm Shift
Hotspot JVM
# of google employees in 2010: 24440
![Page 117: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/117.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
Readability Concurrent SE: Preparing for Paradigm Shift
Hotspot JVM
# of google employees in 2018:
~93,500
![Page 118: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/118.jpg)
Readability
simplicity
![Page 119: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/119.jpg)
Readability
simplicity
“simple is better”
![Page 120: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/120.jpg)
Readability
simplicity
“simple is better” “this is an insult to intelligent programmers”
![Page 121: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/121.jpg)
Readability
simplicity
“simple is better”
“you’re trying to commodify programming and create a situation where our bosses can replace us at will”
![Page 122: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/122.jpg)
“You’re not paid to program, you’re not even paid to maintain someone else’s program, you’re paid to deliver solutions to the business.”
- Dave Cheney
![Page 123: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/123.jpg)
Readability
Programs which cannot be maintained will be rewritten
![Page 124: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/124.jpg)
Readability
Programs which cannot be maintained will be rewritten
“If you can’t be replaced, you cannot be promoted”
![Page 125: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/125.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
Her Sutter “The Free Lunch is Over
CSP (1978)
Java Serverlet Model
Readability Concurrent SE: Preparing for Paradigm Shift
Hotspot JVM
# of google employees in 2018:
~93,500
![Page 126: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/126.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
CSP (1978)
Java Serverlet Model
Readability
Hotspot JVM
# of google employees in 2018:
~93,500
Average length of stay at $COMPANY
![Page 127: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/127.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
CSP (1978)
Java Serverlet Model
Readability
Hotspot JVM
# of google employees in 2018:
~93,500
Average length of stay at $COMPANY
![Page 128: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/128.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
CSP (1978)
Java Serverlet Model
Readability
Hotspot JVM
# of google employees in 2018:
~93,500
Average length of stay at $COMPANY
![Page 129: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/129.jpg)
![Page 130: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/130.jpg)
![Page 131: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/131.jpg)
Readability
N+1 different opinions on what makes readability.
Familiarity - Go’s small language footprint (25 keywords)
![Page 132: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/132.jpg)
Readability
Familiarity - Go’s small language footprint (25 keywords)
Ingroup knowledge
![Page 133: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/133.jpg)
Readability
Familiarity - Go’s small language footprint (25 keywords)
Ingroup knowledge
Learners perspectives - First time seeing code
No “magic” - easy vs. Simple
![Page 134: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/134.jpg)
Readability
Familiarity - Go’s small language footprint (25 keywords)
Ingroup knowledge
Learners perspectives - First time seeing code
No “magic” - easy vs. Simple
HTML w3org: 3.2. Priority of Constituencies: User > Author > Implementor
![Page 135: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/135.jpg)
Readability
Personal Convenience.
Convention over Configuration
![Page 136: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/136.jpg)
Readability
Personal Convenience.
Convention over Configuration
![Page 137: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/137.jpg)
Readability
Personal Convenience.
Convention over Configuration
![Page 138: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/138.jpg)
Simplicity
![Page 139: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/139.jpg)
Software Engineering
Software Engineering vs Programming
![Page 140: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/140.jpg)
Software Engineering
Software Engineering vs Programming
Software Engineering = Programming integrated over time.
![Page 141: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/141.jpg)
Software Engineering
Software Engineering vs Programming
Software Engineering = Programming integrated over time.
Engineering is what happens when things need to live longer and influence of time starts creeping in. -Titus Winters
![Page 142: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/142.jpg)
Software Engineering
Software Engineering vs Programming
Software Engineering = Programming integrated over time.
Engineering is what happens when things need to live longer and influence of time starts creeping in. -Titus Winters
All this complexity is fundamentally a different flavor than programming.
![Page 143: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/143.jpg)
Software Engineering
focus on sustaining engineering (readability)
![Page 144: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/144.jpg)
Software Engineering
TIME TRAVELING EVERYWHERE
CI
Unit Tests
Refactoring
Design Patterns
Dependency Management
![Page 145: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/145.jpg)
Software Engineering
focus on sustaining engineering (readability)
continuance of many different engineers over a long period of time
clear module boundaries
keeping import dependencies between packages linear, thus keeping compile times down.
![Page 146: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/146.jpg)
Simplicity and the Greater Good
![Page 147: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/147.jpg)
![Page 148: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/148.jpg)
“Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.”
― Edsger W. Dijkstra
![Page 149: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/149.jpg)
The Future
![Page 150: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/150.jpg)
20182000 2005 201090s80s
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
Go
C++ at Google
C10K
Epoll (linux)
Kqueue (BSD)
SEDA
Java NIO
P4 Core 2
Ruby Mongrel
Gunicorn (Python)
NodeJS
Python Twisted
CSP (1978)
Java Serverlet Model
Readability
Hotspot JVM
# of google employees in 2018:
~93,500
Average length of stay at $COMPANY
![Page 151: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/151.jpg)
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
20402025 2030 20352017 2020
The Future?
The problems we have today were not there 20 years ago, nor will be problems we face 20 years from now.
![Page 152: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/152.jpg)
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
20402015 2020 20252003 2010
The Future?
FuschiaOS
Serverless/FaaS
AI/MLonCodeTersorflow
Kubernetes
“Big Data”
![Page 153: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/153.jpg)
Softw
are |
La
ngua
ges
Hard
ware
&
Com
pute
Conte
xt
20402025 2030 20352017 2020
The Future?
...hang on for the ride
![Page 154: The Why of Go v2€¦ · Concurrency C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Python Twisted Her Sutter “The Free](https://reader034.vdocuments.us/reader034/viewer/2022050214/5f9db37c379c83693b429c93/html5/thumbnails/154.jpg)
Thank you!
Carmen Andoh @carmatrocityGOTO Copenhagen
November 2018