Blex is a fast Bloom filter with concurrent accessibility, powered by :atomics module.
Bloom filter is a space-efficient probabilistic data structure to check if a term is within a set. It’s using a fixed size bit array to store hashed index.
:atomics module provides a fixed size mutable 64 bits integer array, which is a very idea data structure for building bloom filter.
By building Bloom filter on top of :atomics, not only we have faster read and write operations (compare to immutable data structure, like :array module), more importantly, we gain the concurrent accessibility and we could have many processes read and write to it concurrently. Since data is saved in :atomics array, it’s shared by reference without data copy.
Project is available at github: github.com/gyson/blex
It’s also available at hex: hexdocs.pm/blex/Blex.html
Feedbacks, issues, pull requests are welcome!