I am wondering how I can use google protocol buffers to accept a request and send a response back to a client? I am thinking about writing a servlet which will take a request. Is the following trail of thought the correct way to implement this: 1. Have a .proto file which is the message definition for the incoming request. 2. Write a servlet which accepts this request, does various tasks like querying database and then sends a response. Will this response require a separate .proto message definition with all the fields that make up the response? 3. Will the client just invoke the doGet() method of my servlet and pass the request, it should then return a response as a protobuff object?
Any suggestion or idea will be very much appreciated.