We are working on a TCP server that accepts simple text commands over TCP (similar to redis)
We toss between using the raw text command, JSON, or the message package ( http://msgpack.org/ )
An example of a command might be:
text command: LOCK some_random_key 1000
JSON Command: {"command":"LOCK","key":"some_random_key","timeout":1000}
messagePack: \x83\xA7command\xA4LOCK\xA3key\xAFsome_random_key\xA7timeout\xCD\x03\xE8
Question:
EDIT: I figured out my own question, which is a comparison of the parsing speed of JSON and MsgPack. Please see the results in my answer
samol source
share