albert-team / rebloom Goto Github PK
View Code? Open in Web Editor NEWMinimalistic RedisBloom client for Node.js
Home Page: https://albert-team.github.io/rebloom
License: MIT License
Minimalistic RedisBloom client for Node.js
Home Page: https://albert-team.github.io/rebloom
License: MIT License
It will be great, if you can add redis cluster support
Hello and thank you for maintaining this client,
Most features are additional options during the creation of Bloom and Cuckoo filters but a change that may break your clients is - CMS.INCRBY returns count
instead of OK
.
Regards,
Ariel
Hi @lqmanh, thanks for your work !
We are trying to use you library, but we are facing to timeout on each attempt to connect using both bloomfilter and cuckoofilter.
Maybe something is wrong on our side but even with a localhost redis and all params to default we are facing this issue.
Many thanks for your help !
Should be an uncapped exception i use Bull
to exec some tasks and bull task failed reason
stacktrace: [
"TypeError: Cannot read property 'addResponse' of undefined\n" +
' at JavascriptRedisParser.returnReply (/root/apps/api/node_modules/@albert-team/red/src/index.js:61:19)\n' +
' at JavascriptRedisParser.execute (/root/apps/api/node_modules/redis-parser/lib/parser.js:544:14)\n' +
' at Socket.<anonymous> (/root/apps/api/node_modules/@albert-team/red/src/index.js:95:41)\n' +
' at Socket.emit (events.js:326:22)\n' +
' at addChunk (_stream_readable.js:297:12)\n' +
' at readableAddChunk (_stream_readable.js:272:9)\n' +
' at Socket.Readable.push (_stream_readable.js:213:10)\n' +
' at TCP.onStreamRead (internal/stream_base_commons.js:188:23)'
]
try {
await some_filter.connect()
logger.info(`some_filter connect`)
await other_filter.connect()
logger.info(`other_filter connect`)
// do some exists check and add
} catch (err) {
// It didn't arrive here
throw err
} finally {
try {
await some_filter.disconnect()
logger.info(`some_filter disconnect`)
await other_filter.disconnect()
logger.info(`other_filter disconnect`)
} catch (e) { }
}
I know that bloom filter could grasp endless streams. Nevertheless, If I want to add time into consideration, say for instance re-run topK only on items added since 30 days, can I do so ?
As title.
I tried to find what are the default options for rebloom
But couldn't find anything.
The doubt's which I had in my mind are
Thanks
const { BloomFilter } = require('@albert-team/rebloom')
const main = async () => {
const filter = new BloomFilter('filtername')
await filter.connect()
console.log(await filter.add('item0')) // 1
console.log(await filter.exists('item0')) // 1
console.log(await filter.exists('item1')) // 0
await filter.disconnect()
}
main()
if i want to connect remote redis,how should i modify this code,how I add Options params ,if have some examples maybe helpful!
It will be great if you could update this client to support it.
There is a python client which up to date and additional documentation about both count-min sketch and topk.
The repository was linked on RedisBloom main page.
Thank you for the support.
Given RedisBloom/RedisBloom#285 there is the following set of commands we should enable:
TDIGEST.CREATE
: Allocate a new histogramTDIGEST.RESET
: Empty out a histogram and re-initialize itTDIGEST.ADD
: Add a value to the t-Digest with the specified countTDIGEST.MERGE
: Merge one t-Digest into anotherTDIGEST.CDF
: Returns the fraction of all points added which are โค x.TDIGEST.QUANTILE
: Returns an estimate of the cutoff such that a specified fraction of the data added to the t-Digest would be less than or equal to the cutoff.TDIGEST.MIN
: Get the minimum value from the histogram. Will return DBL_MAX if the histogram is emptyTDIGEST.MAX
: Get the maximum value from the histogram. Will return DBL_MIN if the histogram is emptyTDIGEST.INFO
: Returns compression, capacity, total merged and unmerged nodes, the total compressionsWith the in-depth params in https://oss.redislabs.com/redisbloom/master/TDigest_Commands/
Could you provide an example of TopKFilter, which is to my understanding an algorithm that could find top items in a stream.
My case is user searches on a website, so items are Strings.
Many thanks !!
In the readme.MD, seems rebloom directly connect to 127.0.0.1:6379, is it possible to connect other ip address, like 192.168.10.10:6379?
Another problem is, in the source code, seems not support commnd bf.info, would you please add such command?
Thanks
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.