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
41
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
250
GitHubのコマンドパレット使ってますか?
yuki21
0
1.3k
キャッシュを利用してRailsアプリの処理を高速化する
yuki21
0
100
Next.js & ElectronでTodoアプリを作る
yuki21
0
670
RSpec -基本の基-
yuki21
0
40
Committeeを導入してみた
yuki21
0
110
マイクロサービスとモノリスとKBR
yuki21
0
43
ActiveModelSerializersについて
yuki21
0
30
脆弱性について
yuki21
0
150
Other Decks in Technology
See All in Technology
エンジニア視点で見る、 組織で運用されるデザインシステムにするには
shunya078
1
300
不動産tech Product Night#2_AIことはじめ_GA橋本
takehikohashimoto
0
180
どこよりも遅めなWinActor Ver.7.5.0 新機能紹介
tamai_63
0
200
Technical Writing Meetup vol.35
soracom
PRO
2
110
『GRANBLUE FANTASY Relink』ソフトウェアラスタライザによる実践的なオクルージョンカリング
cygames
0
140
ネットワークだけ隔離されたコンテナ作成デモ / Kichijoji.pm36
tenforward
1
210
社内の学びの場・コミュニティ形成とエンジニア同士のリレーションシップ構築/devreljapan2024
nishiuma
3
280
自社サービスのための独自リリース版Redmine「RedMica」の取り組み
vividtone
0
1.3k
再考 アクターモデル/ reconsider actor model
ytake
0
310
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
1
920
「自動テストのプラクティスを効果的に学ぶためのカードゲーム」 ( #sqip2024 )
teyamagu
PRO
2
180
サーバレスでモバイルアプリ開発! NTTコム「ビジネスdアプリ」のアーキテクチャ / The architecture of business d app
nttcom
12
240
Featured
See All Featured
Embracing the Ebb and Flow
colly
83
4.4k
The Language of Interfaces
destraynor
153
23k
The Brand Is Dead. Long Live the Brand.
mthomps
53
38k
Bash Introduction
62gerente
608
210k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
The Cult of Friendly URLs
andyhume
76
6k
The Art of Programming - Codeland 2020
erikaheidi
48
13k
Making Projects Easy
brettharned
113
5.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
From Idea to $5000 a Month in 5 Months
shpigford
379
46k
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