Bitcask is a local key value store. It can be used as a persistent hashtable that can hold large amount of data. The original implementation written in Erlang is used as a backend for the Riak distributed database.
This implementation allows you to operate on bitcask stores from OCaml while being compatible with the original implementation.
(* open a store located in $PWD/test-store/ in read-write mode *) let bitcask = Bitcask.load ~mode:BitcaskOption.Read_write "test-store" in (* insert some data *) Bitcask.put bitcask "key" "value"; (* fetch some data *) print_endline (Bitcask.get_exn bitcask "key"); (* eventually close the store *) Bitcask.close bitcaskYou can then compile this file with:
ocamlfind ocamlc -package bitcask -linkpkg -o bitcask_test bitcask_test.ml
git clone http://git.gitorious.org/ocaml-bitcask/ocaml-bitcask.git
git clone https://forge.ocamlcore.org/anonscm/git/bitcask/bitcask.git