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
yuki21
August 28, 2020
Technology
0
45
gRPCを完璧に理解する
5分間社内LT資料
yuki21
August 28, 2020
Tweet
Share
More Decks by yuki21
See All by yuki21
労務ドメインを快適に開発する方法 / How to Comfortably Develop in the Labor Domain
yuki21
1
380
GitHubのコマンドパレット使ってますか?
yuki21
0
1.5k
キャッシュを利用してRailsアプリの処理を高速化する
yuki21
0
110
Next.js & ElectronでTodoアプリを作る
yuki21
0
710
RSpec -基本の基-
yuki21
0
48
Committeeを導入してみた
yuki21
0
120
マイクロサービスとモノリスとKBR
yuki21
0
48
ActiveModelSerializersについて
yuki21
0
35
脆弱性について
yuki21
0
160
Other Decks in Technology
See All in Technology
kubellが挑むBPaaSにおける、人とAIエージェントによるサービス開発の最前線と技術展望
kubell_hr
1
300
Data Hubグループ 紹介資料
sansan33
PRO
0
1.8k
Securing your Lambda 101
chillzprezi
0
280
doda開発 生成AI元年宣言!自家製AIエージェントから始める生産性改革 / doda Development Declaration of the First Year of Generated AI! Productivity Reforms Starting with Home-grown AI Agents
techtekt
0
140
(新URLに移行しました)FASTと向き合うことで見えた、大規模アジャイルの難しさと楽しさ
wooootack
0
700
API の仕様から紐解く「MCP 入門」 ~MCP の「コンテキスト」って何だ?~
cdataj
0
150
新卒3年目の後悔〜機械学習モデルジョブの運用を頑張った話〜
kameitomohiro
0
240
In Praise of "Normal" Engineers (LDX3)
charity
2
890
Model Mondays S2E01: Advanced Reasoning
nitya
0
360
評価の納得感を2段階高める「構造化フィードバック」
aloerina
1
160
New Cache Hierarchy for Container Images and OCI Artifacts in Kubernetes Clusters using Containerd / KubeCon + CloudNativeCon Japan
pfn
PRO
0
150
「実体」で築く共通認識: 開発現場のコミュニケーション最適化 / Let's Get on the Same Page with Concrete Artifacts: Optimization of Communication in dev teams
kazizi55
0
140
Featured
See All Featured
A Tale of Four Properties
chriscoyier
159
23k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Six Lessons from altMBA
skipperchong
28
3.8k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Designing for Performance
lara
609
69k
Become a Pro
speakerdeck
PRO
28
5.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
4
140
Building Applications with DynamoDB
mza
95
6.4k
Transcript
gRPCを完璧に理解する Kobayashi Yuta
None
gRPCって何? gRPCは、Googleが開発したオープンソースのRPC Remote Procedure Call フレームワーク です。 データのトランスポートにはHTTP/2、データのシリアライズにはProtocol Buffersを利⽤し、 ⾼速な通信が可能となっています。
RPCって何…? RPCとは、Remote Procedure Callの略で、直訳すると"遠隔⼿続き呼出し"です。 もっと簡単に⾔うと、別空間にあるメソッドを呼び出す処理のことを⾔います。
それってRESTと何が違うの? RESTはリソース指向アーキテクチャを基本としますが、RPCはリソースの縛りを受けませ ん。
つまりどういうことか REST PATCH https://example.com/users/1 Body: { active: true } RPC
POST https://example.com/userActivate
Protocol Buffersって……? Protocol Buffersは構造化データをシリアライズするためのフォーマット記述⾔語です。 データをどのように構造化するかを⼀度定義すると、定義から⽣成されたソースコードを使⽤ して、さまざまなデータストリームや⾔語を使⽤して、データを簡単に書き込んだり、読み込 んだりすることができます。
定義 message Person { required string name = 1; required
int32 id = 2; optional string email = 3; } シリアライズ Person john = Person.newBuilder() .setId(1234) .setName("John Doe") .setEmail("
[email protected]
") .build(); output = new FileOutputStream(args[0]); john.writeTo(output);
gRPCって何? gRPCは、Googleが開発したオープンソースのRPC Remote Procedure Call フレームワーク です。 データのトランスポートにはHTTP/2、データのシリアライズにはProtocol Buffersを利⽤し、 ⾼速な通信が可能となっています。
結局gRPCは何をしているのか?
結局gRPCは何をしているのか? Protocol Buffersの定義から各プログラミング⾔語のクラス定義やサービスを⽣成する Protocol Buffers単体でも利⽤できるが、gRPC⽤のツールも存在する。 ⽣成されたサービスからサーバーとクライアントを実装し、データの双⽅向通信を実現す る
他にも… gRPC⾃体にヘルスチェックの機能であったり、メタデータ(認証の詳細等)を扱う仕組みが ⽤意されているようです。
ご静聴ありがとうございました 参考 Introduction to gRPC https://grpc.io/docs/what-is-grpc/introduction/ サービス間通信のための新技術「gRPC」⼊⾨ | さくらのナレッジ https://knowledge.sakura.ad.jp/24059/
None