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
ktr
November 11, 2017
Technology
1
4.7k
[OLD] Evans: more expressive universal gRPC client
latest:
https://speakerdeck.com/ktr_0731/evans-more-expressive-grpc-client-1
ktr
November 11, 2017
Tweet
Share
More Decks by ktr
See All by ktr
詳解 MCP Go SDK / MCP Go SDK
ktr_0731
3
580
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
470
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.4k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
10k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
400
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
230
Fuzzy finder as a Go library
ktr_0731
3
6.2k
Other Decks in Technology
See All in Technology
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
8
7.1k
新職業『オーケストレーター』誕生 — エージェント10体を同時に回すAgentOps
gunta
4
1.7k
GitLab Duo Agent Platform + Local LLMサービングで幸せになりたい
jyoshise
0
200
JAWS Days 2026 楽しく学ぼう! 認証認可 入門/20260307-jaws-days-novice-lane-auth
opelab
9
1.6k
Serverless Agent Architecture on Azure / serverless-agent-on-azure
miyake
1
160
AIファーストを前提とした開発スタイルの変化
sbtechnight
0
220
[JAWSDAYS2026]Who is responsible for IAM
mizukibbb
0
180
マネージャー版 "提案のレベル" を上げる
konifar
21
14k
Yahoo!ショッピングのレコメンデーション・システムにおけるML実践の一例
lycorptech_jp
PRO
1
160
技術的負債の泥沼から組織を救う3つの転換点
nwiizo
8
3.1k
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1k
DX Improvement at Scale
ntk1000
3
400
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
230
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
140
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Six Lessons from altMBA
skipperchong
29
4.2k
エンジニアに許された特別な時間の終わり
watany
106
240k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Paper Plane (Part 1)
katiecoart
PRO
0
5.3k
The Language of Interfaces
destraynor
162
26k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
89
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
640
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 の元に使用しています