项目作者: areller

项目描述 :
Redis with Sorted Dictionaries
高级语言: C
项目地址: git://github.com/areller/redis-dict.git
创建时间: 2019-02-09T22:02:22Z
项目社区:https://github.com/areller/redis-dict

开源协议:MIT License

下载


Redis-Dict

A Redis module that exposes a new data type - sorted dictionary.

Sorted Dictionary vs Sorted Set

The need for a sorted dictionary data type arises from the fact that in sorted sets,

  • You can’t store similar members with different scores.
  • You can have multiple members with the same score.

Sorted dictionary is not the same as a sorted set. It acts like a hash set, but sorts itself by key.

Implementation Details

Sorted dictionaries work by combining sorted sets and hash sets.
Since sorted dictionaries are in essence, dictionaries, the key and values of the dictionary are stored in an hash set and to maintain the order of the keys, we store the keys in a sorted set.

Commands

For now you can find usage of all commands in test_rdict.py