SHAREdis hopes to encapsulate and expand the key-value interface of TiKV on top of the advantages of TiKV, and use the Redis client protocol to implement Redis data types and interface operations, while shielding the complex cluster management inside the distributed system, Data synchronization operation, thereby providing a distributed SSD cache computing layer service that can replace/supplement Redis.
- [Go1.13(for compiling)]
- [Python2(for testing)]
- compile
cd src
make
- run server
cd bin
./sharedis --conf ../conf/config.toml
cd src/test
python kv.py
TiKV key:
length | 1Byte | segment_size | 4bit | 12bit | raw_key_size |
---|---|---|---|---|---|
content | segment_size | segment | type | raw_key_size | raw_key |
TiKV value:
length | raw_value_len |
---|---|
content | raw_value |
TiKV key:
length | 1Byte | segment_size | 4bit | 12bit | name_size | all_key_size - before |
---|---|---|---|---|---|---|
content | segment_size | segment | type | name_size | set_name | member |
TiKV value:
length |
---|
content |
TiKV key:
length | 1Byte | segment_size | 4bit | 12bit | name_size | all_key_size - before |
---|---|---|---|---|---|---|
content | segment_size | segment | type | name_size | hash_name | field |
TiKV value:
length | field_value_len |
---|---|
content | field_value |
TiKV key:
length | 1Byte | segment_size | 4bit | 12bit | name_size | 8Byte | all_key_size - before |
---|---|---|---|---|---|---|---|
content | segment_size | segment | type | name_size | zset_name | score | member |
TiKV value:
length |
---|
content |
TiKV key:
length | 1Byte | segment_size | 4bit | 12bit | name_size | all_key_size - before |
---|---|---|---|---|---|---|
content | segment_size | segment | type | name_size | zset_name | member |
TiKV value:
length | 8Byte |
---|---|
content | score |
Currently, sharedis interacts with clients using the thrift-based rpc protocol, which will be replaced with the Redis protocol in the future
Redis Command Groups | Redis Commands |
---|---|
string | set |
string | get |
string | mset |
string | mget |
string | ttl |
string | del |
set | sadd |
set | srem |
set | smembers |
set | scard |
set | sismember |
hash | hset |
hash | hget |
hash | hkeys |
hash | hdel |
hash | hmset |
hash | hmget |
zset | zadd |
zset | zscore |
zset | zrem |
zset | zrange |
zset | zrangebyscore |
zset | zcard |
zset | zscan |
Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.
- vortex0305 - Initial work
- daimashusheng - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details