tair-opensource / tairzset Goto Github PK
View Code? Open in Web Editor NEWA redis module, similar to redis zset, but you can set multiple scores for each member to support multi-dimensional sorting
License: Apache License 2.0
A redis module, similar to redis zset, but you can set multiple scores for each member to support multi-dimensional sorting
License: Apache License 2.0
zrange:
可以指定返回某个特定维度的值
zadd:
可以修改某个特定维度的值
类似于将zset的score当成一个记录,A#B#C,此时,能够根据score的添加来更新某些特定的score. 比如,ZADD KEY NX 1#2#3 EX 1#2 MEMBER
Syntax
exzrankwithscore key
Array reply.
Return rank and score.
场景:
在某些场景下,我们需要固定容量的zset,hash,或者set,一个简单的例子就是自由聊天室,只允许最大固定人数的群成员,过期淘汰或者超过容量淘汰。
原理:
类似于redis的淘汰策略,检查到容量超标了,淘汰掉有效期最小的元素.
Hi, Thanks for your nice work!
I think there might be a use case for having different scores being compared in independent orders. Let's say I want to create a leaderboard for my game and I have a highscore with an ascending score (meaning the higher the score, the higher the rank) and for the same scores I would compare the time of the score (which the lower the time the higher the rank). From what I see with your module, we have to accomplish this with saving either the time or the highscore with some math function to reverse it's meaning and then use the module. But because I think this feature would be used alot, It would be worth implementation. Can this be implemented?
Thanks
Description of the feature
The new command ZINTERCARD
was introduced in Redis 7.0. We can implement this command, too.
Additional information
有实现原理讲解吗
I notice that ReadMe file tells it support redis 5.x and 6.x
I want to know whether it support redis 7
Hi, another feature request for leaderboard here.
It is common to order players with same highscore by timestamp, so that the first one to get this score is higher in rank. This is easily done with this module.
The issue is in increment command, when you add some score points what you actually want for timestamp part is not to increment it, but to update it to current time.
Suppose we have this scores for id
1000#1500000000
after this operation (illustration only, not the desired syntax):
exzincrbyandset key +10#=1689158754 id
result should be
1010#1689158754
https://asoc2022.opensource.alibaba.com/
TairZset作为redis原生zset的一个多增增强结构,前期只实现了一些基本的命令, 还有部分命令(使用频率相对较低)没有支持,
为了更好的对齐redis原生zset语义,需要补全这些命令的实现和对应的测试。
1、开发支持EXZUNIONSTORE、EXZUNION、EXZSCAN、EXZDIFF、EXZDIFFSTORE、EXZINTER、EXZINTERSTORE、EXZRANDMEMBER、EXZMSCORE等确实命令(对齐到redis 5.0版本即可)
2、添加对应的tcl测试
熟悉c、tcl,了解redis zset实现原理
中
Qu Dong ,@chenyang8094,ASoC Mentor, redis contributor.
[email protected](联系导师请附上个人简历)
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.