Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go Features and Case Studies
Search
Ian Lewis
April 21, 2015
Technology
0
150
Go Features and Case Studies
Ian Lewis
April 21, 2015
Tweet
Share
More Decks by Ian Lewis
See All by Ian Lewis
Kubernetes Security Best Practices
ianlewis
38
26k
The Enemy Within: Running untrusted code in Kubernetes
ianlewis
0
1.3k
The Enemy Within: Running untrusted code with gVisor
ianlewis
4
1.1k
KubeCon EU Runtime Track Recap
ianlewis
3
1.6k
コンテナによるNoOpsオートメーション
ianlewis
2
150
Google Kubernetes Engine 概要 & アップデート @ GCPUG Kansai Summit Day 2018
ianlewis
2
900
Extending Kubernetes with Custom Resources and Operator Frameworks
ianlewis
10
3.7k
Kubernetesのセキュリティのベストプラクティス
ianlewis
12
17k
Scheduling and Resource Management in Kubernetes
ianlewis
2
1.4k
Other Decks in Technology
See All in Technology
Potential EM 制度を始めた理由、そして2年後にやめた理由 - EMConf JP 2025
hoyo
2
2.7k
Autonomous Database Serverless 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
17
45k
ディスプレイ広告(Yahoo!広告・LINE広告)におけるバックエンド開発
lycorptech_jp
PRO
0
400
MIMEと文字コードの闇
hirachan
2
1.4k
OCI Success Journey OCIの何が評価されてる?疑問に答える事例セミナー(2025年2月実施)
oracle4engineer
PRO
2
160
php-conference-nagoya-2025
fuwasegu
0
150
わたしがEMとして入社した「最初の100日」の過ごし方 / EMConfJp2025
daiksy
14
5.1k
What's new in Go 1.24?
ciarana
1
110
分解して理解する Aspire
nenonaninu
2
1.1k
RayでPHPのデバッグをちょっと快適にする
muno92
PRO
0
190
Ruby on Railsで持続可能な開発を行うために取り組んでいること
am1157154
3
160
JAWS DAYS 2025 アーキテクチャ道場 事前説明会 / JAWS DAYS 2025 briefing document
naospon
0
130
Featured
See All Featured
Thoughts on Productivity
jonyablonski
69
4.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
570
Building Adaptive Systems
keathley
40
2.4k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Side Projects
sachag
452
42k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
The Language of Interfaces
destraynor
156
24k
Transcript
Go言語の可能性と開発事例 QCon Tokyo 2015
Ian Lewis Developer Advocate Google Cloud Platform google.com/+IanLewis-hoge @IanMLewis
Go! Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Go(lang)
• Developed at Google • Created to address problems: ◦ Speed of Software Development ◦ Cumbersome Type Systems ◦ Multiple Cores/Concurrency
Features Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Features
• Compiles to static binary native code • Garbage collector • Strongly typed (types inferred) • Goroutines • Channels • Structs/Interfaces
Static Binary
Image © Renée French. Licensed under CC BY 3.0. Static
Binary • All Code Needed is Bundled • Avoids Problems with Linking at Runtime • Allows for *very* simple deployment
Garbage Collection Image © Takuya Ueda. Licensed under CC BY
3.0.
Image © Renée French. Licensed under CC BY 3.0. Garbage
Collection • Mark and Sweep in 1.1 • Concurrent Mark and Sweep • Hybrid Mark and Sweep/Concurrent in 1.4 • Concurrent Garbage Collector in 1.5
Type Inference Image © Takuya Ueda. Licensed under CC BY
3.0.
Image © Renée French. Licensed under CC BY 3.0. Type
Inference int hoge = 123; // NO!! int fuga = MyFunc(); hoge := 123; // GOOD!! fuga := MyFunc();
Goroutines Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Goroutines
• Concurrent Function • Light Weight Process • Runs on Multiple Cores • Easy to Write
Image © Renée French. Licensed under CC BY 3.0. Goroutines
func MyFunc() { resp, err := http.Get("http://google.com/") } go MyFunc() // Concurrent!!!
Image © Renée French. Licensed under CC BY 3.0. Goroutines
func main() { go MyFunc() // NONO!! // Program will exit to early }
Channels Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Channels
• Like a Queue • Used to Communicate Between Goroutines • Allows for Blocking Operations
Image © Renée French. Licensed under CC BY 3.0. Channels
func MyFunc(done chan int) { resp, err := http.Get("http://google.com/") done <- 1 }
Image © Renée French. Licensed under CC BY 3.0. Channels
func main() { done := make(chan int) go MyFunc(done) <-done // GOOD!!! }
Interfaces Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Interfaces
type Writer interface { Write(p []byte) (n int, err error) }
Image © Renée French. Licensed under CC BY 3.0. Interfaces
type MyWriter struct {} func (w MyWriter) Write(p []byte) (n int, e error) { ... }
Examples Image © Takuya Ueda. Licensed under CC BY 3.0.
Vitess Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Vitess
• Used at Youtube • Sharding MySQL Servers • Serving all YouTube DB traffic since 2011 • http://vitess.io/
Image © Renée French. Licensed under CC BY 3.0.
Image © 2015 Google. Licensed under CC BY 4.0.
Docker Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Docker
• Container Engine • Includes HTTP API Server • Provides Image Packaging Format
Image © Renée French. Licensed under CC BY 3.0.
CoreOS Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. etcd
• Distributed Key-Value Store • Used for Storing Cluster State/Config • Implements RAFT Protocol
Image © Renée French. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. rocket
• Container Runner • Supports Docker Containers • Supports Pods
Image © Renée French. Licensed under CC BY 3.0.
Kubernetes Image © Takuya Ueda. Licensed under CC BY 3.0.
Image © Renée French. Licensed under CC BY 3.0. Kubernetes
• Container Cluster Manager • Manages a Distributed Cluster • Supports Pods • Provides HTTP API
Image © Renée French. Licensed under CC BY 3.0.
Join Us! Image © Takuya Ueda. Licensed under CC BY
3.0.
None
Image © Renée French. Licensed under CC BY 3.0. GoCon
2015 Summer • Biggest Go Event in Japan!! • 2015/06/20 (Sat) • Registration starts 2015/05/01
http://gocon.connpass.com/
Thank You! QCon Tokyo 2015 Ian Lewis Developer Advocate Google
Cloud Platform google.com/+IanLewis-hoge @IanMLewis