venuswu / r3c Goto Github PK
View Code? Open in Web Editor NEWThis project forked from eyjian/r3c
redis cluster c++ client
This project forked from eyjian/r3c
redis cluster c++ client
Redis Cluster C++ Client, based on hiredis, support password and standalone, it's easy to make and use, not depends on C++11 or later. r3c基于redis官方的c库hiredis实现,全称是redis cluster C++ client,支持redis cluster,支持密码访问。 编译链接r3c时,默认认为hiredis的安装目录为/usr/local/hiredis, 但可以在执行make时指定hiredis安装目录,如假设hiredis安装目录为/tmp/hiredis:make HIREDIS=/tmp/hiredis, 或修改Makefile中变量HIREDIS的值来指定hiredis实现的安装目录。 编译r3c成功后,将生成libr3c.a静态库,没有共享库被生成。 也可以直接将r3c.h和r3c.cpp两个文件加入到自己项目代码中一起编译,而不独立编译r3c。 r3c_cmd.cpp是r3c的非交互式命令行工具(command line tool),具备redis-cli的一些功能,但用法不尽相同,将逐步将覆盖redis-cli的所有功能。 r3c_test.cpp是r3c的单元测试程序(unit test),执行make test即可。 编译r3c(Compile r3c): make 或(or) make HIREDIS=/tmp/hiredis 安装(PREFIX指定安装目录,如果不指定则为/usr/local): make install 或(or) make install PREFIX=/usr/local/r3c 执行单元测试: make test 或(or) make test REDIS_CLUSTER_NODES=192.168.1.31:6379,192.168.1.31:6380 生成源代码间的依赖: make dep 关于接口: 如果传给CRedisClient的nodes参数为单个节点字符串,如192.168.1.31:6379则为单机模式,为多节点字符串时则为Redis Cluster模式。 性能测试工具: https://github.com/eyjian/mooon/blob/master/mooon/tools/r3c_stress.cpp 单机性能数据: r3c_stress --redis=192.168.0.88:6379 --requests=100000 --threads=20 set: microseconds=18867143, milliseconds=18867, seconds=18 total: 2000000, success: 2000000, failure: 0 qps: 111111 get: microseconds=16063882, milliseconds=16063, seconds=16 total: 2000000, success: 2000000, failure: 0, not exists: 0 qps: 125000 hset: microseconds=16134011, milliseconds=16134, seconds=16 total: 1999992, success: 1999992, failure: 0 qps: 124999 hget: microseconds=15249201, milliseconds=15249, seconds=15 total: 2000000, success: 2000000, failure: 0, not exists: 0 qps: 133333
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.