Skip to content

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

Open
@simonprickett

Description

@simonprickett

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions