Thanks for the update. It looks like to me there is much work to do. Is there any alternative option? I'm still thinking that if we could leverage any existing back end implementation, so we could focus on the LDAP specific logic for the master server component...this is worth being considered because in today's industry there are so many B-TREE's implementations already.
Sorry for the bothering and interrupting. Regards, Kai -----Original Message----- From: Emmanuel Lécharny [mailto:[email protected]] Sent: Sunday, June 26, 2016 7:15 PM To: Apache Directory Developers List <[email protected]> Subject: Rethinking Mavibot... Hi guys, now that I'm done with the LDAP API release and ApacheDS release, I'd like to dedicate some time to complete Mavibot, as it's a critical part of the server. The current status is not exactly perfect. It's usable, but there is no support for transaction across B-trees, which makes it as brittle as JDBM when it comes to use it in ApacheDS (simply because an update impact many B-Trees, so it has to be an all-or-nothing operation, which implies a cross-B-trees transaction). We have started to implement it in a branch (single-value) where other changes have been applied : - no support for multi-values (way too complex to support in this first version) - no support for in-memory B-trees (not critical, makes everything more complex) Here is how I see transactions being implemented : - The recordManager will be responsible for creating new transactions. - each operation on any B-tree will require an extra parameter, the transaction that it belongs to - transaction will not last forever, a default timeout of 30 mins will be used, to avoid long-lasted transactions that would make the database grow without control (keep in mind that a read transaction holds a revision until it's aborted, which leads to holding old pages on disk). So bottom line, here is what an operation will looks like : RecordManager recordManager = new RecordManager( "MyDatabase" ); Transaction readTransaction = recordManager.beginReadTransaction(); BTree<Long, String> btree = recordManager.getManagedTree( readTransaction, "MyBtree" ); boolean hasKey = btree.haskey( 1L ); readTransaction.abort(); // COuld have been commit(); More to come in the following weeks.
