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
GunosyでのMicroservicesの現状とGoの使いどころ
Search
y_matsuwitter
March 11, 2015
Programming
6
4.7k
GunosyでのMicroservicesの現状とGoの使いどころ
Gunosy.go#11での発表資料
y_matsuwitter
March 11, 2015
Tweet
Share
More Decks by y_matsuwitter
See All by y_matsuwitter
Product Utilization of Large Language Models Starting Today
ymatsuwitter
3
2.3k
経営・意思・エンジニアリング
ymatsuwitter
23
19k
LLM in 2023 and 2024
ymatsuwitter
8
5.4k
Turbulent Technological Changes and Career Strategies
ymatsuwitter
2
2.6k
LLM in toB Service and Its UX
ymatsuwitter
6
10k
Agent and small LLM validation
ymatsuwitter
7
2.9k
Information management for a culture of speed: The story of Notion and LayerX
ymatsuwitter
4
9.7k
Monorepo on AWS
ymatsuwitter
0
280
Tech behind LayerX SaaS products
ymatsuwitter
0
3k
Other Decks in Programming
See All in Programming
情報漏洩させないための設計
kubotak
4
1.1k
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
600
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
340
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
780
Go の GC の不得意な部分を克服したい
taiyow
3
890
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
360
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
290
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
8
1.7k
선언형 UI에서의 상태관리
l2hyunwoo
0
230
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
360
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
160
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.2k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
176
9.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Git: the NoSQL Database
bkeepers
PRO
427
64k
A Tale of Four Properties
chriscoyier
157
23k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Navigating Team Friction
lara
183
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
How GitHub (no longer) Works
holman
311
140k
Rails Girls Zürich Keynote
gr2m
94
13k
Designing for Performance
lara
604
68k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
18
2.3k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Transcript
GunosyͰͷ Microservisesͷݱঢ়ͱ Goͷ͍Ͳ͜Ζ @y_matsuwitter
ࣗݾհ • ։ൃຊ෦ࣥߦһࡶ༻ • iOS, Android, Infrastructure, Web • Golangڭ
• ਖ਼࠲ • ࠷ۙؾʹͳΔͷ: MQTT
࠷ۙίʔυॻ͚ͯ·ͤΜ…
ࠓͷ • GunosyͰӡ༻͍ͯ͠ΔMicroservicesͷ • ͦͷதͰGoΛͲ͏͍ͬͯΔ͔
Microservices = খ͞ͳαʔϏεͷΈ߹Θͤ
What is microservices? • <=> Monolithic • దͳنͷϏδωευϝΠϯ͝ͱʹ෦αʔϏεΛׂ • ΞϓϦέʔγϣϯଆ͔Β֤छAPIΛݺͼग़͢
• αʔϏεʹ߹Θٕͤͨज़બఆΛ࣮ࢪ • SOAͷম͖͠
Why microservices? • Ϗδωεʹ߹ΘͤͨνʔϜͷׂɾฤ • খ͞ͳαʔϏεʹΑΔଐਓੑͷرബԽ • Ϗδωεཁٻʹର͢ΔॊೈͳରԠ • ͍Βͳ͍ͷΛࣺͯΒΕΔ
ϞϊϦγοΫͳγεςϜͰɺϏδωε͕͢Δʹै͍վम ίετ͕૿Ճ͍ͯ͘͠
ࣄྫ: Soundcloud • طଘͷϞϊϦγοΫ͕͋ͬͨ • ϦϑΝΫλϦϯάͷஈ֊ͰαʔϏεΛੳ • ϏδωευϝΠϯ͝ͱʹMicroserviceΛߏங • FinagleϕʔεͷRPCͰେྔͷJVM্ͷΞϓϦΛ݁߹
• ͦͷ্Ͱ༷ʑͳݴޠΛӡ༻ ࢀߟ: Building Products at SoundCloud
MicroservicesͷதͰੜ ͖ΔGo
ͳͥGoͳͷ͔ • ֎෦ґଘͷͳ͍όΠφϦ • ܰྔ͔ͭϋΠύϑΥʔϚϯε • ڞ௨ϥΠϒϥϦΓग़ָ͕͠
GunosyͰͷ
None
• άϊγʔͱ͍͏୯ҰͷχϡʔεΞϓϦ • ෦ϏδωευϝΠϯ͝ͱʹׂ • PlatformߏʹΑΓ෦ͷϏδωευϝΠϯຖ݄̎ͭ΄Ͳ ૿͍͑ͯΔ
None
ࣾMicroserviceͷߏཁૉ • API༻HTTPαʔό • όονॲཧܥαʔό • ཧը໘ • Πϯϑϥߏɾཧπʔϧ
None
APIαʔό • ༻ҙ͞ΕͨσʔλΛదͳυϝΠϯϩδοΫʹͯฦ٫ • େͷAPI͕Golang
APIαʔόɺ͍ͬͯΔͷ • Kami ... WebFramework • mogi ... SQL stub
ϞσϧͳͲΛڞ༗ύοέʔδʹΓग़͠ɺ͍·Θ͢
ύοέʔδߏ • ϏδωευϝΠϯ͝ͱʹ1ϦϙδτϦ • ෦ߋʹࡉ͔͚ͨ͘υϝΠϯ͝ͱʹύοέʔδΛΔ example-service-1 ├── domain-1 ├── domain-2
├── main.go └── routes.go common-package ├── domain-1 ├── domain-2 └── main.go
None
όονॲཧ • ࣌ʹେྔͷσʔλΛɺAPIར༻KPIूܭͷͨΊʹར༻ • ෳαʔόͰͷฒྻॲཧ͕ඞཁͳ໘ଟʑ
όονॲཧ w/ Go • Goฐࣾͷόονॲཧʹࠓͷͱ͜Ζ΄΅ར༻͞Εͣ • େPython • ෳαʔόʹ·͕ͨΔͷPython +
Celery • APIͱͷڞ௨ॲཧ͕͋Γɺ1ΠϯελϯεͰࡁΉॲཧͷΈGo • ʢCacheσʔλͷੜͳͲʣ
None
ཧը໘ • σʔλεΩʔϚʹԠͯ͡ॊೈʹϑΥʔϜɾϦετΛੜɺॲ ཧ • ༷ʑͳόονॲཧΛΩοΫ͢Δ
ཧը໘ w/ Golang • ݴޠͷੑ࣭Ώ͑ɺॊೈͳϑΥʔϜੜɾӡ༻ʹ͍ͨπʔϧ গͳ͍ • ࣾͷཧܥDjango͔Rails͕ओ • APIܦ༝ͰGoAPIΛؒతʹར༻͢Δ͜ͱ͕ଟ͍
• νϟοτͷॲཧͳͲ
None
Πϯϑϥཧܥ • ֤छΞϓϦέʔγϣϯͷσϓϩΠ • ϞχλϦϯά
Πϯϑϥ w/ Go • ཧܥπʔϧͰGoͷͷଟ͍ • GoΛॻ͘͜ͱগͳ͍ • શମͷߏཧOpsworksͰ࣮ࢪ
σϓϩΠ w/ Go • go build͠ɺOpsworksʹΑΓඞཁͳϑΝΠϧ܈ΛS3ܦ༝Ͱ Β·͘ • CapistranoͷΓํʹ͍ۙσϓϩΠϑϩʔ /path/to/service
├── shared │ ├── logs │ ├── tmp │ └── config ├── 20150306085540 │ ├── bin │ ├── public │ └── etc... ├── 20150306090324 └── current -> /path/to/service/releases/20150306090324
·ͱΊ • ϏδωευϝΠϯ͝ͱʹҰͭͷαʔϏε܈Λ࡞ • GoʹͯύϑΥʔϚϯεΛ֬อͭͭ͠υϝΠϯؒɾϨΠϠʔؒ Ͱ࿈ܞ • ݱঢ়ͰαʔϏεͷՃʹ༨༟͕ग़ͯ͘Δఔʹ
Go + MicroservicesͰ αΫαΫαʔϏε֦େ
Future works... • gRPCͷར༻ʹΑΔαʔόؒ݁߹ • ΠϕϯτۦಈܕMicroservices(Reactive Microservices) • ৽͍͠هࣄ͕Ճ͞Εͨ =>
֤αʔϏε͝ͱʹউखʹඞཁ ͳॲཧ։࢝