Skip to content

Commit

Permalink
docs(kitex): update message type doc (#1123)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangruiEmma authored Aug 30, 2024
1 parent ab4452d commit 2d7fa38
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions content/en/docs/kitex/Tutorials/basic-feature/message_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ description: Kitex supports message types of PingPong、Oneway、Streaming.

## Protocols

The table below is message types, codecs and transports supported by Kitex.
The table below is message types, serializations and transport protocols supported by Kitex:

| Message Types | Codec | Transport |
| ------------- | ----------------- | ------------------------------------------------------------------------ |
| Message Types | Serialization | Transport Protocol |
| ------------- |-------------------|--------------------------------------------------------------------------|
| PingPong | Thrift / Protobuf | [TTHeader](../../../reference/transport_protocol_ttheader) / HTTP2(gRPC) |
| Oneway | Thrift | [TTHeader](../../../reference/transport_protocol_ttheader) |
| Streaming | Protobuf | HTTP2(gRPC) |
| Streaming | Thrift / Protobuf | HTTP2(gRPC) |

- PingPong: the client always waits for a response after sending a request
- Oneway: the client does not expect any response after sending a request
- Streaming: the client can send one or more requests while receiving one or more responses.

## Thrift

When the codec is thrift, Kitex supports PingPong and Oneway. The streaming on thrift is under development.
Kitex supports **PingPong** and **Oneway** message types based on Thrift protocol; Simultaneously supporting **Thrift Streaming** over HTTP2.

The interface definitions for PingPong and Oneway are shown in the following example, and the usage of Thrift Streaming please see [Thrift Streaming](/docs/kitex/tutorials/basic-feature/protocol/transport-streaming/thrift_streaming)

### Example

Expand Down
12 changes: 7 additions & 5 deletions content/zh/docs/kitex/Tutorials/basic-feature/message_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ description: Kitex 支持 PingPong、Oneway、Streaming 消息类型。

## 协议支持

目前 Kitex 支持的消息类型、编解码协议和传输协议
目前 Kitex 支持的消息类型、序列化协议和传输协议:

| 消息类型 | 编码协议 | 传输协议 |
| --------- | ----------------- | ------------------------------------------------------------------------ |
| 消息类型 | 序列化 | 传输协议 |
| --------- |-------------------| ------------------------------------------------------------------------ |
| PingPong | Thrift / Protobuf | [TTHeader](../../../reference/transport_protocol_ttheader) / HTTP2(gRPC) |
| Oneway | Thrift | [TTHeader](../../../reference/transport_protocol_ttheader) |
| Streaming | Protobuf | HTTP2(gRPC) |
| Streaming | Thrift / Protobuf | HTTP2(gRPC) |

- PingPong:客户端发起一个请求后会等待一个响应才可以进行下一次请求
- Oneway:客户端发起一个请求后不等待一个响应
- Streaming:客户端发起一个或多个请求 , 等待一个或多个响应

## Thrift

目前 Thrift 支持 PingPong 和 Oneway。Kitex 计划支持 Thrift Streaming。
Kitex 支持基于 Thrift 协议的 **PingPong****Oneway** 消息类型;同时支持 **Thrift Streaming** over HTTP2。

PingPong、Oneway 的接口定义见下面的 Example,Thrift Streaming 使用见 [Thrift Streaming](/docs/kitex/tutorials/basic-feature/protocol/transport-streaming/thrift_streaming)

### Example

Expand Down

0 comments on commit 2d7fa38

Please sign in to comment.