Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by devj on Tuesday March 31, 2020 @11:11PM
(#22745247)
Sorry.. Forgot to mention that.
Yes insertion/deletion is required and the frequency may be higher. The exact usecase is that group membership is dependent on some conditions. We schedule this check every 15 minutes and based on it, we are adding/deleting the members.
Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by cakoose on Wednesday April 01, 2020 @02:36AM
(#22746292)
Xor filters require all the members of the set be provided up front.
Bloom filters allow adding members, but not removing them.
Cuckoo filters allow removing members: https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf
And just for completeness, storing everything losslessly in a btree, radix tree, or hash table would probably be under 300 kB. (80 kB just for the IDs plus, say, an additional ~2x overhead.)
Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by throwaway_pdp09 on Wednesday April 01, 2020 @04:17AM
(#22746730)
Safe removal is only possible if you know it is already in filter. The 'you can delete from cuckoo filters' bit I feel is often oversold.
Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by cakoose on Tuesday April 07, 2020 @06:59PM
(#22808387)
Oh wow, I only read the paper's abstract and was fooled. Thanks for the correction.
Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by antman on Wednesday April 01, 2020 @04:21AM
(#22746746)
You can use a counting Bloom Filter that allows deleting. Depending on your update requirements you might also be ok with two bloom filters, one for that has the group memberships and one that has group removals.
Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by im3w1l on Wednesday April 01, 2020 @04:52AM
(#22746875)
10k members every 15 minutes? Just rebuild it from scratch.
Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by rbanffy on Wednesday April 01, 2020 @04:58AM
(#22746901)
Or use a Cuckoo fiter.
Re:Xor Filters: Faster and Smaller Than Bloom and Cuckoo Fil...
by the8472 on Wednesday April 01, 2020 @07:05AM
(#22747496)
> The sketch production isn't incremental - there is no add(k) after building it once.
Which means they can't be used for distributed set intersections, unions or cardinality estimations, a not insignificant side-benefit of bloom filters.
The 8byte key is the only scenario where you should consider XorPlus (i.e a 8 bytes mapped to a long).
The lookup properties of the Xor filter are better with that case, but the real question is whether you have an entire collection to start building the bitset or not.
The sketch production isn't incremental - there is no add(k) after building it once.
So you can't build add data once it is built, while the Bloom filters do support adding entries after the fact (in fact, it can add bloom filters into it, rather than sending all the new keys).
And both of those approaches are missing an unset operation.