dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Missing SINTERCARD command

Open 0xManjeet opened this issue 2 years ago • 8 comments

0xManjeet avatar Apr 16 '23 18:04 0xManjeet

Yeah, we do not support redis 7.0 API yet. Why do you need it?

romange avatar Apr 17 '23 03:04 romange

My app maintains a list of users who are currently online, and this list can potentially reach millions in number. In addition, the app has several group chats, each with thousands of members.

My plan was to store the active users in a sorted set (which gets cleaned up the set every few minutes.), and the group members for each chat in regular set.

And the cardinality of the intersected set would give me the number of active users in a specific group chat.

0xManjeet avatar Apr 17 '23 04:04 0xManjeet

I see. So you need to intersect a sorted set with a regular set?

romange avatar Apr 17 '23 04:04 romange

Yes, and I need the cardinality of the intersected set. One way is that I can first ZINTERSTORE and then get the cardinality of the new set, and clean up the new set after that, but a single command to do that will be much simple and better.

0xManjeet avatar Apr 17 '23 04:04 0xManjeet

Hi @romange,

Do you have any timeline for possibly implementing SINTERCARD in DragonflyDB?

Any rough estimate or roadmap would be helpful for me to plan my usage of DragonflyDB accordingly.

0xManjeet avatar May 06 '23 23:05 0xManjeet

This quarter :)

romange avatar May 07 '23 04:05 romange

@0xManjeet btw, given your description you need to use ZINTERCARD and not SINTERCARD because you want to intersect a sorted set with set. Please confirm

romange avatar May 07 '23 08:05 romange

You're right, I'll need ZINTERCARD for my specific use case.

0xManjeet avatar May 07 '23 18:05 0xManjeet