4 ms·
The TCP server example shows a different protocol than the default redis protocol. (As I could not install it correctly I couldn't try it.) If this is the case
by janerik 13y ago
The TCP server example shows a different protocol than the default redis protocol.
(As I could not install it correctly I couldn't try it.)
If this is the case current redis client libraries cannot be used.
- antirez 13y agoHello, Redis accepts both a structured protocol, and a simple space-separated tokens protocol (called the inline protocol) that helps sysadmins to avoid a disaster just because they lack a proper redis-cli but are in need to run a Redis command ASAP. Perhaps this proxy is also supporting both forms. You can do that with any modern enough Redis server: Escape character is '^]'. ping +PONG set foo bar +OK get foo $3 bar
- janerik 13y agoI know of that simple protocol. But the responses in the example telnet session on that side return "True" and "13" where it should be "+OK" and ":13" with the redis protocol.
- antirez 13y agogood point...
- emre-yilmaz 13y agoIt doesn't support like this. It seems easy to implement it like that though. I will do it when I have free time.
- emre-yilmaz 13y agoWhat was the problem for installation? I use redis-router in production as a library. some of my non-pythoneer friends asked to use it in PHP, so I made a little wrapper with gevent. It's probably not compatible with current clients. Needs testing :)
- janerik 13y agoHad problems installing "ketama". I re-read the README now and it explicitely states that libketama should be installed from the git repository. I'll try it again later.
- mmcnickle 13y agoThe servers are returning the output of the redis-py library, which maps returned values from redis into python objects (hashes -> dicts etc). I had a quick look but I don't see an easy way to have redis-py pass forward the raw return values, though I think it could be done with some effort. So this isn't a drop in proxy for a redis server just yet. Edit: referring to the TCP/HTTP Servers above, the library itself can be used as a drop in replacement for redis-py in python.