Skip to content

saarw/rustybitmaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rustybitmaps

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).

Building and running

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

JSON-RPC API

Server starts accepting connections on 127.0.0.1:8081 and receives POST requests on the path /. All parameters should be passed in as a list of strings, ["", ""..], even though they are in practice numbers. The server supports the following methods

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.

Limitations

  • No persistence, everything gets cleared when the server is restarted
  • Not tested/tuned for either quality or performance
  • First experiment with language

About

GC-free compressed bitmap microservice with JSON-RPC API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages