RustyBitmaps is a GC-free compressed bitmap microservice written in Mozilla's programming language Rust. The program starts a web server with a simple JSON-RPC API and is backed by an open source implementation of the Roaring bitmaps compression for bitset data. The server is multi-threaded with memory read/write synchronization on each bitmap (requests can concurrently access different bitmaps).
Install v1.0 of Rust. Clone this repository. Run "cargo --release" in the root folder.The compilation and running of the included web server may require that you install binary and developer packages of OpenSSL (see build instructions of the OpenSSL crate).
To start the server with console log level set to info, go to the target/release folder and do
$ RUST_LOG=info ./rustybitmaps
method: create_new, params: []
Returns a string with the ID of the new bitmap.
method: insert_item, params: ["item index", "bitmap ID 1", "bitmap ID 2"...]
Inserts the item with numerical index "item_index" into the bitmaps with the specified IDs.
method: contains_item, params: ["item index", "bitmap ID 1", "bitmap ID 2"...]
Returns "true" if the item index had been previously inserted in ALL of the bitmaps with the specified indices.
- No persistence, everything gets cleared when the server is restarted
- Not tested/tuned for either quality or performance
- First experiment with language