4 ms·
>>> 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) overhe
by strags 15y ago
>>> 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?
- guard-of-terra 15y agoIt is human readable if you use firebug or vim. And that's what you use.
- derleth 15y ago> 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")
- strags 15y agoOh, 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.
- seanp2k2 15y ago>"standard binary serialization format" Mmmm, yes, good luck with that :)
- strags 15y agoA man can dream.
- stock_toaster 15y agoIn 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 https://github.com/j2labs/cerealization
- stock_toaster 15y agoIn 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/ http://tnetstrings.org/ [2]: http://pypi.python.org/pypi/tnetstring http://pypi.python.org/pypi/tnetstring [3]: https://github.com/j2labs/cerealization https://github.com/j2labs/cerealization