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.3k
KubeCon EU Runtime Track Recap
ianlewis
3
1.6k
コンテナによるNoOpsオートメーション
ianlewis
2
170
Google Kubernetes Engine 概要 & アップデート @ GCPUG Kansai Summit Day 2018
ianlewis
2
950
Extending Kubernetes with Custom Resources and Operator Frameworks
ianlewis
10
3.8k
Kubernetesのセキュリティのベストプラクティス
ianlewis
12
17k
Scheduling and Resource Management in Kubernetes
ianlewis
2
1.4k
Other Decks in Technology
See All in Technology
DeNA での思い出 / Memories at DeNA
orgachem
PRO
5
1.8k
LLMエージェント時代に適応した開発フロー
hiragram
1
460
衝突して強くなる! BLUE GIANTと アジャイルチームの共通点とは ― いきいきと活気に満ちたグルーヴあるチームを作るコツ ― / BLUE GIANT and Agile Teams
naitosatoshi
0
230
Figma + Storybook + PlaywrightのMCPを使ったフロントエンド開発
yug1224
10
3.4k
VPC Latticeのサービスエンドポイント機能を使用した複数VPCアクセス
duelist2020jp
0
330
ソフトウェア エンジニアとしての 姿勢と心構え
recruitengineers
PRO
22
11k
ここ一年のCCoEとしてのAWSコスト最適化を振り返る / CCoE AWS Cost Optimization devio2025
masahirokawahara
1
280
進捗
ydah
1
210
役割は変わっても、変わらないもの 〜スクラムマスターからEMへの転身で学んだ信頼構築の本質〜 / How to build trust
shinop
0
120
事業価値と Engineering
recruitengineers
PRO
6
4.6k
制約理論(ToC)入門
recruitengineers
PRO
8
3.3k
Postman MCP 関連機能アップデート / Postman MCP feature updates
yokawasa
1
210
Featured
See All Featured
Building Adaptive Systems
keathley
43
2.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
830
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
284
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
185
54k
Facilitating Awesome Meetings
lara
55
6.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
Visualization
eitanlees
147
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Balancing Empowerment & Direction
lara
3
600
Git: the NoSQL Database
bkeepers
PRO
431
65k
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