atom feed1 message in org.apache.couchdb.devDetailed info on the B-tree store? Na...
FromSent OnAttachments
Jens AlfkeAug 11, 2009 8:43 am 
Subject:Detailed info on the B-tree store? Native implementations thereof?
From:Jens Alfke (
Date:Aug 11, 2009 8:43:27 am

I'm interested in the underpinnings of the CouchDB server — the crash- proof concurrent B-tree store. There's a blog post linked to in the wiki that describes the basic concepts (leaves and updated intermediate nodes are appended to the file; the start of the file stores two links to the root node) but is there any more detailed description[1]? And is there any similar technology available that's implemented in native code (C/C++)?[2]

Basically I'm interested in whether it's feasible to build a simple storage system (for use in an HTML5 Web browser) that a CouchDB- compatible client library could be built on top of. JChris has posted about this topic recently[3], and pointed out that the hashtable- oriented key-value store currently speced in HTML5 is a poor match for CouchDB. Moreover, the SQLite database engine underneath it doesn't guarantee data integrity after a hard system crash (as I know from painful experience.) So: could we build a fault-tolerant B-tree based API into the browser? (This isn't just academic curiosity: I recently started work on the Chrome team at Google, and HTML5 local storage is one of my group's responsibilities.)



[1] Alas, I cannot Use The Source, Luke, as I do not have Erlang skillz. :( [2] I know of many, many B-tree libraries (Berkeley DB, TokyoCabinet...) but none that are fault-tolerant. [3]