In my Grpc server application, I already have the Protobuf serialized data 
that it received from a different server. Is there a way to avoid 
deserialization in the gRPC server and avoid creating the Protobuf response 
object and directly send theProtobuf serialized data to the client so 
client can do the deserialization ?

my grpc server API currently does this to create Protobuf response.
class SampleServiceImpl final : public SampleService::Service {
Status SampleAPI(ServerContext* context, const Request* request, Response* 
response) override { .......
       //already have Protobuf serailized data in 
"serialized_response_msg_buff"
       proto::Response response;
       any.ParseFromArray(serialized_response_msg_buff, 
serialized_response_msg_len);
      any.UnpackTo(response);....
} 
In my case, the Response object is very heavy and will end up doing 
deserialization twice, one in the above code and once by gRPC service when 
it sends to the client.
Is there a way to avoid the above deserialization and directly pass 
Protobuf serialized data to the gRPC client? 

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/9bc92812-3280-4d22-9f98-b2990b0d3cben%40googlegroups.com.

Reply via email to