by the_angry_angel · 10y ago · 0 comments
protobuf sounds attractive, but (unless I've missed something in protobuf's implementation), but out of the box you have 2 issues:
1. Protobuf doesn't/can't deal with fragmentation - so you'd have to ensure your protobufs are small enough to fit inside a UDP packet
2. Without a wrapper you couldn't put multiple small protobufs into a single UDP packet?
Both things are fixable by wrapping protobuf, but I suppose if you're trying to get something as small as possible, can you actually just do better by avoiding protobuf in the first place (I guess the answer is yes?)
The application specific logic builds the full update. The rest can be done automatically by a good library.
Building a delta compressed protobuf message for a transform (using protobuf.net) looks something like: http://codepad.org/3vjxogxZ