An open API service indexing awesome lists of open source software.

https://github.com/ksm2/bloom-filter-server

TCP server to store Bloom filter information
https://github.com/ksm2/bloom-filter-server

bloom-filters rust-server tcp-server

Last synced: about 2 months ago
JSON representation

TCP server to store Bloom filter information

Awesome Lists containing this project

README

        

bloom-filter-server
===================

> A TCP server to store Bloom filter information written in Rust.

Installation
------------

Install it via **Docker**:

docker run -it -p 1337:1337 ksm2/bloom-filter-server

The server comes with a very lightweight alpine image (< 10 MB).

Or build it with **Rust** and **Cargo**:

cargo run

Usage
-----

Connect to the server e.g. with **Telnet**:

telnet 127.0.0.1 1337

Then you can run the following commands.

Commands
--------

* **`ADD`** `` `[]` `[]` `[...]`

Adds _item1_... to the Bloom filter.

The server returns `OK.` on success.

* **`RMV`** `` `[]` `[]` `[...]`

Removes _item1_ ... from the Bloom filter.

The server returns `OK.` on success.

* **`HAS`** ``

Checks whether _item_ is contained in the Bloom filter.

The server returns `Yes.` if so, or `No.` otherwise.

* **`CNT`** ``

Counts how often _item_ is contained in the Bloom filter.

The server returns `.`, with _count_ being the count.

* **`BIN`**

Returns the binary Bloom filter bits.

The server returns an octet stream of the Bloom filter (fixed to 32 bytes currently).