4 ms·
The human-readable/writable protocol is one of my favorite things about Redis, tbh. I can see cases where a really optimized system could benefit from a binary
by cheald 7y ago
The human-readable/writable protocol is one of my favorite things about Redis, tbh.
I can see cases where a really optimized system could benefit from a binary protocol, but I suspect it'd be a loss for most people.
- axaxs 7y agoWhy not just offer both?
- femto113 7y agoThat was my thinking as well, though taking a peek at the actual code suggests that there's a pretty deep expectation that the client is speaking strings, e.g. in code that handles the ZRANGE command[1] I see if (c->argc == 5 && !strcasecmp(c->argv[4]->ptr,"withscores")) and a quick grep suggests that's a common pattern % grep argv src/*.c | grep -c -e 'str\(case\)*cmp' 482 I guess this means someone would have to tackle creating an intermediate binary format first, rewriting the command handlers to expect that format, and then making client libraries that can produce the format. Perhaps still worth it in the end, but not trivial. [1] https://github.com/antirez/redis/blob/unstable/src/t_zset.c#L2422 https://github.com/antirez/redis/blob/unstable/src/t_zset.c#...