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
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
バッチとゴルーチンあるある
Go Sagawa
August 20, 2019
More Decks by Go Sagawa
See All by Go Sagawa
gRPCとgrpc-gatewayを フル活用したweb開発
gosagawa
0
85
GoのWebアプリ開発での DB関連トラブル
gosagawa
0
77
Errors Handling Talks at GopherCon2019
gosagawa
1
560
レガシーシステムあるある.pdf
gosagawa
0
380
Goを会社に導入して半年
gosagawa
0
120
20180228自社勉強会_プッシュ送信周りをマスターする
gosagawa
0
860
Other Decks in Programming
See All in Programming
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
370
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
2.7k
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
420
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
720
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
120
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
1
130
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
250
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
280
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4k
My Marp Sample
sinoue0108
0
110
Cloudflare is Agents
chimame
0
180
Dockerfile CMD for Node.js
grazie1999
0
110
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.1k
Into the Great Unknown - MozCon
thekraken
41
2.7k
The Cult of Friendly URLs
andyhume
79
7k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
First, design no harm
axbom
PRO
2
1.3k
How STYLIGHT went responsive
nonsquared
100
6.2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Ruling the World: When Life Gets Gamed
codingconduct
0
310
We Are The Robots
honzajavorek
0
300
Faster Mobile Websites
deanohume
310
32k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
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