gRPC
gRPC
Guides | gRPC
Performance Best Practices | gRPC
gRPC on HTTP/2 Engineering a Robust, High-performance Protocol | gRPC
gRPC Internal - gRPC の設計と内部実装から見えてくる世界 | Wantedly Engineer Blog
Performance best practices with gRPC | Microsoft Docs
Introduction | Connect
各言語の実装があるが、仕様そのもののドキュメントはこれか?
GRPC Core: GRPC Core
channel
channel には state がある
Core concepts, architecture and lifecycle | gRPC
gRPC on HTTP/2 Engineering a Robust, High-performance Protocol | gRPC
Go 実装では ClientConn と呼ばれている
channel を複数の stream が並行して実行される
channel は複数の HTTP/2 connections の抽象化
HTTP2/ connections は stream 数に上限がある。C# 実装は、この上限を超えると connection を増やすオプションがある?
Performance best practices with gRPC | Microsoft Learn
Go 実装のこれは、stream の上限設定なのか?
https://pkg.go.dev/google.golang.org/grpc#MaxConcurrentStreams
https://github.com/grpc/grpc-go/issues/682#issuecomment-316512953
stream の上限は、実際にデータが流れているかは関係なく、connection に stream が維持されているか(?) でカウントされるのだと思うが、HTTP/2 をちゃんと理解していないのでわからない
GRPC Core: gRPC Connectivity Semantics and API
Channel in tonic::transport - Rust
Error Handling
Error handling | gRPC
Status struct として返される
status · pkg.go.dev
Details を追加したい場合は withErrorDetails メソッドがある
Rust の tonic で gRPC の Richer Error Model を扱う — HACK The Nikkei
Client
https://grpc.io/docs/languages/go/basics/#client
NewXXXClient に grpc.ClientConnInterface を渡せば呼び出せる
NewXXXClient は生成された grpc.pb.go ファイルに生成されている
Always re-use stubs and channels when possible.
Performance Best Practices | gRPC
C#のgRPCクライアントではChannelを再利用しよう - 一休.com Developers Blog
GRPC how to reuse client connection? · Issue #359 · grpc/grpc-node
Server
server には xxServiceServer interface が必要?
DialContext を呼び出せば OK?
clientConnection が帰る?
clientConn は gRPC の言葉では chanel のこと
chanel は connection の集まり
Authentication
Authentication | gRPC
TLS 使うタイプが標準
Timeout
gRPCのServer-Streaming RPCを用いたPUSH通知の実現事例 | Fintan
Reflections
grpc-go/Documentation/server-reflection-tutorial.md at master · grpc/grpc-go
Server side connection handling
Cancellation | gRPC
gRPC and Deadlines | gRPC
REST・Protocol Bufferは必要ない RPCフレームワークにそのまま使えるScalaの魅力 | ログミーBusiness
HTTP REST との大きな違いは streaming api
HTTP API を使用した gRPC サービスの比較 | Microsoft Learn