RejectedSoftware Forums

Sign up

Redis Questions

Are there any plans for updating the Redis library to support additional commands? For example, it looks to be short a couple sorted set commands and the eval commands are missing. Or, is there a way to send raw commands to Redis?

We're using Redis as a data store for a particular piece of functionality, but want a RESTful front-end for it. Unfortunately, we may be using sorted sets and our current algorithms relies on intersects and unions, neither of which appears to be supported at this time.

Re: Redis Questions

On Thu, 15 Nov 2012 18:15:35 GMT, Casey wrote:

Are there any plans for updating the Redis library to support additional commands? For example, it looks to be short a couple sorted set commands and the eval commands are missing. Or, is there a way to send raw commands to Redis?

We're using Redis as a data store for a particular piece of functionality, but want a RESTful front-end for it. Unfortunately, we may be using sorted sets and our current algorithms relies on intersects and unions, neither of which appears to be supported at this time.

Sorry for my late reply! Yes the redis client is very basic and misses a couple of the advanced commands. The problem is that those commands have dozens of arguments and I think a function with so many arguments is not nice way to handle this. Do you have a good idea to for a nice interface?

With the request-function you can send raw commands. Here is an example for ZINTERSTORE:

auto redis = new RedisClient();
redis.connect();
auto destSize = redis.request!size_t("ZINTERSTORE", cast(ubyte[][])["dest", "2", "set1", "set2"]);

Re: Redis Questions

Thanks. I'll have to try it out as soon as I get the go-ahead to do so. I just wanted to get all of my ducks in a row before I propose anything.

Re: Redis Questions

Again, thanks. That works great. Would prefer to use a specialized method, but it's still great that this is available.