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 Erlang Memcached Client. I noticed that this client serialises and de-serialises erlang terms (both Key and Value) by converting them from and to binary using erlang:term_to_binary/1 and erlang:binary_to_term/1
when sending and receiving data from memcached.
While setting up CouchBase, we are asked to choose either memcached buckets or CouchBase buckets (vbuckets). Now, i chose CouchBase (because i needed persistence). I started interacting with the setup using the erlang memcached client and it is okay, i save erlang terms and get back erlang terms from the database. However, the problems begin here:
1. Because of data serialization, objects are received as attachments.Even if sent as JSON From Erlang, they are sent as binary data which makes no meaning to CouchBase (or Memcached ?)
{ "_id": "mykey", "_rev": "1-000010fb1a2b02ef0000000d59960000", "$flags": 38489, "$expiration": 0, "$att_reason": "invalid_json", "_attachments": { "value": { "content_type": "application/content-stream", "revpos": 2, "digest": "md5-n3mJhf2kKVQtkIunIbCJZQ==", "length": 13, "stub": true } } }
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With