Node.js based client library for Couchbase Server
I would like to make an open source database driver for Couchbase Server and so far I have found these resources:
If I understand it correctly, the client library would probably need to be able to work with the memcached binary protocol and also support HTTP REST based protocol for vBucket stuff and views querying. Now, should I start first with basic implementation of memcached binary protocol and then look at vBucket hashing and authentication or is there a better/other recommended approach?
Thanks for your time and help.
I would start by implementing the vBucket hashing and authentication first, but you can approach the client from either direction. If you decide to do the vBucket hashing stuff first then you will want your client to send memcached protocol messages to port 11210 (not 11211). As for getting the bucket configuration stuff you will want to connect to port 8091.
If you go the other route and want to start getting the memcached protocol working then you will want to go through port 11211. This is because there is a proxy server that listens on 11211 and will route memcached protocol messages to the correct server. The downside to doing things this way is that this adds some extra latency to your requests.
Other than that I want to mention that in our other clients we only use the couchDB HTTP protocol to take a advantage of views. We do this because memcached protocol is much faster than the memcached protocol.
It's great to hear that you will be creating a Couchbase node.js client. Definitely let us know if you have any other questions.