Skip to content Skip to sidebar Skip to footer

Couchbase Mixed With Memcached, Loss Of Most Couchdb Philosophies And Functionality?

As of now, the only way i have worked with newer versions of CouchBase, is through a memcached Client. I use Erlang as the programming language and so i had grabbed myself an Erlan

Solution 1:

There's a big difference between CouchDB and Couchbase, if I'm right Couchbase use CouchDB to store the data but do not offer/present the views and others nice functionality of CouchDB.

I went through the different API (ruby, php) from the Couchbase website and the Couchbase server documentation and I didn't find anything about view or map-reduce. see doc: http://www.couchbase.com/docs/couchbase-manual-1.8.pdf

Couchbase looks more like a memcache server with a persistence layer powered by CouchDB, and maybe it does not fit your needs. The data that you can store within can be anything from int to something serialize such as JSON, but in this case you have to unserialize it on all ends.

Why are you using Couchbase instead of CouchDB? I do not have experience of the older Couchbase versions but I know that these name, even if they are quite similar refer to different applications and maybe it do worth looking further if it's really the one you are thinking about.

Edit Interesting link: http://damienkatz.net/2012/01/the_future_of_couchdb.html read the comments as well, lot of interesting stuff within.

From the comment I understand that Damien Katz is now working on this new project called Couchbase but it's not CouchDB's last version but just another NoSQL database.

So if you were used to CouchDB you could just use the last version of CouchDB. Or if you want to consider switching to Couchbase, look at the features, roadmap for 2.0, etc. and investigate if it does really fit your needs.

Solution 2:

The relationship between Couchbase and CouchDB is covered in detail here: http://www.couchbase.com/couchdb

In short, Couchbase is aimed at the main NoSQL use-case: big data that must be available for end-user interaction. Things like session storage for ad-targeting, game data storage for fast growing social games. Or anywhere user demands can grow unexpectedly.

Couchbase is horizontally scalable, CouchDB is not. To get the scalability and speed Couchbase offers, we've hat to cut back some of the features people like in CouchDB. It's a different set of tradeoffs, but the common denominator is the JSON and the map reduce index model.

Solution 3:

With respect to Cyprien, your question does have a real answer besides "don't use Couchbase."

Memcache allows many more data types than CouchDB. Specifically, you can Memcache an empty string, the string "{", the string "0", or the string "{}". Only the last one is a valid JSON object that you can use as a CouchDB document. AFAIK the way that Couchbase works is that if a string that you SET or ADD is the JSON representation of a valid CouchDB document, it stores it as a CouchDB document, otherwise it stores it as an attachment. [zIt's a design decision that I don't agree with (they could have just inserted a $value key into the CouchDB document) but it kind of makes sense given that you could be passing very large objects, actual attachments, over the protocol interface.] Regardless, the "$att_reason": "invalid_json" is your hint that this is happening.

The upcoming version of Couchbase, 2.0, now in developer preview, exposes almost all of the CouchDB functionality, except for Couch Apps (which are irrelevant if you're using Erlang anyways). So if you want to use that, you'll want to pass JSON of objects over the Memcache interface, but note that then you lose Memcache's atomic shortcuts (you'd need to do a compare-and-swap, which requires an extra network hop).

Post a Comment for "Couchbase Mixed With Memcached, Loss Of Most Couchdb Philosophies And Functionality?"