MavibotPage edited by Emmanuel LécharnyChanges (2)
Full ContentThis is the Mavibot lab page. Mavibot is a MVCC B+Tree implementation in Java. Btree basicsA Btree is a data structure that stores <Key, Value> tuples in a tree, with the guarantee that the tree will be ordered, and that the depth of the tree is the same for all the leaves. A Btree has nodes and leaves (with the only exception of a Btree with only a root page). The nodes are used to route to the underlying values, and have children. Leaves don't have children. Nodes and leaves have a constant number of elements stored into them, and when they are full, they are split. If the split is done on a leaf, we may have to reorganize the tree so that either we can move some elements up and keep the tree at the current hight, or we may have to reorganize the full tree so that all the leaves are at the same level, which will then be one deeper than the tree before the split. Btree vs B+TreeThe difference between those two data structures is that Btree store values in the nodes, when B+Tree do store all the values in leaves. At first glance, we can say that finding a value in a Btree will be faster, as we may not go down to the leaves to find it. OTOH, a B+Tree has many advantages, but the two major advantages are : Those two big advantages make the B+Tree more interesting to use than the simpler Btree. (See Wikipedia page on B+tree and Wikipedia page on Btree) MVCCMVCC (Multi Version Concurrency Control) is a way to provide concurrent access to the Btree (it's extensively used in many other areas, like programming languages and transactional memory). The main idea is to create a new version of the tree each time we do a modification. It also allows the reorganization of the data on the fly, but this is an extra benefit. The way it works is that when you do a search on the tree, you first acquire the current revision. Even if the search is taking a while, because it fetches many values, the tree will remain unchanged for the selected revision Any modification done on the tree will first create a new revision, and the modified pages will first be copied, so that the previous versions are still available for any search operation being executed at the same time. It has three direct consequences :
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
- [CONF] Apache Labs > Mavibot confluence
