Hacker News new | past | comments | ask | show | jobs | submit login

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.




Why not just offer both?


That 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#...




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

Search: