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

>>> plaintext + gzip is preferable to binary.

I'm not sure I agree with you on that. You're imposing a load of extra CPU (and, I suspect some bandwidth) overhead where it's not necessary for all except the most infrequent cases, and you're inheriting all the weaknesses of text as a data format.

Plus, since your data is now gzipped, it's no longer human-readable on the wire. In order to read it, you need to pipe it through a decoder (gunzip) - why not use a sensible binary protocol, and pipe it through the decoder for that?



It is human readable if you use firebug or vim. And that's what you use.


> In order to read it, you need to pipe it through a decoder (gunzip) - why not use a sensible binary protocol, and pipe it through the decoder for that?

I don't have your decoder. I have gunzip.

gunzip is not threatened by a patent. gunzip doesn't cause a Drama Meltdown. gunzip won't be a proven attack vector for remote execution exploits. gunzip does not require a contract in my hand or money in my bank. While your decoder is being debugged, gunzip will be live.

(To the tune of "The Revolution Will Not Be Televised")


Oh, I'm just advocating using a standard binary serialization format like MessagePack that is far more efficient, can easily represent binary data, and has a far more obvious mapping to runtime data structures.


In most parsing comparisons I have seen, tnetstrings[1] is probably one of the faster textual formats to parse (and rather "safe" too). I have started using tnetstring[2] (python module) for some backend message formats where I commonly use json, and it has been pretty great so far. (esp with gzip, snappy, bzip, lzma, or whatever compression fits your needs/tradeoffs)

[1]: http://tnetstrings.org/ [2]: http://pypi.python.org/pypi/tnetstring [3]: https://github.com/j2labs/cerealization


In most parsing comparisons I have seen, tnetstrings[1] is probably one of the faster textual formats to parse (and rather "safe" too). I have started using tnetstring (python module) for some backend message formats where I commonly use json, and it has been pretty great so far. (esp with gzip, snappy, bzip, lzma, or whatever compression fits your needs/tradeoffs)

[1]: https://github.com/j2labs/cerealization


>"standard binary serialization format"

Mmmm, yes, good luck with that :)


A man can dream.




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

Search: