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
[OLD] Evans: more expressive universal gRPC client
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ktr
November 11, 2017
Technology
4.7k
1
Share
[OLD] Evans: more expressive universal gRPC client
latest:
https://speakerdeck.com/ktr_0731/evans-more-expressive-grpc-client-1
ktr
November 11, 2017
More Decks by ktr
See All by ktr
詳解 MCP Go SDK / MCP Go SDK
ktr_0731
3
610
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
560
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.5k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
10k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
420
Designing libraries in Go way
ktr_0731
7
1.6k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
240
Fuzzy finder as a Go library
ktr_0731
3
6.2k
Other Decks in Technology
See All in Technology
エージェント時代の UIとAPI、CLI戦略
coincheck_recruit
0
110
はじめての MagicPod生成AI機能 機能紹介から活用方法まで
magicpod
0
130
QAエンジニアはどうやって プロダクト議論の場に入れるのか?
moritamasami
1
300
色を視る
yuzneri
0
310
AIの揺らぎに“コシ”を与える階層化品質設計
ickx
0
160
ブラウザの投機的読み込みと投機ルールAPIを理解し、Webサービスのパフォーマンスを最適化する
shuta13
2
250
Percolatorを廃止し、マルチ検索サービスへ刷新した話 / Search Engineering Tech Talk 2026 Spring
visional_engineering_and_design
0
230
M5Stack CoreS3とZephyr(RTOS)で Edge AIっぽいことしてみた
iotengineer22
0
400
AIが自律的に働く時代へ Amazon Quick で実現するAIエージェント紹介
koheiyoshikawa
0
160
AgentCore Managed Harness を使ってみよう
yakumo
2
300
サービスの信頼性を高めるため、形骸化した「プロダクションミーティング」を立て直すまでの取り組み
stefafafan
0
200
GitHub Copilot Dev Days
tomokusaba
0
130
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Building AI with AI
inesmontani
PRO
1
940
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
360
The Curse of the Amulet
leimatthew05
1
12k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
160
The Curious Case for Waylosing
cassininazir
0
330
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building an army of robots
kneath
306
46k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
450
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Abbi's Birthday
coloredviolet
2
7.4k
Transcript
#alt_0x09 ktr0731 / ktr_0731 Evans more expressive universal gRPC client
$ whoami @ktr_0731 / ktr0731 s123 プリンセス・プリンシパル
Evans more expressive universal gRPC client #alt_0x09 ktr0731 / ktr_0731
Evans more expressive universal gRPC client #alt_0x09 ktr0731 / ktr_0731
gRPC?
client/server が透過的に通信できるシステムを 簡単に構築するための RPC フレームワーク
gRPC Remote Procedure Calls, of course! https://grpc.io/faq/
define API schema generate client/server code Implement server logic
define API schema generate client/server code Implement server logic api.proto
(Protocol Buffers)
define API schema generate client/server code Implement server logic api.pb.go
(generated Go source)
define API schema generate client/server code Implement server logic main.go
(server)
define API schema generate client/server code Implement server logic main.go
(client)
define API schema generate client/server code Implement server logic client
output
client/server 間のインターフェースを自動生成
client/server 間のインターフェースを自動生成 = API の仕様を (ある程度) 反映できる
Go だと色々なミドルウェア (interceptor) が使える
Unary Client/Server Streaming Bidirectional Streaming
Unary Client/Server Streaming Bidirectional Streaming = Goodbye WebSocket
インターフェースの自動生成 Interceptor が使える 複数の RPC 方式
インターフェースの自動生成 Interceptor が使える 複数の RPC 方式 べんり
Demerits
HTTP/2 がまだまだ新しい技術 = LB やツール群が充実していない
gRPC のテストの問題 Curl 等で気軽にテストできなくてつらい
None
None
None
None
interactive mode command-line mode
command-line mode stdin や --file option で入力を選択できる JSON 形式の出力 スクリプトに組み込みやすい
わざわざスクリプトに書きたくない時 補完ないとしんどい時 複数の RPC を試したい時にべんり interactive mode
demo
1. REPL を起動する (c-bata/go-prompt) 2. proto ファイルの Unmarshal (golang/protobuf) 3.
message のフィールドを入力させる 4. 動的に message を組み立てる (jhump/protoreflect) 5. RPC
Streaming RPC TLS での通信 Map 型 ✏ reflection-server への対応 ✏
バイナリファイルの扱い
Issue / PR are welcome! https://github.com/ktr0731/evans
引用 • Evans (DJ YOSHITAKA) - https://itunes.apple.com/jp/album/jubeat- original-soundtrack/id325295989 • helloworld.proto
- https://github.com/grpc/grpc-go より、Apache License 2.0 の元に使用しています