3 ms·
I think that using JSON is rather inefficient and restrictive compared with using a binary format.
by zzo38computer 2y ago
I think that using JSON is rather inefficient and restrictive compared with using a binary format.
- jauntywundrkind 2y agoUsing complex custom binary encodings is an inefficient use of human's time. It's error prone. The constraints are well known & optimized for. The binary protocol will also have people implementing their own, poorly. Where-as one can get piping hot SIMD optimized JSON encoder/decoders. I'm not 100% JSON all the time. But this response strikes me as crufty neckbeardy shit that ignores the obvious & good & uses negativity to step on a pretty clear & straightforward path. Having use d-feet & busctl dozens of times in my life, it's miserable. The encoding scheme is terrible & unpleasant. JSON is an obvious counter reaction, to try to make some damned sense. Given that these bus capabilities are more control plane than data plane (but it's not a hard line), it's ok.
- zzo38computer 2y agoA binary format does not need to be complicated, and does not need to be the same as D-Bus (which has many problems). Furthermore, it can avoid some of the things in JSON, e.g. requiring escaping, requiring Unicode, not properly supporting 64-bit integers, embedded binary data cannot be made directly, etc.
- jauntywundrkind 2y agoSure yeah dude, in far off fantasy land it can all be perfect. There's no tradeoffs up in the clouds. Strikes me as a super bad attitude walking around with your nose way up in the air, leaving these farts behind you as you go. These comments aren't really couched in reality as far as I can see. They don't point anywhere specific, they're just broad swideswipes. Here in the real world we keep reusing maybe so so protocols because they are scrutable & well implemented & we humans have lots of experience and tools using them.