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.6k
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.1k
経営・意思・エンジニアリング
ymatsuwitter
23
19k
LLM in 2023 and 2024
ymatsuwitter
8
5.2k
Turbulent Technological Changes and Career Strategies
ymatsuwitter
2
2.5k
LLM in toB Service and Its UX
ymatsuwitter
6
9.9k
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.6k
Monorepo on AWS
ymatsuwitter
0
260
Tech behind LayerX SaaS products
ymatsuwitter
0
3k
Other Decks in Programming
See All in Programming
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
CSC509 Lecture 11
javiergs
PRO
0
180
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
イベント駆動で成長して委員会
happymana
1
320
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
Jakarta EE meets AI
ivargrimstad
0
540
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
97
11k
Rails Girls Zürich Keynote
gr2m
94
13k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Designing for Performance
lara
604
68k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
It's Worth the Effort
3n
183
27k
A Philosophy of Restraint
colly
203
16k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
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) • ৽͍͠هࣄ͕Ճ͞Εͨ =>
֤αʔϏε͝ͱʹউखʹඞཁ ͳॲཧ։࢝