Hi kowsik, Thanks for sharing your code it looks pretty interesting.
I can think of a cool use for it outside of nodejs. I'm currently writing some applications using Titanium Appcelerator http://www.appcelerator.com/. I don't know if you know about it or not. It allows you to write applications for iPhone/iPad/Android using Javascript which gets converted into Objective-C or Java respectively and compiled into native applications. One thing I'd really like to have is couchdb or a compatible API running on these mobile devices which can be used for offline storage and syncing with couchdb servers. I'm aware that it is possible to compile couch for Android but after investigating running it on iOS I think this will be hard and it would probably not be allowed by Apple anyway due to the Erlang VM. 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. What are you thoughts about using your code for this purpose? Have you got any thoughts about serialising the store? Thanks again for sharing the code! Tim On 30 January 2011 12:33, kowsik <[email protected]> wrote: > Just something I that threw together in the last couple of days. YMMV > and I have no idea what you would use this for! :-) > > https://github.com/pcapr/memcouchd > > K. > --- > http://twitter.com/pcapr > http://labs.mudynamics.com >
