On Tue, Feb 1, 2011 at 14:01, kowsik <[email protected]> wrote: >> Anyway I was thinking that using your memcouchd it would be possible to >> create an embedded couch compatible db for use in Appclerator based apps. >> Appcelerator has partial support for commonjs and I've got your code running >> with a few small alterations. I haven't been able to get the test suite >> running due to issues with some of the modules from nodejs but it should be >> doable with a bit of hacking. >> >> The only things missing that would make this really useful are the ability >> to persist the documents on the device and replication. I think that the >> documents could potentially be stored using the Properties API which stores >> key value pairs. Unfortunately the support for manipulating binary files is >> lacking in Appcelerator so I think implementing the couch file format would >> be impossible without implementing it in Objective-c and Java as native >> extensions which is possible but I'd rather avoid writing platform specific >> code if possible. > > Persistence, replication and _changes are what makes Couch what it is. > I wasn't thinking persistence at all for memcouchd, though at this > point (for a 2 day old project), it's anybody's guess where it's going > to go. If we can implement the _changes feed + replication without the > persistence, I can see memcouchd being a pure transient store that can > replicate at-will from the "real" couch.
All that is required in order to produce a semantically correct replicator is an absolute ordering on updates like CouchDB's sequence numbers. > > BTW, Just committed a partial btree implementation to memcouchd: > > https://github.com/pcapr/memcouchd/blob/master/lib/btree.js > You might have a look at nStore or node-dirty. Some work has already gone into making these efficient. As I recall from talking to Tim Caswell, the major limitation to nStore at some time was file size limitations due to js not handling big integers with 100% precision. It may be that a database size limit is an acceptable limitation. -Randall
