A high-performance Bloom filter library written in Go, featuring multiple concurrency-safe implementations optimized for different workload patterns. Blossom also includes a REST API built with Gin for creating named Bloom filters, adding items, checking membership, and retrieving filter statistics.
- 🚀 High-performance Bloom filter implementation
- 🔒 Thread-safe concurrent operations
- ⚡ Multiple implementations:
- RWMutex-based Bloom Filter
- Atomic Bloom Filter
- Sharded Bloom Filter
- 🌐 REST API built with Gin
- 🧩 Create and manage multiple named Bloom filters
- ➕ Add elements to filters
- 🔍 Check element membership
- 📊 Retrieve filter statistics
- 🔑 Murmur3 hashing for efficient indexing
- 📦 Modular and extensible architecture
blossom/
├── bloom/ # Core Bloom filter implementations
├── bloom_api/ # REST API handlers and routes
├── gloom/ # Shared/internal components
├── main.go # Application entry point
├── go.mod
└── go.sum
| Category | Technologies |
|---|---|
| Language | Go (Golang) |
| Web Framework | Gin |
| Hashing | Murmur3 |
| Concurrency | RWMutex, sync/atomic, Sharding |
| API | RESTful API |
| Version Control | Git, GitHub |
- Go 1.20+
- Git
git clone https://github.com/akshitajundiya/blossom.git
cd blossomgo mod tidygo run main.goPOST /filters
POST /filters/{name}/add
GET /filters/{name}/contains
GET /filters/{name}/stats
Bloom filters are space-efficient probabilistic data structures used to quickly determine whether an element may exist in a set.
- Extremely memory efficient
- Fast insert and lookup operations
- Constant-time performance (O(k))
- Ideal for caching, databases, networking, and distributed systems
- May produce false positives
- No false negatives
- Standard Bloom filters do not support deletion
- Database query optimization
- Distributed caching
- Web crawlers
- API request filtering
- Duplicate detection
- Network packet filtering
- Recommendation systems
Contributions are welcome!
- Fork the repository
- Create a feature branch
git checkout -b feature/my-feature- Commit your changes
git commit -m "Add my feature"- Push to the branch
git push origin feature/my-feature- Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
If you find this project useful, consider giving it a ⭐ on GitHub!
Built with ❤️ using Go.