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
39
26k
The Enemy Within: Running untrusted code in Kubernetes
ianlewis
0
1.2k
The Enemy Within: Running untrusted code with gVisor
ianlewis
4
890
KubeCon EU Runtime Track Recap
ianlewis
3
1.5k
コンテナによるNoOpsオートメーション
ianlewis
2
130
Google Kubernetes Engine 概要 & アップデート @ GCPUG Kansai Summit Day 2018
ianlewis
2
830
Extending Kubernetes with Custom Resources and Operator Frameworks
ianlewis
10
3.5k
Kubernetesのセキュリティのベストプラクティス
ianlewis
12
16k
Scheduling and Resource Management in Kubernetes
ianlewis
2
1.3k
Other Decks in Technology
See All in Technology
ユーザーストーリーのレビューを自動化したみたの
bun913
1
330
反実仮想機械学習とは何か
usaito
PRO
7
2.3k
オーナーシップを持つ領域を明確にする
konifar
11
2.6k
普段有償でサポート業務をしているCSAが技術知見を無料で公開する理由
07jp27
1
640
DevOpsメトリクスとアウトカムの接続にトライ!開発プロセスを通して計測できるメトリクスの活用方法
ham0215
1
200
OpenTelemetry を使ったトレースエグザンプラーの活用 / otel-trace-exemplar
k6s4i53rx
2
640
なぜ NOT A HOTEL が Web3 に取り組むのか - NOT A HOTEL TECH TALK
ynunokawa
0
160
[2024年3月版] Databricksのシステムアーキテクチャ
databricksjapan
8
1.9k
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
[PlatformCon 24] Platform Orchestrators: The Missing Middle of Internal Developer Platforms?
danielbryantuk
1
180
シン・Kafka / shin-kafka
oracle4engineer
PRO
7
2.7k
日本におけるデータエンジニアリングのこれまでとこれから
foursue
11
2.4k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
324
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
39
4.4k
The Invisible Side of Design
smashingmag
294
49k
How GitHub (no longer) Works
holman
304
140k
4 Signs Your Business is Dying
shpigford
175
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
12
1.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
15
2.6k
We Have a Design System, Now What?
morganepeng
42
6.7k
Designing Experiences People Love
moore
136
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
119
38k
Six Lessons from altMBA
skipperchong
20
3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
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