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言語をほぼ毎日書いている話 (序) / Daily coding in Go
Search
Yuuki Tsubouchi (yuuk1)
April 29, 2017
Programming
4
7.5k
Go言語をほぼ毎日書いている話 (序) / Daily coding in Go
そうだ、Go京都。
Yuuki Tsubouchi (yuuk1)
April 29, 2017
Tweet
Share
More Decks by Yuuki Tsubouchi (yuuk1)
See All by Yuuki Tsubouchi (yuuk1)
MetricSifter:クラウドアプリケーションにおける故障箇所特定の効率化のための多変量時系列データの特徴量削減 / FIT 2024
yuukit
2
90
工学としてのSRE再訪 / Revisiting SRE as Engineering
yuukit
18
10k
Cloudless Computingの論文紹介
yuukit
2
380
#SRE論文紹介 Detection is Better Than Cure: A Cloud Incidents Perspective V. Ganatra et. al., ESEC/FSE’23
yuukit
3
1.3k
エンジニアのためのSRE論文への招待 / Introduction to SRE Papers for Engineers
yuukit
2
10k
博士課程での研究まとめ 2023年1月版 / Summary of my research in the PhD course
yuukit
1
230
AI時代に向けたクラウドにおける信頼性エンジニアリングの未来構想 / DICOMO2022 6A-1
yuukit
7
2.8k
AIOps研究録―SREのための システム障害の自動原因診断 / SRE NEXT 2022
yuukit
10
12k
Interactive AIOps
yuukit
0
2k
Other Decks in Programming
See All in Programming
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
500
全方位強化 Python 服務可觀測性:以 FastAPI 和 Grafana Stack 為例
blueswen
1
360
Iteratorでページネーションを実現する
sonatard
3
700
What is TDD?
urakawa_jinsei
1
200
"noncopyable types" の使いどころについて考えてみた
andpad
0
130
[PHPカンファレンス沖縄2024]「無理なくできるだけ安全に」テストもないレガシーコードをリファクタリングするテクニック
ikezoemakoto
3
110
Cloud Adoption Frameworkにみる組織とクラウド導入戦略(縮小版)
tomokusaba
1
170
Go製CLIツールGatling Commanderによる負荷試験実施の自動化
okmtz
3
650
(Deep|Web) Link support with expo-router
mrtry
0
100
ビット演算の話 / Let's play with bit operations
kaityo256
PRO
4
160
上手に付き合うコンポーネントテスト
quramy
3
1.2k
NANIMACHI
naokiito
0
930
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Gamification - CAS2011
davidbonilla
80
5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
279
13k
Making the Leap to Tech Lead
cromwellryan
130
8.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
4 Signs Your Business is Dying
shpigford
180
21k
The Cost Of JavaScript in 2023
addyosmani
43
5.8k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
How to train your dragon (web standard)
notwaldorf
87
5.6k
Art, The Web, and Tiny UX
lynnandtonic
295
20k
Transcript
GoݴޠΛ ΄΅ຖॻ͍͍ͯΔ (ং) ͯͳ id:y_uuki
id:y_uuki / @y_uuk1 Yuuki Tsubouchi https://yuuk.io גࣜձࣾͯͳ WebΦϖϨʔγϣϯΤϯδχΞ / γχΞΤϯδχΞ
Goྺ • 2013͙Β͍͔ΒWatch • 2014ʹ·ͱʹॻ͖࢝Ίͨ • ࠷ॳTour of Go •
Go Kyotoͱ͍͏Jxck ͞ΜʹΑΔϋϯζΦϯʹࢀՃ • mkr / mackerel-client-go ͳͲΛॻ͍ͨ • 2015~2016લ ͍͔ͭ͘ΦϖϨʔγϣϯπʔϧͭͬͨ͘ • grabeni / droot / gokc ͳͲ
http://developer.hatenastaff.com/entry/golang-for-ops
None
ͳΜͰ ຖॻ͖࢝Ίͨͷ͔
ͳΜͰຖॻ͖࢝Ίͨͷ͔ • ΦϖϨʔγϣϯ͢ΔΑΓɺιϑτΣΞͱ͔จষΛॻ ͍ͯΔͱ͖ͷ΄͏͕࣮͖ • ϒϩά͍͍͚Ͳ͍͔ͭදతϓϩμΫτΛ࡞ͬͯΈ ͍ͨ • ͔͠͠ɺιϑτΣΞΛॻ͘εΩϧͱɺॻ্͖͛Δମ ྗ͕Γͳ͍
=> ຖίʔυॻ͜͏
Site Reliability Engineering HOW GOOGLE RUNS PRODUCTION SYSTEMS Photo by
O’reilly Media / CC by 3.0 http://shop.oreilly.com/product/0636920041528.do https://creativecommons.org/licenses/by/3.0/deed
ͳʹΛ ຖॻ͍͍ͯΔͷ͔
DiamonDB https://github.com/yuuki/diamondb
write datapoints Kinesis Streams Lambda read datapoints ElastiCache DynamoDB Lambda
TTL expired flush write Web App (Golang) S3 read read read
write datapoints Kinesis Streams Lambda read datapoints ElastiCache DynamoDB Lambda
TTL expired flush write Web App (Golang) S3 read read read AWSͷෳͷσʔλετΞΛ Έ߹Θͤͨ Go ΣϒΞϓϦέʔγϣϯ
ͳʹΛຖॻ͍͍ͯΔͷ͔ • DiamonDB • ͍͍ͩͨಉ͡ΞʔΩςΫνϟͷͷΛۀͰ։ൃத • ίʔυϕʔεۀͷͱผ • ͜Ε·Ͱͭͬͨ͘πʔϧͷϝϯςφϯε •
ۀͰ͍ͬͯΔͷͰɺमਖ਼ػೳՃ • Pull RequestରԠ
ຖॻͨ͘Ίʹ Δ͜ͱ
ຖॻͨ͘ΊʹΔ͜ͱ • ʮຖʯࣗମʹҙຯͳ͘ɺܧଓతʹίʔυΛॻ͚Δ͔͕େࣄ • 1 commit / day ͰΑ͍ •
Ͳ͏͚ͯ͠͠Εɺgit commit —date Ͱ͔͖͔͑ • ͜ΕͰϞνϕʔγϣϯ͕ଓ͘ͳΒͦΕͰΑ͍ • ฏ͋·Γॻ͚ͳ͍ͷͰɺͷ͏ͪʹΠγϡʔΛ༻ҙ • ۀͱ݁ͼ͚ͭΔ • ෳͷϓϩδΣΫτΛͭ
ຖॻ͍͍ͯͯ Θ͔ͬͨ͜ͱ
ຖॻ͍͍ͯͯΘ͔ͬͨ͜ͱ • ຖίʔυॻͨ͘ΊͷϦζϜ͕Ͱ͖Δ • ϝϞϦʹͷͬͯΔͷͰɺ࣍ʹॻ͘ͱ͖ʹ·ͳ͍ • ͍͖ͳΓେ͖͘มߋ͢ΔͷͰͳ͘ɺখ͞ͳมߋΛੵ ΈॏͶΔΑ͏ʹͳΔ • ʹແཧ͠ͳ͘ͳΔ
• ແཧΛ͢Δͱ݁ہଓ͔ͳ͍
Go tips
https://github.com/yuuki/yuuki/blob/master/golang/http-api-server-stack.md GoͰHTTP APIαʔόॻ͘ͱ͖ͷελοΫ GoͰHTTP APIαʔόॻ͘ ͱ͖ͷελοΫ
https://medium.com/@haya14busa/idiomatic-go-readability-f0b42ef381dc
https://github.com/golang/go/wiki/CodeReviewComments
;ͩΜΈ͍ͯΔ Gophers • @deeeet • @mattn • @motemen • @Songmu
• @haya14busa • @davecheney • @dgryski
Πϯϓοτ ͱ Ξτϓοτ
ΠϯϓοτͱΞτϓοτ • Πϯϓοτ: ຊΛಡΉɺϒϩάΛಡΉͳͲ • Ξτϓοτ: ٕज़ஊٛɺൃදɺϒϩάɺίʔυͳͲ • ݺٵͷΑ͏ͳͷ •
Πϯϓοτ͢ΔͱΞτϓοτͨ͘͠ͳΔɻΞτϓο τ͢Δͱ·ͨΠϯϓοτΛͱΊΔ • ΞτϓοτҰݟແବʹΈ͑Δ͕ɺఆظతʹΞτϓο τ͢Δ͜ͱͰΠϯϓοτ૿͍͑ͯ͘
GoݴޠΛ ΄΅ຖॻ͍͍ͯΔ (ং) ͯͳ id:y_uuki