All Projects → shawn246 → redis_client

shawn246 / redis_client

Licence: other
a redis client supports cluster

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to redis client

Servicestack.redis
.NET's leading C# Redis Client
Stars: ✭ 2,236 (+3005.56%)
Mutual labels:  redis-client
aedis
An async redis client designed for performance and scalability
Stars: ✭ 118 (+63.89%)
Mutual labels:  redis-client
node-redis
A high-performance Node.js Redis client.
Stars: ✭ 15,783 (+21820.83%)
Mutual labels:  redis-client
Pottery
Redis for humans. 🌎🌍🌏
Stars: ✭ 204 (+183.33%)
Mutual labels:  redis-client
lib mysqludf redis
Provides Mysql UDF commands to synchronize data from Mysql to Redis.
Stars: ✭ 20 (-72.22%)
Mutual labels:  redis-client
racket-redis
Fast, idiomatic Redis bidings for Racket.
Stars: ✭ 30 (-58.33%)
Mutual labels:  redis-client
Go Rejson
Golang client for redislabs' ReJSON module with support for multilple redis clients (redigo, go-redis)
Stars: ✭ 164 (+127.78%)
Mutual labels:  redis-client
TRedisWire
Delphi Redis connector
Stars: ✭ 17 (-76.39%)
Mutual labels:  redis-client
MythRedisClient
🏎️使用JavaFx做的Redis客户端,资源消耗略大 200-300m,想复用核心代码做成web端,然后浏览器操作,开发起来和跑起来也快
Stars: ✭ 26 (-63.89%)
Mutual labels:  redis-client
scala-redis
A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side.
Stars: ✭ 1,016 (+1311.11%)
Mutual labels:  redis-client
Egg Redis
redis plugin for egg
Stars: ✭ 234 (+225%)
Mutual labels:  redis-client
RedisDrive
This is a.Net redis integrated driver to support a single instance, cluster, sentinel and other modes of data manipulation 这是一个.net 的redis集成驱动,支持单实例、云集群、哨兵等模式的数据操作
Stars: ✭ 19 (-73.61%)
Mutual labels:  redis-client
redis-rs
Redis client for Rust.
Stars: ✭ 25 (-65.28%)
Mutual labels:  redis-client
Cachingframework.redis
Distributed caching based on StackExchange.Redis and Redis. Includes support for tagging and is cluster-compatible.
Stars: ✭ 209 (+190.28%)
Mutual labels:  redis-client
The-Overly-Complicated-Random-Number-Generator
An Overly Complex Random Number Generator, created to demystify how containers work.
Stars: ✭ 25 (-65.28%)
Mutual labels:  redis-client
Redis3m
A C++ Redis client
Stars: ✭ 173 (+140.28%)
Mutual labels:  redis-client
redisbloom-go
Go Client for RedisBloom probabilistic module
Stars: ✭ 74 (+2.78%)
Mutual labels:  redis-client
zig-okredis
Zero-allocation Client for Redis 6+
Stars: ✭ 137 (+90.28%)
Mutual labels:  redis-client
node-cache-manager-redis-store
Redis store for node-cache-manager using node_redis.
Stars: ✭ 117 (+62.5%)
Mutual labels:  redis-client
redis-patterns-console
An interactive (and reactive) console to try and go into the deep of Redis and its patterns!
Stars: ✭ 22 (-69.44%)
Mutual labels:  redis-client

Description

  • Only two files included. One hpp file and one cpp file.
  • Depend on hiredis.
  • Support both single node mode and cluster mode.
  • Support pipeline.
  • Use connection pool.
  • Thread safe.
  • Reconnect automatically.
  • Do not support windows yet. Find a read-write lock to replace the 'pthread_rwlock_t' if you want to use this on windows:)
  • (Thanks for the Brian's help.)

TODO

  • Optimize the reconnect function.
  • Support pub/sub and transaction.
  • Support scan in an unsafe way.

License

This program was written by Shawn XU and is released under the BSD license.

Usage

#include "RedisClient.hpp"

int main()
{
    CRedisClient redisCli;
    if (!redisCli.Initialize("127.0.0.1", 6379, 2, 10))
    {
        std::cout << "connect to redis failed" << std::endl;
        return -1;
    }

    std::string strKey = "key_1";
    std::string strVal;
    if (redisCli.Get(strKey, &strVal) == RC_SUCCESS)
    {
        std::cout << "key_1 has value " << strVal << std::endl;
        return 0;
    }
    else
    {
        std::cout << "request failed" << std::endl;
        return -1;
    }
}

You can view the test file if you want to know more using details about this client.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].