I have been studying about Apache Thrift, ProtoBuf and Flatbuffers. I found the tutorial to use gRPC with protobuf at link but I am not finding any documentation to use gRPC with Flatbuffers. Can some one point me to the relevant documentation? I checked it on Google as well as on Stackoverflow. Any help would be appreciated.
Since this question was first asked, progress has been made in a) making GRPC codegen independent of protobuf (see https://github.com/grpc/grpc/pull/6130) and then to integrate that codegenerator in the flatbuffers compiler flatc
: https://github.com/google/flatbuffers/commit/48f37f9e0a04f2b60046dda7fef20a8b0ebc1a70
This is a a very basic first implementation, feedback welcome.
The gRPC protocol is payload-agnostic, but the code generation is not. Since there isn't code generation already for FlatBuffers you will need to do some things manually.
The details vary by language, but the basic pieces are similar. As an example, in Go you would need to implement Codec and prepare the descriptors necessary for Invoke, NewClientStream, and RegisterService. In Java you would need to implement Marshaller and prepare the descriptors necessary for newCall and addService. If you have trouble, you may consider looking at the generated code for gRPC when used with Protobuf.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With