Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 40576 invoked from network); 11 Aug 2009 15:43:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Aug 2009 15:43:56 -0000 Received: (qmail 65323 invoked by uid 500); 11 Aug 2009 15:44:02 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 65247 invoked by uid 500); 11 Aug 2009 15:44:02 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 65237 invoked by uid 99); 11 Aug 2009 15:44:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 15:44:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jens@mooseyard.com designates 208.97.132.81 as permitted sender) Received: from [208.97.132.81] (HELO randymail-a2.g.dreamhost.com) (208.97.132.81) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 15:43:52 +0000 Received: from [10.0.1.105] (76-191-199-100.dsl.dynamic.sonic.net [76.191.199.100]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by randymail-a2.g.dreamhost.com (Postfix) with ESMTP id E15E3EE2F0 for ; Tue, 11 Aug 2009 08:43:30 -0700 (PDT) Message-Id: <5B24687D-DB8B-4FB4-B738-D3A19C426846@mooseyard.com> From: Jens Alfke To: dev@couchdb.apache.org Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Subject: Detailed info on the B-tree store? Native implementations thereof? Date: Tue, 11 Aug 2009 08:43:27 -0700 X-Mailer: Apple Mail (2.936) X-Virus-Checked: Checked by ClamAV on apache.org I'm interested in the underpinnings of the CouchDB server =97 the crash-=20= proof concurrent B-tree store. There's a blog post linked to in the =20 wiki that describes the basic concepts (leaves and updated =20 intermediate nodes are appended to the file; the start of the file =20 stores two links to the root node) but is there any more detailed =20 description[1]? And is there any similar technology available that's =20 implemented in native code (C/C++)?[2] Basically I'm interested in whether it's feasible to build a simple =20 storage system (for use in an HTML5 Web browser) that a CouchDB-=20 compatible client library could be built on top of. JChris has posted =20= about this topic recently[3], and pointed out that the hashtable-=20 oriented key-value store currently speced in HTML5 is a poor match for =20= CouchDB. Moreover, the SQLite database engine underneath it doesn't =20 guarantee data integrity after a hard system crash (as I know from =20 painful experience.) So: could we build a fault-tolerant B-tree based =20= API into the browser? (This isn't just academic curiosity: I recently =20= started work on the Chrome team at Google, and HTML5 local storage is =20= one of my group's responsibilities.) Thanks! =97Jens [1] Alas, I cannot Use The Source, Luke, as I do not have Erlang =20 skillz. :( [2] I know of many, many B-tree libraries (Berkeley DB, =20 TokyoCabinet...) but none that are fault-tolerant. [3] http://jchrisa.net/drl/_design/sofa/_show/post/Fixing-HTML-5-Storage=