- Author(s): ncteisen
- Approver: vjpai
- Status: Draft
- Implemented in: grpc/grpc#14541
- Last updated: 2018-03-01
- Discussion at: https://groups.google.com/forum/#!topic/grpc-io/3FTSA67iios
We propose to move two classes, GrpcProtoBufferWriter
and GrpcProtoBufferReader
, to a public directory, so that users may create custom serialization traits without having to "reinvent the wheel".
We have seen several user complaints that creating custom serializers is not an easy task. For example, TensorFlow duplicated an internal file, which led to a nasty bug. Another project had to use a hacky workaround to subtype the GrpcProtoBuffer{Reader|Writer}
classes in order to implement a zero copy serializer.
- This relates to L26, in that it is making it easier to customize serialization code.
We will rewrite GrpcProtoBuffer{Reader|Writer}
in terms of the public class, grpc::ByteBuffer
. Then we will move GrpcProtoBuffer{Reader|Writer}
out of the internal namespace, and add header files in include/grpcpp/support
so that the classes become accessible.
Implementation is in #14541