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:
script_exec, exec a script with sha1 version then retry with eval if it fails. See here for details
schedulerpattern, which I mentioned in a previous post
ormpattern, compatible with soveran’s ohm, even if it’s not complete, I will add other functions as I need them
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.
Copyright © 2014-2021 Luca Marturana. License.