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
gRPC入門
Search
To Kawa
December 01, 2019
Technology
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
gRPC入門
To Kawa
December 01, 2019
More Decks by To Kawa
See All by To Kawa
Coding Agentを用いた仕様駆動開発を試す中で考えたこれからのエンジニアに重要な能力
waytkheming
0
76
NotebookLMが変えるエンジニアの情報整理術
waytkheming
0
140
GoとKubernetesを用いたバッチ開発のすすめ
waytkheming
2
2.4k
Other Decks in Technology
See All in Technology
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
110
LanceDB入門
mocobeta
9
630
【GCC2026】TrueHDRIを用いたルックデブ環境とライティングテクニック
bandainamcostudios
PRO
0
120
猫付きpingコマンドを自作
uyuki234
0
270
【GCC2026】鉄拳8でのVFX開発事例
bandainamcostudios
PRO
0
120
2027年のMetricKit
kantacky
0
130
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
3
26k
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
240
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
130
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
130
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
JavaScript 研修 (2026)
recruitengineers
PRO
2
660
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
260
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
The Invisible Side of Design
smashingmag
301
52k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
250
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
How to make the Groovebox
asonas
2
2.3k
Transcript
GoݴޠͰgRPCʹೖͯ͠Έͨ
ࣗݾհ Տ༢ढ़ً גࣜձࣾLIFULL CoEϢχοτ։ൃਪਐάϧʔϓॴଐ ৽ଔ1 ڵຯͷ͋Δ ɾϒϩοΫνΣʔϯ ɾFintech ݴޠ
Node/Solidity/PHP/Apex/Go
gRPCͱԿ͔ • Google͕։ൃͨ͠RPCݺग़ϓϩτίϧ • ϝοηʔδProtocolBuffersΛ༻͍ͯ௨৴ • HTTP/2Λ༻͍ͯฒྻݺग़ɺํݺग़ɺετϦʔϛϯά ͳͲ͕Մೳ • .protoϑΝΠϧ͔Βίʔυ͕ࣗಈੜͰ͖Δ
• GoogleͷαʔϏεͰ࣮ࡍʹΘΕ͍Δ
gRPCͱԿ͔ ΫϥΠΞϯτͱαʔόͰෳͷݴޠΛαϙʔτ͍ͯ͠Δ →ϚΠΫϩαʔϏεͳͲͱ૬ੑ͕͍͍
4ͭͷRPCํࣜ • Unary(Simple) →1 request-1 response • ServerStreaming →1 request-N
response • ClientStreaming →N request-1 response • BidirectionalStreaming →N request-N response
ϝϦοτ • REST APIΑΓURLઃܭָ͕ →protoϑΝΠϧͰAPI༷Λ໌จԽͰ͖Δ →දଆͱཪଆ͕༷ͷ͢Γ߹Θָ͕ͤ • HTTP/2Ͱฒྻݺग़ͳͲ͕Ͱ͖ΔͨΊɺߴ • ύϥϝʔλʔͷܕ͚͕Ͱ͖Δ
࡞ͷྲྀΕ 1. protoϑΝΠϧͷ࡞ 2. ᶃͰ࡞ͨ͠ϑΝΠϧΛίϯύΠϧͯ͠ɺࣗಈͰܗ ίʔυΛੜ 3. ܗίʔυΛݩʹαʔόʔˍΫϥΠΞϯτΛ࣮͢Δ
࣮ࡍʹͬͯΈΔ (Ұ൪γϯϓϧͳUnary)
protoϑΝΠϧ࡞
ίϚϯυ࣮ߦ
ίϚϯυͰੜ͞ΕΔܗϑΝΠϧ https://github.com/waytkheming/calculator-proto/blob/master/proto/calculator.pb.go
Serverଆ
Clientଆ
࣮ߦ
MongoDBΛͬͯCUIͷTwitterΈ͍ͨͳͷΛ࡞ͬͯΈͨ https://github.com/waytkheming/gwitter-proto
ࢀߟURL • gRPC Documentation https://grpc.io/docs/ • ΫοΫύου͕gRPCΛ࠾༻͢Δ·ͰαʔϏεؒ௨৴Ͱ๊͑ͯ ͍ͨ՝ͱɺRubyͰgRPCΛӡ༻͢ΔͨΊͷ https://logmi.jp/tech/articles/320715 •
gRPCͬͯԿʁ https://qiita.com/oohira/items/63b5ccb2bf1a913659d6 • gRPCʹ͓͚ΔRPCํࣜͷཧ https://qiita.com/yuzo777/items/046910c95559cf0fff68
Gopherಓͷײ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨɻ