cloudwego / cloudwego/kitex

[RCF] Serialize|Deserialize thrift message on demands (support protobuf's `fieldmask`) | 支持 thrift 按需序列化(支持 pb `fieldmask`)

Open
#1,071 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
8k
Forks
918
Avg merge
1d 13h
Merged PRs (30d)
7

Description

### Discussed in https://github.com/cloudwego/kitex/discussions/1070

Originally posted by **AsterDY** August 14, 2023
`Protobuffer` provides an ability called [FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#google.protobuf.FieldMask) to serialize|deserialize message on demands. And Netflix has used it in practice to improve the performance of API services: https://netflixtechblog.com/practical-api-design-at-netflix-part-1-using-protobuf-fieldmask-35cfdc606518. As for thrift, there is no such a direct support -- we can define a trimmed mirror IDL for every client as a workaround, but it is unsuitable for large-scale application development that every client must main a specified code-gen product for the trimmed IDL. In contrast, It is a trend to use a common repo to maintain code-gen products nowadays, and under such a situation, the overhead of redundant fields will get higher and higher. Therefore, we need to propose a way to support `fieldmask` to achieve serializing|deserializing messages on demands.
Is anyone interested in it? If so, please let us know

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.