On Sat, Jul 9, 2011 at 3:15 AM, Joseph Gentle <jose...@gmail.com> wrote:
>
>
> The client and server talk by sending protobuf messages encoded as
> JSON over a socket.io connection. Protobufs are quite formally defined
> - so  you can see what the messages look like by looking at a few
> files in the repository:
>
> The RPC wrapper:
>
> http://code.google.com/p/wave-protocol/source/browse/src/org/waveprotocol/box/server/rpc/rpc.proto
>
> The meat:
>
> http://code.google.com/p/wave-protocol/source/browse/src/org/waveprotocol/box/common/comms/waveclient-rpc.proto
>
> http://code.google.com/p/wave-protocol/source/browse/src/org/waveprotocol/wave/federation/federation.protodevel
>
> The encoding to JSON uses this project:
> http://code.google.com/p/protobuf-java-format
> ... which basically makes every proto message a JSON object with keys
> = the proto field ID. Repeated values are expressed in JSON lists. The
> JSON is then encoded into a string, which is wrapped by another JSON
> object. So, all messages sent over the socket.io connection end up
> looking something like this, if I recall correctly:
> {"class":"ProtoMessage","message":"{\"1\":....,\"2\":[....]}"} <--
> that string is a proto encoded as JSON, then encoded again as a JSON
> string. The turtles don't go all the way down. :)
>
>
WIAB doesn't use protostuff anymore, because of some serialization bugs and
inefficiencies.  The data transfer classes are generated using PST (a tool
that is checked in to the WIAB repository).

-Dave

Reply via email to