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
230
バッチとゴルーチンあるある
Go Sagawa
August 20, 2019
Tweet
Share
More Decks by Go Sagawa
See All by Go Sagawa
gRPCとgrpc-gatewayを フル活用したweb開発
gosagawa
0
67
GoのWebアプリ開発での DB関連トラブル
gosagawa
0
61
Errors Handling Talks at GopherCon2019
gosagawa
1
510
レガシーシステムあるある.pdf
gosagawa
0
360
Goを会社に導入して半年
gosagawa
0
110
20180228自社勉強会_プッシュ送信周りをマスターする
gosagawa
0
800
Other Decks in Programming
See All in Programming
ソフトウェアエンジニアの成長
masuda220
PRO
10
920
Honoとフロントエンドの 型安全性について
yodaka
5
330
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
SwiftUI Viewの責務分離
elmetal
PRO
1
220
Formの複雑さに立ち向かう
bmthd
1
810
CI改善もDatadogとともに
taumu
0
110
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
720
Immutable ActiveRecord
megane42
0
140
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
120
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
9
3.4k
もう僕は OpenAPI を書きたくない
sgash708
3
990
ARA Ansible for the teams
kksat
0
150
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Rails Girls Zürich Keynote
gr2m
94
13k
A better future with KSS
kneath
238
17k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
31
2.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Writing Fast Ruby
sferik
628
61k
BBQ
matthewcrist
86
9.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
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