Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sidhyaashu/backend_search_optimization_bloom_filter_algo
https://github.com/sidhyaashu/backend_search_optimization_bloom_filter_algo
bloom-filter express nodejs redis
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sidhyaashu/backend_search_optimization_bloom_filter_algo
- Owner: sidhyaashu
- License: apache-2.0
- Created: 2024-12-03T17:19:11.000Z (20 days ago)
- Default Branch: sidhya
- Last Pushed: 2024-12-03T18:24:05.000Z (20 days ago)
- Last Synced: 2024-12-03T19:27:14.315Z (20 days ago)
- Topics: bloom-filter, express, nodejs, redis
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Here's a **`README.md`** template for a GitHub repository focused on implementing and understanding the Bloom Filter algorithm:
---
# πΌ Bloom Filter Algorithm
A **Bloom Filter** is a space-efficient probabilistic data structure designed to test whether an element is a member of a set. While it can determine if an element is *definitely not* in the set, it may yield false positives for elements that *might be* in the set. This repository contains an implementation of the Bloom Filter algorithm and explanations of its workings.
---
## π Features
- **Space-efficient**: Compact representation of large datasets.
- **Fast Operations**: Quickly insert and query elements.
- **Customizable Parameters**: Adjust false positive rates and memory usage.
- **Python Implementation**: Includes an easy-to-understand implementation with comments.---
## π Understanding Bloom Filters
A Bloom Filter consists of:
1. **Bit Array**: A large array of bits initialized to 0.
2. **Hash Functions**: A set of independent hash functions that map elements to positions in the bit array.### Operations
1. **Insert an Element**:
- Pass the element through each hash function.
- Set the bit at each resulting position in the bit array to 1.2. **Query an Element**:
- Pass the element through the same hash functions.
- Check the bits at the corresponding positions in the array.
- If any of the bits are 0, the element is *definitely not* in the set.
- If all bits are 1, the element *might be* in the set.### Key Characteristics
- **No False Negatives**: If the filter says an element is not in the set, itβs guaranteed to be correct.
- **False Positives**: An element might be reported as in the set even when it isnβt.---
---## π οΈ Customization
Modify the parameters in `bloom_filter.py` to adjust:
- **Size of the Bit Array**: Larger arrays reduce false positive rates.
- **Number of Hash Functions**: More functions improve accuracy but increase processing time.---
## π Learn More
- [Bloom Filters on Wikipedia](https://en.wikipedia.org/wiki/Bloom_filter)
- [Optimal Parameters for Bloom Filters](https://en.wikipedia.org/wiki/Bloom_filter#Optimal_number_of_hash_functions)---
## π€ Contributing
Contributions are welcome! Please:
1. Fork the repository.
2. Create a new branch for your feature/bug fix.
3. Submit a pull request with a detailed description.---
## π License
This project is licensed under the License. See the [LICENSE](./LICENSE) file for details.
---
## π Acknowledgments
Thanks to the open-source community for inspiration and support in developing this project!
---