Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cylix/cpp_redis
C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform - NO LONGER MAINTAINED - Please check https://github.com/cpp-redis/cpp_redis
https://github.com/cylix/cpp_redis
asynchronous cpp cpp11 multi-platform no-dependencies redis redis-client unix windows
Last synced: about 11 hours ago
JSON representation
C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform - NO LONGER MAINTAINED - Please check https://github.com/cpp-redis/cpp_redis
- Host: GitHub
- URL: https://github.com/cylix/cpp_redis
- Owner: Cylix
- License: mit
- Archived: true
- Created: 2015-07-10T15:59:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-01T09:32:16.000Z (almost 6 years ago)
- Last Synced: 2024-09-27T03:21:18.897Z (4 months ago)
- Topics: asynchronous, cpp, cpp11, multi-platform, no-dependencies, redis, redis-client, unix, windows
- Language: C++
- Homepage:
- Size: 1.99 MB
- Stars: 1,242
- Watchers: 87
- Forks: 551
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Important
Please be advised that this library **is no longer maintained**.
**For new updates, please refer to the following fork https://github.com/cpp-redis/cpp_redis**
I have maintained this library for over 3 years, but I do not have enough time to provide a reliable support and continuous development for any longer.
Any existing or new issues will **not** be treated and I do not guarantee to merge any new pull request.
If anyone is willing to take over this project, feel free to fork this project and message me to add a link to your fork in this README.
# cpp_redis [![Build Status](https://travis-ci.org/Cylix/cpp_redis.svg?branch=master)](https://travis-ci.org/Cylix/cpp_redis) [![Build status](https://ci.appveyor.com/api/projects/status/d45yqju539t97s4m?svg=true)](https://ci.appveyor.com/project/Cylix/cpp-redis)
`cpp_redis` is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations, pipelining, sentinels and high availability.## Requirement
`cpp_redis` has **no dependency**. Its only requirement is `C++11`.It comes with no network module, so you are free to configure your own, or to use the default one ([tacopie](https://github.com/cylix/tacopie))
## Example
### cpp_redis::client
```cpp
cpp_redis::client client;client.connect();
client.set("hello", "42");
client.get("hello", [](cpp_redis::reply& reply) {
std::cout << reply << std::endl;
});
//! also support std::future
//! std::future get_reply = client.get("hello");client.sync_commit();
//! or client.commit(); for asynchronous call
```
`cpp_redis::client` [full documentation](https://github.com/Cylix/cpp_redis/wiki/Redis-Client) and [detailed example](https://github.com/Cylix/cpp_redis/wiki/Examples#redis-client).
More about [cpp_redis::reply](https://github.com/Cylix/cpp_redis/wiki/Replies).### cpp_redis::subscriber
```cpp
cpp_redis::subscriber sub;sub.connect();
sub.subscribe("some_chan", [](const std::string& chan, const std::string& msg) {
std::cout << "MESSAGE " << chan << ": " << msg << std::endl;
});
sub.psubscribe("*", [](const std::string& chan, const std::string& msg) {
std::cout << "PMESSAGE " << chan << ": " << msg << std::endl;
});sub.commit();
```
`cpp_redis::subscriber` [full documentation](https://github.com/Cylix/cpp_redis/wiki/Redis-Subscriber) and [detailed example](https://github.com/Cylix/cpp_redis/wiki/Examples#redis-subscriber).## Wiki
A [Wiki](https://github.com/Cylix/cpp_redis/wiki) is available and provides full documentation for the library as well as [installation explanations](https://github.com/Cylix/cpp_redis/wiki/Installation).# Doxygen
A [Doxygen documentation](https://cylix.github.io/cpp_redis/html/) is available and provides full API documentation for the library.## License
`cpp_redis` is under [MIT License](LICENSE).## Contributing
Please refer to [CONTRIBUTING.md](CONTRIBUTING.md).## Special Thanks
[Mike Moening](https://github.com/MikesAracade) for his unexpected and incredible great work aiming to port cpp_redis on Windows, provides sentinel support and high availability support!## Author
[Simon Ninon](http://simon-ninon.fr)