top | item 19313728

(no title)

zinkem | 7 years ago

Not mentioned in the article, but bit packed data structures are easier to interpret in hardware and offer more guarantees. If I'm designing an FPGA/ASIC I can predict how many clock cycles a statically sized data structure will need to move through my system, and how much RAM I need while it's being processed.

I have spent a lot of time working with FPGAs that process network packets and many of the performance guarantees relied on the rigid structure of L2-4 protocol headers.

discuss

order

alexeiz|7 years ago

I was a bit surprised myself that the author prefers JSON to bit-packed protocols, but given that the author is none other than Eric Raymond, I have to take him seriously.

Accidentally, in my work lately I used JSON for data exchange over the network where performance is not important, and MsgPack otherwise where it is (which is essentially a packed JSON).

DonHopkins|7 years ago

Appeal to authority, huh? Do you also take all of his many racist statements seriously, "just because he's none other than Eric Raymond"?

"The average IQ of the Haitian population is 67... Haiti is, quite literally, a country full of violent idiots." -Eric S Raymond

"... The minimum level of training required to make someone effective as a self defense shooter is not very high... unfortunately, this doesn't cover the BLM crowd, which would have an average IQ of 85 if it's statistically representative of American blacks as a whole. I've never tried to train anyone that dim and wouldn't want to." -Eric S Raymond

https://twitter.com/tqbf/status/780839196231630848

(Note: this is just the tip of the shitberg. There are SO MANY MORE examples on so many other topics (like "Is the casting couch fair trade?") from so many other times over the decades.)

wmf|7 years ago

There's no need to appeal to authority; the article gives specific reasons when to use JSON and when to use binary. What do you think about those arguments?

keithnz|7 years ago

I use CBOR, which is a really nice binary Json. I use it for a custom protocol for embedded systems and it's just brilliant.