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
バッチとゴルーチンあるある
Search
Go Sagawa
August 20, 2019
Programming
0
250
バッチとゴルーチンあるある
Go Sagawa
August 20, 2019
Tweet
Share
More Decks by Go Sagawa
See All by Go Sagawa
gRPCとgrpc-gatewayを フル活用したweb開発
gosagawa
0
73
GoのWebアプリ開発での DB関連トラブル
gosagawa
0
66
Errors Handling Talks at GopherCon2019
gosagawa
1
540
レガシーシステムあるある.pdf
gosagawa
0
370
Goを会社に導入して半年
gosagawa
0
110
20180228自社勉強会_プッシュ送信周りをマスターする
gosagawa
0
810
Other Decks in Programming
See All in Programming
Devoxx BE - Local Development in the AI Era
kdubois
0
130
明日から始めるリファクタリング
ryounasso
0
140
CSC509 Lecture 04
javiergs
PRO
0
300
XP, Testing and ninja testing ZOZ5
m_seki
3
630
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
400
開発生産性を上げるための生成AI活用術
starfish719
3
610
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
570
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.6k
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
120
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
210
理論と実務のギャップを超える
eycjur
0
130
CSC305 Lecture 05
javiergs
PRO
0
210
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
What's in a price? How to price your products and services
michaelherold
246
12k
Code Review Best Practice
trishagee
72
19k
Balancing Empowerment & Direction
lara
4
690
It's Worth the Effort
3n
187
28k
The Language of Interfaces
destraynor
162
25k
How GitHub (no longer) Works
holman
315
140k
Bash Introduction
62gerente
615
210k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Building Better People: How to give real-time feedback that sticks.
wjessup
369
20k
Practical Orchestrator
shlominoach
190
11k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
189
55k
Transcript
όονͱΰϧʔνϯ ͋Δ͋Δ and factory, inc ࠤ ߽ @go_sagawa ͋Δ͋ΔLTʙαʔόʔαΠυΤϯδχΞʙ Vol.4
1
2 ۀͰόονΛ ॻ͍͍ͯΔਓʁ
3 ۀͰGoΛॻ ͍͍ͯΔਓʁ
όον͋Δ͋Δ̍ 4 ͕͔͔࣌ؒΔ⏰
όον͋Δ͋Δ̎ 5 ఆظ࣮ߦͯͨ͠Βɺ લͷόον͕ऴΘͬͯͳͯ͘ େมͳࣄʹͳΔ
goͱgoroutine͋Δ͋Δ̍ 6 ۀͰgoͬͨࣄͳ͍Αʂ
goͱgoroutine͋Δ͋Δ̎ 7 goroutineͬͯͲ͜ʹ͏ͷʁ
8 ݁
9 όονͰ goͱgoroutine ͓͏ʂ
10 goroutine ͷେࣄͳॴ
11 goroutine %ฒߦॲཧ% &ฒྻॲཧ&
12 ฒߦ ฒྻ Concurrency is not Parallelism / Rob Pikeʢhttps://talks.golang.org/2012/waza.slideʣΑΓ
13 ҟͳΔ༰Λ ಉ࣌ʹߦ͑Δʂ
14 ฒߦ ฒྻ • ։࢝ˠॏ͍ॲཧA→ॏ͍ॲཧB→ऴྃ →A,BΛͦΕͧΕฒߦ࣮ͯ͠ߦ • ॲཧΛͭͭ͠ɺλΠϚʔͰҰఆ࣌ؒͨͬͨΒڧ੍ ऴྃ •
։࢝ˠAPIΞΫηεˠ݁ՌΛอଘˠऴྃ →APIΞΫηεΛಉ࣌ॲཧ
15 ࣮༻తͳέʔε ɾAPI࣮ߦˠDBอଘΛฒྻʹߦ͏ ɾAPIಉ࣌ʹNຊ·Ͱ࣮ߦ͢Δ ɾ݁Ռ·ͱΊͯDBʹอଘ͢Δ
16 σϞ https://play.golang.org/p/Dm3-N_sxFOq
17 and factoryͱgo
18 PHP + CodeIgniter
19 PHP + CodeIgniter go (batch)
20 PHP + CodeIgniter go (API & batch)
21 PHP CodeIgniter go - clean archtecture - gRPC -
grpc-gateway vue.js ʢʣओʹsmartphone app ࣄۀ෦ʹ͍ͭͯͰɺશࣾͱͯͬ͠ͱଟ͘ͷٕज़ελοΫΛར༻͍ͯ͠·͢ɻ
22 ੋඇ࣮ͰgoΛʂ ·ͣόον͔Βʂ ʢand factoryͰgoΓ͍ͨਓͪΖΜੋඇʂʣ
ࢀߟ • ϗϦωζϛͰΘ͔ΔGoroutineೖ / golang.tokyo#14 https://speakerdeck.com/morikuni/golang-dot-tokyo-number- 14 جຊతͳgoroutineͷ͍ํɺҾ͔͔ͬΓ͍͢ॴ͕ཏ ͞Ε͓ͯΓɺඇৗʹΘ͔Γ͍͢Ͱ͢
23
ࢀߟ • Go ͷ channel ॲཧύλʔϯू https://hori-ryota.com/blog/golang-channel-pattern/ channelͷॲཧύλʔϯ͕·ͱΊΒΕ͓ͯΓɺ࣮ࡍʹ͏࣌ ͷ༷ʑͳϢʔεέʔεʹͰ͖ͦ͏Ͱ͢
24
ࢀߟ • [ॻ੶] GoݴޠʹΑΔฒߦॲཧ https://www.oreilly.co.jp//books/9784873118468/index.html goroutineͷॲཧͷৄࡉ·Ͱɺਂ͍ࣝΛಘ͍ͨͷͰ͋Ε ͓͢͢ΊͰ͢ 25