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
220
バッチとゴルーチンあるある
Go Sagawa
August 20, 2019
Tweet
Share
More Decks by Go Sagawa
See All by Go Sagawa
gRPCとgrpc-gatewayを フル活用したweb開発
gosagawa
0
61
GoのWebアプリ開発での DB関連トラブル
gosagawa
0
60
Errors Handling Talks at GopherCon2019
gosagawa
1
500
レガシーシステムあるある.pdf
gosagawa
0
360
Goを会社に導入して半年
gosagawa
0
100
20180228自社勉強会_プッシュ送信周りをマスターする
gosagawa
0
790
Other Decks in Programming
See All in Programming
大規模サイトリビルドの現場から:成功と失敗のリアルな教訓 / Site Rebuild,Real Lessons Learned from Successes and Failures_JJUG Fall 2024
techtekt
0
110
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.3k
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
230
Jakarta EE meets AI
ivargrimstad
0
450
Develop iOS apps with Neovim / vimconf_2024
uhooi
1
100
社内活動の取り組み紹介 ~ スリーシェイクでこんな取り組みしてます ~
bells17
0
160
Better Code Design in PHP
afilina
PRO
0
130
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
230
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.9k
Remix on Hono on Cloudflare Workers
yusukebe
1
320
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
370
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1.2k
Featured
See All Featured
KATA
mclloyd
29
14k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Music & Morning Musume
bryan
46
6.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
450
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Statistics for Hackers
jakevdp
796
220k
How to train your dragon (web standard)
notwaldorf
88
5.7k
GraphQLとの向き合い方2022年版
quramy
43
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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