be-tree

Crates.iobe-tree
lib.rsbe-tree
version0.1.0
sourcesrc
created_at2020-09-24 18:03:30.624727
updated_at2020-09-24 18:03:30.624727
descriptionB𝛆 Tree library in Rust.
homepagehttps://github.com/psiace/be-tree
repositoryhttps://github.com/psiace/be-tree
max_upload_size
id292592
size23,835
Chojan Shang (PsiACE)

documentation

README

B𝛆 Tree library in Rust

Crates.io Docs MIT/APACHE-2.0 GitHub Workflow Status

This is a port of Dan Hulme's b𝛆-tree implementation. Since he does not seem to be active on GitHub and does not continue to maintain the library, I did a port.

The following introduction is derived from the original. Thanks Dan!

Well, that's the goal. This was started as a "mob programming" experiment at a Rust meetup. At the meetup we didn't get as far as implementing a plain B-tree, but it's a start, and I've made some further changes since the meetup.

The idea is to implement the B𝛆-tree data structure from this 2015 paper. It's a refinement of the B-tree for faster writing (at some cost to queries). Instead of pushing changes to the relevant leaf node immediately, each branch node contains a (persistent) command queue which buffers changes. Thus, the cost of loading child nodes from disk is amortised over several operations.

Unfortunately, queries are no faster (and a little slower, because they need to read the command queue). Operations that need to read an existing value and then update it would still be slow. The authors added an extra operation, upsert, which reads the value (if any), applies an operation to it, and writes the modified value. Upserts can be stored into the command queue like insertions, so they get the same performance benefit as inserts.

Alternatives

Contributors

Every member of the "mob" at the meetup should go in this contributor list. If that's you, please send a pull request that adds your name to the list.

Contact

Chojan Shang - @PsiACE - psiace@outlook.com

Project Link: https://github.com/psiace/be-tree

License

Licensed under either of:

Commit count: 17

cargo fmt