node.js support and using memcached drivers to connect to Couchbase

381 views
Skip to first unread message

chanon

unread,
Mar 18, 2012, 12:23:44 AM3/18/12
to Couchbase
Hi,

We are currently developing an application using node.js. We are
currently using MongoDB but are interested in moving to Couchbase
instead, partly because of the easier cluster management. However
there doesn't seem to be an official SDK for node.js which is somewhat
disappointing.

I think you should consider developing an official SDK for node.js
because although node.js is new, it is gaining a lot of traction,
especially with 'early adopters' - the same group of people who would
decide to use a NoSQL database as their main datastore. This could
help create a community of devs using node.js and Couchbase.

Now, I've read that I can use memcached drivers to access Couchbase
from node.js. I'm wondering though, what would I be missing compared
to an official SDK?

Chanon

Matt Ingenthron

unread,
Mar 18, 2012, 10:29:24 PM3/18/12
to couc...@googlegroups.com
Hi Chanon,

First off, there are definitely some people working with existing
memcached clients for node.js. You wouldn't be missing much. There are a
few advanced operations that wouldn't be available, but 90+% of the common
stuff will be there. You wouldn't have a high-level API for accessing the
views from a 2.0 build, but node.js has excellent HTTP support. :)

With regard to developing an official SDK, we're moving in that direction.
I agree that the average NoSQL adopter is also likely the average node.js
experimenter. In fact, thanks to Ron Korving, some thoughts on how to
approach this have already been put up on the wiki:
http://www.couchbase.com/wiki/display/couchbase/Couchbase+node.js+Client+Li
brary

There'd be a few emails between folks which we should move to the mailing
list. I'd be glad to forward those to you if you're interested.

We'd love your help in getting this going. It could be just in reviewing
the API or in getting into code, if you'd like.

Thanks,

Matt


--
Matt Ingenthron
Couchbase, Inc.


chanon

unread,
Mar 19, 2012, 12:58:39 AM3/19/12
to Couchbase
Thanks for the info Matt! Good to hear you're moving towards an
official node sdk. We're gonna try using a memcached driver and see
how it goes.

On Mar 19, 9:29 am, Matt Ingenthron <m...@couchbase.com> wrote:
> Hi Chanon,
>
> First off, there are definitely some people working with existing
> memcached clients for node.js.  You wouldn't be missing much.  There are a
> few advanced operations that wouldn't be available, but 90+% of the common
> stuff will be there.  You wouldn't have a high-level API for accessing the
> views from a 2.0 build, but node.js has excellent HTTP support.  :)
>
> With regard to developing an official SDK, we're moving in that direction.
>  I agree that the average NoSQL adopter is also likely the average node.js
> experimenter.  In fact, thanks to Ron Korving, some thoughts on how to
> approach this have already been put up on the wiki:http://www.couchbase.com/wiki/display/couchbase/Couchbase+node.js+Cli...

Matt Ingenthron

unread,
Mar 19, 2012, 1:09:54 AM3/19/12
to couc...@googlegroups.com
On 3/18/12 9:58 PM, "chanon" <cha...@viquagames.com> wrote:

>Thanks for the info Matt! Good to hear you're moving towards an
>official node sdk. We're gonna try using a memcached driver and see
>how it goes.

No problem. Let us know how it goes and we'll be glad to help out if
needed.

chanon

unread,
Mar 19, 2012, 9:57:04 AM3/19/12
to Couchbase
Hi Matt,

We've successfully setup a 2 instance couchbase cluster and have been
able to get/set to the cluster with https://github.com/elbart/node-memcache

For the next step we want to setup the moxi proxy.

After successfully building moxi (which was a bit confusing as some of
the dependencies listed at https://github.com/membase/moxi were 404s
and also we ran into https://github.com/steveyen/moxi/issues/17) , we
ran it giving it the url to the vbucket in the format:
http://<MEMBASE_SERVER>:8091/pools/default/bucketsStreaming/<BUCKET_NAME>

What happened was we got a one line error saying:
missing conflate

libconflate seemed to build and install correctly, so we aren't sure
what we need to do to fix this. If you have any ideas please let me
know.

BTW, a .deb for moxi installation / or including moxi in the Couchbase
installation would be cool.

chanon

unread,
Mar 19, 2012, 10:04:03 AM3/19/12
to Couchbase
BTW in case anyone else gets this thread in a search result, I found
this link to be very useful in explaining what an official sdk /
vbucket aware client actually does and why moxi is needed/preferred
otherwise:

http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-deployment.html

On Mar 19, 8:57 pm, chanon <cha...@viquagames.com> wrote:
> Hi Matt,
>
> We've successfully setup a 2 instance couchbase cluster and have been
> able to get/set to the cluster with  https://github.com/elbart/node-memcache
>
> For the next step we want to setup the moxi proxy.
>
> After successfully building moxi (which was a bit confusing as some of
> the dependencies listed athttps://github.com/membase/moxiwere 404s
> and also we ran intohttps://github.com/steveyen/moxi/issues/17) , we

Matt Ingenthron

unread,
Mar 19, 2012, 11:33:11 AM3/19/12
to couc...@googlegroups.com
Hi Chanon,

Actually, there is a .deb (and .rpm) for moxi. Check out:
http://www.couchbase.com/downloads-all

Also the server does include moxi. When you set it up to listen on a
particular port in the web console, you're actually configuring a moxi
process per server node. It's (intentionally) pretty transparent to you
and your application. The cluster will set it up and keep it running for
you.

See more about different setup options in the manual here:
http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-deployment.htm
l


Matt

Matt Ingenthron

unread,
Mar 19, 2012, 11:34:09 AM3/19/12
to couc...@googlegroups.com
On 3/19/12 7:04 AM, "chanon" <cha...@viquagames.com> wrote:

>BTW in case anyone else gets this thread in a search result, I found
>this link to be very useful in explaining what an official sdk /
>vbucket aware client actually does and why moxi is needed/preferred
>otherwise:
>
>http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-deployment.ht
>ml

Ah, you found it. :)

Sorry for the noise everyone.

Matt

chanon

unread,
Mar 19, 2012, 12:39:28 PM3/19/12
to Couchbase
Thank you! .. We somehow missed that. Now we should be all set up.

On Mar 19, 10:34 pm, Matt Ingenthron <m...@couchbase.com> wrote:
> On 3/19/12 7:04 AM, "chanon" <cha...@viquagames.com> wrote:
>
> >BTW in case anyone else gets this thread in a search result, I found
> >this link to be very useful in explaining what an official sdk /
> >vbucket aware client actually does and why moxi is needed/preferred
> >otherwise:
>
> >http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-deployme...
Reply all
Reply to author
Forward
0 new messages