Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This post's outrage is misplaced.

Protobuf encoders/decoders commonly implement two formats: delimited format, and non-delimited format. Typically non-delimited is the default, but delimited format is supported by many implementations including Google's main first-party ones. In fact, the Java implementation shipped with this support when Protobuf was first released 15 years ago (I wrote it). C++ originally left it as an exercise for the application (it's not too hard to implement), but I eventually added helper functions due to demand.

Both formats can be described as "standard", at least to the extent that anything in Protobuf is a standard.

So clearly the bug here is that one person was writing the delimited format and the other person was reading the non-delimited format. Maybe the confusion was the result of insufficient documentation but certainly not from a library author doing something crazy.



It's sort of misplaced, I'll agree.

Merely using the delimited format without any other sort of framing is almost always a bad idea because of precisely the ambiguity TFA discusses.

I'm pretty sure delimited streams are rarely used in the wild instead of something more robust/elaborate such as recordio, which specifically are almost always prefixed with a few magic bytes to mitigate this problem.

Edit: Also, why is there no publicly available recordio specification? Infuriating.


> I'm pretty sure delimited streams are rarely used in the wild

They are somewhat common inside Google at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: