tair学习资源
阿里云文档
https://help.aliyun.com/product/26340.html?spm=a2c4g.11186623.6.540.237b4bd7QQ8uG5
redis阿里云开发训练营
github地址 https://github.com/aliyun/alibabacloud-redis-training-demo
aliyun主页 https://developer.aliyun.com/learning/trainingcamp/redis/1
sdk以及开源模块
TairString https://github.com/alibaba/TairString
TairHash https://github.com/alibaba/TairHash
tairjedis https://github.com/aliyun/alibabacloud-tairjedis-sdk
开源module编译
目前github上tair开源了TairString和TairHash,其他的TairGis,TairBloom,TairDoc暂未开源,可以使用阿里云的内存数据库企业版性能增强版体验
Github地址
- TairString https://github.com/alibaba/TairString
- TairHash https://github.com/alibaba/TairHash
编译步骤
分别编译TairString和TairHash
在github上下载后,进入源码目录
mkdir build
cd build
cmake ../ && make -j
so文件链接
- 命令行使用redis-cli
- 使用module指令
MODULE load /Users/zihao/Documents/servers/TairString-main/lib/tairstring_module.so
MODULE load /Users/zihao/Documents/servers/TairHash-main/lib/tairhash_module.so
测试命令
127.0.0.1:6379> set hello world
OK
127.0.0.1:6379> cas hello world java
(integer) 1
127.0.0.1:6379> get hello
"java"
127.0.0.1:6379> exset hello world
OK
127.0.0.1:6379> exget hello
1) "world"
2) (integer) 1
127.0.0.1:6379> exhset user name zihao
(integer) 1
127.0.0.1:6379> exhget user name
"zihao"
阿里云官网文档
开源的TairString,TairHash可以使用官网提供的如下命令
CAS/CAD
TairString
TairHash
网友评论