Confidential & Proprietary Google Cloud Platform 2 Ian Lewis Developer Advocate, Google Cloud Platform Tokyo, Japan @IanMLewis google.com/+IanLewis-hoge
Confidential & Proprietary Google Cloud Platform 8 Goroutines & Channels func sum(a []int, c chan int) { sum := 0 for _, v := range a { sum += v } c <- sum // send sum to c }
Confidential & Proprietary Google Cloud Platform 9 Goroutines & Channels func main() { a := []int{7, 2, 8, -9, 4, 0} c := make(chan int) go sum(a[:len(a)/2], c) go sum(a[len(a)/2:], c) x, y := <-c, <-c // receive from c fmt.Println(x, y, x+y) }
Confidential & Proprietary Google Cloud Platform 13 Vitess ● Used at Youtube ● Sharding MySQL Servers ● Serving all YouTube DB traffic since 2011 ● http://vitess.io/
Confidential & Proprietary Google Cloud Platform 17 Go 1.5 ● Released Aug 2015 ● Go 1.0から、一番大きいリリース ● 新しい並行GC ● Go コンパイラやツールチェインの改善 ● パッケージベンダリング (beta) ● goroutineスケジューラーの改善
Confidential & Proprietary Google Cloud Platform 27 Go コンパイラやツールチェインの改善 $ go test -o pkg.test net/http -trace trace.out ok net/http 20.876s $ go tool trace pkg.test trace.out
Confidential & Proprietary Google Cloud Platform 43 Ian Lewis Developer Advocate, Google Cloud Platform Tokyo, Japan @IanMLewis google.com/+IanLewis-hoge Thank You!