For what scenarios is the protobuff network not suitable?

We used BinarySerialization with our C # application, but the size and complexity of the classes that need to be serialized leads to serialization of sloooooow (de) and large files.

We suspect that we should simply write our own serializers; but protobuf-net requires significant speed and size advantages over standard .Net binary serialization and it may be easier to add to our application than a large number of custom serializers.

Before I spend considerable time and effort on getting him to work for us, I would like to know if there are any deals. We use properties defined with interfaces, general lists of abstract subclasses, custom flag flags, etc. Etc. What would stop protobuf-net for us?

+5
source share
3 answers

protobuf-net does something that can adhere to the main protobuf specification, and then some (for example, it includes inheritance):

  • v1 is not very good at interface-based properties (i.e. ICustomer, etc.); I am working on improving this in v2
  • v1 likes a constructor without parameters (this requirement is removed in v2)
  • , ; v1 ( ..); v2
  • v1, - ; v2 enums , falgs
  • , ( )
  • generics
  • jagged/ - ,
  • (, /); "v2" , .
  • , graph; , .

, , , ( ).

+6

, / . , SMTP-.

0

blog protobuf-net,

What’s the catch?

In the most part, that’s it. WCF will use protobuf-net for any suitable 
objects (data-contracts etc). Note that this is a coarser brush than the 
per-operation control, though (you could always split the interface into 
different endpoints, of course).

Also, protobuf-net does have some subtle differences (especially regarding empty 
objects), so run your unit tests etc.

Note that it only works on the full-fat WCF; it won’t help Silverlight etc, since 
it lacks the extension features – but that isn’t new here.

Finally, the resolver in WCF is a pain, and AFAIK wants the full assembly details 
including version number; so one more thing to maintain when you get new versions. 
If anyone knows how to get around this?
0

All Articles