14

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
3
  • 7
    The first one is written by Marc Gravell (ranked 2nd in reputation here), and the second one is written by Jon Skeet (ranked 1st in reputation here). Even though I've never used either of those, I'd wager that you couldn't go wrong either way. Commented Oct 11, 2010 at 16:38
  • 2
    Given that Jon Skeet actually works for Google, I'd try his version first. Commented Oct 11, 2010 at 16:52
  • 3
    But which is better? There's only one way to find out... FIGHT! (this might make sense if you know who Harry Hill is - otherwise it might sound unusually aggressive...) Commented Oct 11, 2010 at 18:28

1 Answer 1

13

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.