Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
gRPC入門
Search
To Kawa
December 01, 2019
Technology
0
110
gRPC入門
To Kawa
December 01, 2019
Tweet
Share
More Decks by To Kawa
See All by To Kawa
GoとKubernetesを用いたバッチ開発のすすめ
waytkheming
2
2.2k
Other Decks in Technology
See All in Technology
LLMアプリケーションの評価と継続的改善
pharma_x_tech
3
180
日本全国・都市3D化プロジェクト「PLATEAU」とデータ変換OSS「PLATEAU GIS Converter」の公開
nokonoko1203
3
310
Oracle Cloud Infrastructure:2024年11月度サービス・アップデート
oracle4engineer
PRO
0
140
Raspberry Pi 秋の新製品をチェックしてみよう / 20231202-rpi-jam-tokyo
akkiesoft
0
230
情シスの引継ぎが大変という話
miyu_dev
2
540
今はまだ小さい東京ガス内製開発チームが、これからもKubernetesと共に歩み続けるために
yussugi
3
540
ONNX推論クレートの比較と実装奮闘記
emergent
0
270
12/4(水)のBedrockアプデ速報(re:Invent 2024 Daily re:Cap #3 with AWS Heroes)
minorun365
PRO
2
190
.NET のUnified AI Building Blocks 入門...!
okazuki
0
150
ポストモーテムレビューをブレームレスに運営し有効な改善アクションを引き出すために必要だったこと / What is needed to operate postmortem blamelessly and elicit improvement actions
yamaguchitk333
0
140
GeminiとUnityで実現するインタラクティブアート
hokkey621
0
370
GDGoC開発体験談 - Gemini生成AI活用ハッカソン / GASとFirebaseで挑むパン屋のフードロス解決 -
hotekagi
1
490
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
243
12k
Building Applications with DynamoDB
mza
90
6.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Rails Girls Zürich Keynote
gr2m
94
13k
Unsuck your backbone
ammeep
669
57k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Ruby is Unlike a Banana
tanoku
97
11k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
How to Think Like a Performance Engineer
csswizardry
21
1.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Documentation Writing (for coders)
carmenintech
65
4.5k
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ಓͷײ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨɻ