Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Redis within a C++ program?

What would be the best way to use a Redis DB within a C++ program?

like image 227
dan Avatar asked Feb 02 '10 02:02

dan


3 Answers

I have forked the fictorial redis-cplusplus-client, made it compatible to redis-server v2.0, added missing api calls and implemented consistent hashing. There is also an early state of high level classes that will be useable like stl types in the near future (shared_string, shared_int, shared_set, ...). Nothing is production ready yet but the provided tests are succesfully running :-)

http://github.com/mrpi/redis-cplusplus-client

like image 87
Ludger Sprenker Avatar answered Sep 18 '22 19:09

Ludger Sprenker


Official list of C++ clients

Explore a full list of Redis C++ clients on redis.io. You will find there different clients based on boost, Qt, etc. Note that at this time none of the C++ client implementations are marked as "Recommended." But there is a recommended C client, hiredis, which should work just fine in C++.

like image 42
feuGene Avatar answered Sep 17 '22 19:09

feuGene


https://github.com/brianwatling/redispp

I've just released my c++ redis client on github. It's main feature right now is pipelining, I'll be adding more features soon, possibly sharding/consistent hashing next.

like image 25
brian watling Avatar answered Sep 17 '22 19:09

brian watling