Some background first: I have a system in which client hits the API to get some resources. The API call a microservice to get the required data. The job of API is to finally send a json string (constructed from data obtained from microservice) to client
The client is a legacy system which expects application/json.However, I want the API and microservice to talk using application-x-protobuf over http.
My question is does it make sense to convert my proto java file to string in the microservice itself and then send it to API ? Or does that defeat the purpose of using proto?
Is it necessary to send a proto java file over the wire, rather than a string converted from proto java file (JsonFormat.printer().print(myprotofile)
) for leveraging the speed of protobuf ?