redis3m: a C++ Redis driver

02 Apr 2014

Recently I’m trying to bring my experience with C++ and Redis together in a Redis driver. There is lack of a good C++ aware driver, with C++ types and memory management. Also there isn’t a good connection pooling system. So I’m writing one, which uses Redis Sentinel to get always a working Redis instance.

Using Redis I noticed that same ways to organize and search keys are very common, so I thought: why not include them in a pattern? So everyone can use them, avoiding writing code.

Right know I’ve added these patterns:

  1. script_exec, exec a script with sha1 version then retry with eval if it fails. See here for details
  2. scheduler pattern, which I mentioned in a previous post
  3. orm pattern, compatible with soveran’s ohm, even if it’s not complete, I will add other functions as I need them
  4. simple_obj_store, like the previous but without indices, it’s suited for simple job storage, to work with transactions for example

More of them will came, in the future! If there is somebody around that use Redis and C++, I will appreciate feedbacks and suggestions.

The code can be found at: github.com/luca3m/redis3m

On README file there are instructions on how to compile and install it.

comments powered by Disqus

Copyright © 2014-2016 Luca Marturana. License.