The short answer is "yes"...
The protocol buffers spec itself doesn't provide an RPC stack, but some have been added outside the spec.
Firstly, protobuf-net has hooks for WCF, allowing you to mark operations on your service contract as ProtoBehavior
. This then swaps the regular DataContractSerializer
to use protobuf-net serialization. However, there are some caveats:
- your data-members must have explicit Order (e.g.
[ProtoMember(Order = 1)]
), since it uses these numbers as the field identifiers (protocol buffers uses numeric fields)
- it works best with assembly/class sharing (of the service contract etc), since this custom behavior is not exposed on "mex"
When used with the basic http transport, this is also compatible with MTOM (if enabled) for maximum througput. Performance of non-trivial messages is largely proportional to their size; you can get an idea of protobuf-net's sizes here.
Alternatively, I'm also working on a bespoke RPC stack. The current build has a working stack over http, but I also plan to enable it on raw TCP/IP when I get chance. I haven't had chance to write it up yet, but I can provide examples on request. Note that to use it most conveniently, you'll want the 3.5 "extensions" dll, too.
Any questions, add a comment or e-mail me (see my profile).