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
4.7k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[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
670
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
640
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.7k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
11k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
460
Designing libraries in Go way
ktr_0731
6
1.6k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
250
Fuzzy finder as a Go library
ktr_0731
3
6.3k
Other Decks in Technology
See All in Technology
なぜ Temporal の大小比較には compare しかないのか / Why Does Temporal Only Have compare() for Comparisons
kazukihayase
1
200
医療の現場を変革に挑戦した半年間の軌跡 - PythonとAIで現場を変える / From Code to Care
soudai
PRO
1
570
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
140
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
1
300
強化学習「理論」入門
enakai00
3
3.6k
Kiro入門|仕様駆動開発で変わるAI時代の開発スタイル
cmkudo
0
330
【GCC2026】大規模言語モデルを活用した内製検索サービスの社内展開や業務活用
bandainamcostudios
PRO
0
500
FDEの心得
noriakioji
5
6.4k
【GCC2026】鉄拳8でのVFX開発事例
bandainamcostudios
PRO
0
260
AI時代のアウトプット――変わったこと、変わらないこと / Devsumi 2026 Kansai #devsumi
jnchito
0
510
35分でわかるEffective Platform Engineering
nwiizo
5
600
Genie Codeハンズオン応用編
taka_aki
0
140
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
400
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
450
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
Evolving SEO for Evolving Search Engines
ryanjones
0
260
Un-Boring Meetings
codingconduct
0
390
Color Theory Basics | Prateek | Gurzu
gurzu
0
430
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
エンジニアに許された特別な時間の終わり
watany
108
250k
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 の元に使用しています