HTML5 Storage Continues
I love HTML5 because it's got such a pragmatic approach. The original descriptive effort of current usage and implementation is undoubtably the right approach. On the applications front, new efforts like Web Workers lead the way on the future of computing.
On the storage front, the original notion of, "heh, let's just drop SQLite in there and call it awesome" is a perfect example of the original descriptive pragmatism. But HTML5 also has an obligation to consider the "long now" of computing. The #1 concern in the coming decade will be concurrency.
I'm working on an HTML5 spec proposal on how you can build CouchDB using a B-Tree and Web Workers. The focus is on simplicity and ease of implementation. Some people don't realize that CouchDB is built on a very simple core, so we don't need much spec to support it.
It's still messy, and fluid. Here's an excerpt from something I sent to some folks about implementing it:
Our goal original goal is for the spec to be as simple as physically possible, and still able to support CouchDB-style offline replication. Adding features on top of that can be approached pragmatically.
I think implementing our spec should involve a lot of the same work for WebSimpleDB, so trying it out won't create a huge cost. Eg: once you've got Tokyo Cabinet wired into the window, wrapping it for JSONDB/WebWorkerStorage should overlap with wrapping it for WebSimpleDB.
The minimum we need in order to build a proper replicating CouchDB is a B-Tree with (optional) secondary indexes, that can be run from within a web worker.
I think the fact that we can demonstrate a useful query model without exposing a transaction API is key. In the multi-core world, locking is not acceptable. We understand that underlying implementations may hold locks, but giving a locking API to user code seems like a recipe for fail, as it prevents truly lockless implementations by vendors.
I'm still hard at work in the WebWorkerStorage repo, and I'm eager to take patches.
I think this spec has a chance if it's put together collaboratively and is released along with an implementation. As far as implementation goes, once a browser implements the bare-bones B-Tree (secondary indexes as described in WebSimpleDB help a lot but aren't strictly necessary) we should be able to easily build a replicating Couch inside a web worker.