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
[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
630
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
590
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.6k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
10k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
440
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
240
Fuzzy finder as a Go library
ktr_0731
3
6.2k
Other Decks in Technology
See All in Technology
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
170
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
170
電子辞書Brainをネットに繋げてみた(自力編)
raspython3
0
410
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
290
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
320
探して_入れて_作って_使う_Agent_Skills___LT.pdf
peintangos
2
150
OCI Oracle AI Database Services新機能アップデート(2026/03-2026/05)
oracle4engineer
PRO
0
110
JEP 522 Deep Dive - G1 GC同期コスト削減によるスループット向上を徹底検証&解説
tabatad
1
620
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
310
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
190
Unlocking the Apps
pimterry
0
170
もりもり新機能を一挙紹介! AgentCoreに入門して、AWS上にAIエージェントを構築しよう
minorun365
PRO
6
660
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
Accessibility Awareness
sabderemane
1
130
Agile that works and the tools we love
rasmusluckow
331
21k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
230
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
How to make the Groovebox
asonas
2
2.2k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
840
Paper Plane
katiecoart
PRO
1
51k
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 の元に使用しています