Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Recap: `How Uber "Go"es` in Japanese
Search
Kutsuzawa Ryo
August 26, 2019
Programming
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Recap: `How Uber "Go"es` in Japanese
Kutsuzawa Ryo
August 26, 2019
Transcript
25 slides
gopherCon 2019 報告会 How Uber “Go”es gopherCon 2019 Report, AUG
26 2019 沓澤 遼 NTT レゾナント 1
Today’s (glorious) blather. 自己紹介 01 How Uber “Go”es by Elena
Morozova 費用の話 gopherCon に参加してみて 02 03 04 2
自己紹介 SECTION ONE 3
自己紹介 gopherCon 2019 報告会 type Person struct { Name string
Company string Title string Skills []string }{ Name: 沓澤 遼, Company: NTTレゾナント Title: Service Engineer Skills: []string{Go, Cloud Foundry, PHP(Laravel)} } 4
How Uber “Go”es By Elena Morozova SECTION TWO 5
Uber社の発表を参考にサンプル書いてみた gopherCon 2019 報告会 6 既に内容把握してる方はこちらを御覧ください
背景 gopherCon 2019 報告会 • Uber社では 2014年から Goを採用 • 以後指数関数的に
Goコード量が増加 Inconsistency が発生 [1] How Uber "Go"es 7 主な意味:不一致、矛盾、無定見
問題点 gopherCon 2019 報告会 1) サービスの新規作成が大変 Loggerの初期化等を全サービスが 各々で記述 2) コンテキストスイッチ
ディレクトリ構成の不一致 3) 社内で共通して利用する機能の提供が困難 アップデートした際に全サービスに対応を依頼 する必要有 8
解決策 gopherCon 2019 報告会 1) サービスの新規作成が大変 DIを利用 2) コンテキストスイッチ Glueアーキテクチャ
3) 社内で共通して利用する機能の提供が困難 Monorepo 9
1. DI gopherCon 2019 報告会 uber-go/fx A dependency injection based
application framework for Go 10 • 依存の解決をよしなに行う(uber-go/dig) • ライフサイクルを定義可能 ◦ 開始時と終了時の振る舞いを記述できる
よしなに依存性の注入を行うサンプル gopherCon 2019 報告会 11 ”taro" と 26 が, NewPersonの引数として
処理される Invokeで指定したメソッドが実行され る. Showの引数には NewPersonの 返り値の *Person が入る Output) Name: taro, age 26 github.com/bookun/glue-sample/example/ yoshina/main.go
ライフサイクルを定義したサンプル gopherCon 2019 報告会 12 起動した際の振る舞いと 終了された際の振る舞いを 定義することができる github.com/bookun/glue-sample/example/ lifecycle/main.go
1. DI gopherCon 2019 報告会 [1] How Uber "Go"es 13
1. DI gopherCon 2019 報告会 14 社内で共通で利用する Config, Logger等を DIパッケージ内で初期化
github.com/bookun/glue-sample/di/fx.go github.com/bookun/glue-sample/di/config.go
1. DI gopherCon 2019 報告会 15
2. Glue -Clean Archtecture を基にしたアーキテクチャ gopherCon 2019 報告会 • Handler •
Controller • Repository • Gateway からなる アーキテクチャ [1] How Uber "Go"es 16
17 2. Glue gopherCon 2019 報告会 17 web(handler)、DB(repo) controller, gateway
use cases entity Clean Architecture とのマッピングとかが よくわからなかった 発表の図からは Handler, Repository, Gateway が外側で Controllerが内側のように見えたが。。。。。
3. Monorepo gopherCon 2019 報告会 Uber社が持つmicro serviceは1500 Repositoryを分散すると共通機能のUpdate で1500Commits発生することに 共通機能のUpdateを各担当者に行って
もらうのは困難 Monorepoで運用 18
Uber社の発表を参考にサンプル書いてみた gopherCon 2019 報告会 19
glue-sample gopherCon 2019 報告会 • DIパッケージ内にservice 内で共通的に利用できる loggerやconfigの初期化 について書いてある •
各サービスはglueに従った ディレクトリ構成 20
費用の話 SECTION THREE 21
会社の施策:海外カンファレンス派遣プログラム gopherCon 2019 報告会 ❏ 最新の技術やサービスの動向を把握し事業推進に活用 ❏ 専門領域におけるスキル向上 ❏ グローバル人材の育成
目的 費用(交通費、宿泊費、カンファレンス参加料等)は 全て会社負担!! 選択型: Tech Crunch, South by Southwest 等 自由型: 自身で業務に役立ちそうなものを選択 gopherCon 行かせてください! 22
gopherConに参加してみて SECTION FOUR 23
gopherCon 2019 に参加してみて gopherCon 2019 報告会 • 新鮮なGo情報に触れられて楽しい • Gopherの多さにモチベが上がった
• 英語力不足を痛感 セッションはリアルタイム字幕とスライドがあるためなんと かなる ランチタイムに他のgopherともっとおしゃべり したかった 24
参考資料 gopherCon 2019 報告会 [1] How Uber "Go"es 25
More Decks by Kutsuzawa Ryo
See All by Kutsuzawa Ryo
大企業でもできる!短期間でプロダクトローンチするための勘所
oliva
8
6.7k
Slack bot をGoでつくってみた
oliva
1
180
Other Decks in Programming
See All in Programming
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
410
てっくりーどのおしごと in Swift愛好会 #101
yuukiw00w
2
110
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
450
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
440
Kiro Crewによる開発体験ーKiro CrewでStrands Decider 2B に関する技術検証をやってみた
satoshi256kbyte
1
240
将来の標準フォーマッター?ktfmtを深堀る
t45k
1
260
高速開発を止めずに 性能を上げる Flyleのシステム刷新と改善の歴史
azihsoyn
0
110
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
440
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
360
SODA - FACT BOOK(EN)
sodainc
1
310
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
360
Featured
See All Featured
Test your architecture with Archunit
thirion
2
2.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
Agile that works and the tools we love
rasmusluckow
331
22k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
660
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Optimising Largest Contentful Paint
csswizardry
37
4k
Google's AI Overviews - The New Search
badams
0
1.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
870
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
640
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
890
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k