Bf-Tree is a modern read-write-optimized concurrent larger-than-memory range index in Rust from MSR.
Design Details
You can find the Bf-Tree research paper here. You can find more design docs here.
User Guide
Rust
Bf-Tree is written in Rust, and is available as a Rust crate. You can add Bf-Tree to your Cargo.toml like this:
[ dependencies ] bf-tree = " 0.1.0 "
An example use of Bf-Tree:
use bf_tree :: BfTree ; use bf_tree :: LeafReadResult ; let mut config = bf_tree :: Config :: default ( ) ; config . cb_min_record_size ( 4 ) ; let tree = BfTree :: with_config ( config , None ) . unwrap ( ) ; tree . insert ( b"key" , b"value" ) ; let mut buffer = [ 0u8 ; 1024 ] ; let read_size = tree . read ( b"key" , & mut buffer ) ; assert_eq ! ( read_size , LeafReadResult :: Found ( 5 ) ) ; assert_eq ! ( & buffer [ .. 5 ] , b"value" ) ;
PRs are accepted and preferred over feature requests. Feel free to reach out if you have any design questions.
... continue reading