1

I am exploring Redis 5.0 cluster with C++. I have already seen different options listed on Redis official site, but none of the C++ clients are marked recommended there. I tried C client "hiredis-vip", it worked for my initial prototype, however upon reporting an issue (and its workaround) I am told that this client doesn't seem to officially support Redis 5.0 (see my issue report and its comments here).

I would really appreciate if anyone having experience of using Redis with C/C++ can advise some good C/C++ client options meeting following requirements:

  1. Support for newer versions of Redis (ideally 5.0) with Cluster support
  2. Will be great to have out of the box RedLock implementation as well (for my distributed locking requirement).
arz
  • 33
  • 3

2 Answers2

1

Try bredis. Basically it thin wrapper around redis-protocol, so, as soon as the protocol does not change, it will automatically support all redis features, for example streams.

Ivan Baidakou
  • 713
  • 9
  • 14
0

I wrote a C++ client which supports Redis Cluster with STL-like interfaces. You can have a try: redis-plus-plus.

However, by now, it doesn't support RedLock.

auto cluster = RedisCluster("tcp://127.0.0.1:7000");
cluster.set("key", "value");
cluster.lpush("list", {"a", "b", "c"});
for_stack
  • 21,012
  • 4
  • 35
  • 48
  • YES, with the generic command interface, you can send any command to Redis 5.0 and the corresponding cluster. Just try it, and if you like it, star it :) If you have any problem on redis-plus-plus, feel free to let me know. – for_stack Mar 05 '19 at 01:39