Hi!
Surely you have seen this tutorial:
http://code.google.com/apis/protocolbuffers/docs/javatutorial.html
As far as I can tell, you do the following on the client side:
- Define the formats of your messages you want to send and receive.
- Generate
Java code for the messages.
- Write a program that populates messages and then write them to an output stream of some kind.
On the server side, you use the same Java code generated for the messages, but listen for data coming from some input stream. The binary data is then parsed and matching message objects are created.
The point seems to be that you write and read binary data obtained from the protocol buffer objects to/from streams.
This will be efficient, I assume, but nothing like
SOAP or REST web services, which use XML or JSON.
I recall having read about FastInfoset which enables a more efficient, binary, transmission of XML data. This may be something to consider if you want to use SOAP web services.
Best wishes!