views:

114

answers:

1

We are looking at using Google's Protocol Buffers to handle serialization between a c++ application and a c# application via networking.

My question is, I've found a couple of different verisions for c#. Both look pretty good, however, does anyone know what is different (if anything) between the two

  1. protobuf-net
  2. jskeet / dotnet-protobufs
+1  A: 

Sure; dotnet-protobufs is a port of the java version, so shares a very similar API and approach to the core google implementation; code-gem, immutability, etc.

Protobuf-net is byte compatible, but is a complete from-scratch re-implementation, following standard .NET idioms - so is familiar to users of XmlSerializer etc. It also works against mutable objects (and immutable depending on the setup, and structs in v2), and has optional hooks for WCF, remoting, etc.

Both can work from .proto (arguably dotnet-protobufs is better at this than protobuf-net); but protobuf-net can work against existing .net poco/DTO etc without .proto or any codegen.

Additionally, protobuf-net offers things like inheritance support, but you might not choose to use that in your scenario as it doesn't map as easily to .proto definitions.

Marc Gravell