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.6k
[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 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
410
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.3k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
10k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
350
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
220
Fuzzy finder as a Go library
ktr_0731
3
6.1k
つよくてニューゲーム / NewGame++
ktr_0731
0
1k
Other Decks in Technology
See All in Technology
「データ無い! 腹立つ! 推論する!」から 「データ無い! 腹立つ! データを作る」へ チームでデータを作り、育てられるようにするまで / How can we create, use, and maintain data ourselves?
moznion
8
4.4k
ZOZOTOWNカート決済リプレイス ── モジュラモノリスという過渡期戦略
zozotech
PRO
0
420
[CV勉強会@関東 ICCV2025] WoTE: End-to-End Driving with Online Trajectory Evaluation via BEV World Model
shinkyoto
0
270
ABEJA FIRST GUIDE for Software Engineers
abeja
0
3.2k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
4
1.4k
Rubyist入門: The Way to The Timeless Way of Programming
snoozer05
PRO
7
510
Service Monitoring Platformについて
lycorptech_jp
PRO
0
280
Axon Frameworkのイベントストアを独自拡張した話
zozotech
PRO
0
160
アジャイル社内普及ご近所さんマップを作ろう / Let's create an agile neighborhood map
psj59129
1
130
大規模モノレポの秩序管理 失速しない多言語化フロントエンドの運用 / JSConf JP 2025
shoota
0
200
Devoxx Morocco 2025 - Like Spring but faster: The new Java Jedi
edeandrea
PRO
0
100
【M3】攻めのセキュリティの実践!プロアクティブなセキュリティ対策の実践事例
axelmizu
0
170
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Language of Interfaces
destraynor
162
25k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
4 Signs Your Business is Dying
shpigford
186
22k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
Site-Speed That Sticks
csswizardry
13
960
Code Reviewing Like a Champion
maltzj
527
40k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
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 の元に使用しています