4 Matching Annotations
- Dec 2020
-
github.com github.com
-
- Oct 2018
-
www.pingcap.com www.pingcap.com
-
gRPC 的 service 接口是基于 protobuf 定义的,我们可以非常方便的将 service 与 HTTP/2 关联起来。
- Path :
/Service-Name/{method name}
- Service-Name:
?( {proto package name} "." ) {service name}
- Message-Type:
{fully qualified proto message name}
- Content-Type: "application/grpc+proto"
使用 protobuf 协议定义好 service RPC
基于 HTTP/2 进行通信
- Path :
-
一条连接可以包含多个 streams,多个 streams 发送的数据互相不影响。 Stream 可以被 client 和 server 单方面或者共享使用。 Stream 可以被任意一段关闭。 Stream 会确定好发送 frame 的顺序,另一端会按照接受到的顺序来处理。 Stream 用一个唯一 ID 来标识。
-
Stream: 一个双向流,一条连接可以有多个 streams。 Message: 也就是逻辑上面的 request,response。 Frame::数据传输的最小单位。每个 Frame 都属于一个特定的 stream 或者整个连接。一个 message 可能有多个 frame 组成。
-