3 ms·
if you are sending data to "yourself" and performance is important, defining your own binary protocol can be very effective. every time I go to grok protobuf, t
by jstrong 6y ago
if you are sending data to "yourself" and performance is important, defining your own binary protocol can be very effective. every time I go to grok protobuf, thrift, et al. I end up just rolling my own format because it's so much simpler and I can take all the tradeoffs that benefit what I'm doing instead of what anyone might possibly do with it. this doesn't apply in many situations (i.e. sending data to outside parties) but I've experienced a lot of success with it that seems at odds with conventional wisdom on the subject.
- petre 6y agoWe only do that on embedded platforms, meaning MCUs. Anything that runs Linux is better off with CBOR or MessagePack or even ProtoBuf. Dunno about FreeRTOS et all. I've only seen libraries for JSON. ESP32 and Cortex M4 are powerful enough for serialization formats but at the expense of wasting cycles, so you're probably better off with a custom binary protocol most of the time. But if you want to sell your product to integrators use a well supported serialization format. Nobody is going to write decoders for your custom binary format today.