Re:Revisiting Apple Notes (6): The Protobuf
by cryptonector on Monday September 21, 2020 @03:53PM
(#24547692)
> This is an argument against hand-generating TLV binary packets, not an argument against using generated code (as in protobuf).
Or maybe it's an argument against the kind of designs that tempt devs to hand-code them.
> See kenton's comment I linked, the zero-copy can be a disadvantage in write-many applications, since if you have a variable-length field (a string or submessage) and you can end up with super inefficient binary encodings.
I don't buy that as a counter argument to the point about TLV's disadvantages relative to PER/OER and flatbuffers/cap'n proto. You might prefer OER to cap'n proto in some cases, or vice versa, but not TLV to either.
Or maybe it's an argument against the kind of designs that tempt devs to hand-code them.
> See kenton's comment I linked, the zero-copy can be a disadvantage in write-many applications, since if you have a variable-length field (a string or submessage) and you can end up with super inefficient binary encodings.
I don't buy that as a counter argument to the point about TLV's disadvantages relative to PER/OER and flatbuffers/cap'n proto. You might prefer OER to cap'n proto in some cases, or vice versa, but not TLV to either.