Last April, Atul Varma of Mozilla posted an article on an implementation of a local storage wrapper that mimicked CouchDB's map-reduce query interface.
In the comments, my friend Mikeal
If you could add replication this would give the current Weave
stuff a run for it's money
In a world where HTML5 is becoming the only open platform for mobile app development, and where locally stored and owned data is becoming rare, this concept was not only exciting from an engineering standpoint, but also tied in with my ideological views on open data.
For a year, the idea percolated through my head, but until about a month ago I hadn't done anything about it.
After leaving Slide last month, I had lot of free time to work on personal projects. I forked a repository on github and began almost immediately. Within a few days I had replication working.
I've been working on it off and on ever since. I'd love to hear your feedback — it's not in a stable state yet, although the unit tests run and replication to localhost works, but I'd love to get as much feedback on the API design as possible before I release a 0.1 version, as it'll be much harder to make such changes if people start to use it.
So what's on the todo-list?
Well, as was pointed out to me by the intimidatingly smart people at couchio, I'm doing replication all wrong - I need to store _seq numbers and a by sequence tree. That's the next major change I plan to make.
I also want to get Futon working on it, which will require a lot of work.
As always, feel free to fork it or comment on my commits.