Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
バッチとゴルーチンあるある
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
96
GoのWebアプリ開発での DB関連トラブル
gosagawa
0
78
Errors Handling Talks at GopherCon2019
gosagawa
1
570
レガシーシステムあるある.pdf
gosagawa
0
380
Goを会社に導入して半年
gosagawa
0
130
20180228自社勉強会_プッシュ送信周りをマスターする
gosagawa
0
880
Other Decks in Programming
See All in Programming
Crash Auto Pipelines
veronikapj
1
320
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7.1k
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
0
140
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
210
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
170
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
14
11k
SODA - FACT BOOK(EN)
sodainc
1
200
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
500
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
820
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
690
GraphQL の onError と Nullability のこれから
quramy
0
200
AI-Powered Domain-Driven Design
ziobrando
0
370
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
390
Building Applications with DynamoDB
mza
96
7.3k
BBQ
matthewcrist
90
10k
Abbi's Birthday
coloredviolet
4
11k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
780
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
580
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.7k
Building Adaptive Systems
keathley
44
3.3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
290
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
490
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