Re:Don't Use Protobuf for Telemetry
by Aaargh20318 on Wednesday December 30, 2020 @03:12PM
(#25585524)
Are there any advantages of protobuf over using DER encoded ASN.1 ? The format looks very similar. It looks like they kind of reinvented the wheel here.
[ Parent
| on HN ]
To my understanding they're both [type, length, content] encoded formats, so they're similar there at least.
In my experience people really quite enjoy the IDL aspect of protobuf as the killer feature, and I am not sure any such compiler exists for ASN1.
ASN.1 is specified as a compilable language. Open source compilers, such as snacc, have existed for 30 years. ASN.1 also defines multiple encodings, DER is used in crypto as you can compare encoded blocks bit by bit. Other encoding rules, such as BER, are tagged. Protobuffers is the same thing re-invented by people who probably never saw ASN.1.
Re:Don't Use Protobuf for Telemetry
by Aaargh20318 on Wednesday December 30, 2020 @05:02PM
(#25586682)
ASN.1 is basically an IDL. There are multiple encodings for ASN.1 but DER is one of the most common ones (you can also encode to JSON or XML).
DER is indeed TLV (tag-length-value) and there are many code generators available.
Re:Don't Use Protobuf for Telemetry
by kevin_thibedeau on Wednesday December 30, 2020 @04:42PM
(#25586508)
ASN.1 has a lot of cruft, particularly with the string encodings.