Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a count min sketch implementation to the Node.js code #4

Open
simonprickett opened this issue Oct 19, 2022 · 0 comments
Open

Add a count min sketch implementation to the Node.js code #4

simonprickett opened this issue Oct 19, 2022 · 0 comments

Comments

@simonprickett
Copy link
Contributor

simonprickett commented Oct 19, 2022

In this repo, we have code that looks at various probabilistic data structures included in Redis and RedisBloom. One that's not part of the demo code is the Count-Min Sketch (https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch).

Enhance the Node.js code to also count occurrences of each word from Moby Dick in a count-min sketch. You'll want to look at these Redis commands for this: https://redis.io/commands/?name=cms

Where the code outputs information about each data structure at the end, enhance it to use the CMS.QUERY (https://redis.io/commands/cms.query/) command to show the count as stored in the count-min sketch for each of the top 10 words reported by the top-k structure. To do this, you'll need to grab those words from the existing call to client.topK.listWithCount and feed them into the CMS.QUERY command, then logging the output.

Update the README.md in the nodejs folder, as well as the repo level README.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants