Thursday, 26 July 2012

CouchBase: SIMPLE

So, yesterday we had the CouchBase guys in the office, I think it was some kind of retaliatory strike to me having brought in the MongoDB guys a few weeks prior.

In the interest of being able to form a balanced view I thought I'd test out the "SIMPLE" part of the CouchBase "SIMPLE, FAST, ELASTIC" tag line by downloading, installing, creating and query some data. I like simple so this looks like it was made for me.

It takes me only a minute or so to update the version of MongoDB I run on my Ubuntu servers; it is very simple, but I've done it few times, so some of the ease of update is simply down to practice. This isn't really going to be a 100% fair and direct comparison if I'm completely honest. However, for the purposes of comparison we can use a quick guide to downloading, installing, creating and query some data. All the information you need is on one, simple page.

Download: 27 seconds
Unzip package: 4 seconds
Create data directory: 9 seconds
Start server: 19 seconds
Start shell: 16 seconds
Create a document: 16 seconds
Query collection: 8 seconds

Total time: About 2 minutes.

Download: 2 minutes, 31 seconds
Install: (via the Wizard) 2 minutes 52 seconds + 3 minutes (Had to run this a seconds time as I was shown a 1618 error saying install was already in progress, which it wasn't. Also, after the wizard said it had finished the install there was no CouchBase directory in the default location and a browser didn't pop up pointing to the Admin UI, as per the install guide)

Configure server: 1 minute. I wasn't sure how much RAM I should be dedicating to CouchBase, nor was I completely sure which bucket type I should be choosing. The other niggly things with the install were the fact I had to complete the product registration before I could complete the configuration.

I'm not sure what it's doing here tbh...

Start shell: No time recorded. I couldn't see a quick start, simple, single guide anywhere. I had to google "couchbase quick start guide" which initially took me to a page where I could request quotes around pricing and duration. Gave up after 10 minutes. Looks like I may have to do this via the Admin UI.

Insert data: No time recorded. As I couldn't find how to connect to the server via a shell, I hunted around and found this posting; it looks simple. I couldn't find the 'Document button' that was being referred to though. I hunted around for another 15-20 minutes until I got frustrated and bored. I gave up.

Total time: DNQ

I'm afraid CouchBase has failed my definition of simple. Maybe they use a different dictionary, or maybe I'm just too simple. If anyone can point me towards a one-pager, simple, 101, 'get started quickly guide', then I'd appreciate it.

Let's give it another. So many people are using this that this must be a one off. So, I uninstall and restart my box. Then install afresh. I continue through the default settings. This time when I get to the Console I am met with this...

Not only can I not create a Document, I can barely use the Admin UI because of the modal alert that keeps popping up... FFS!

To get over this I do the following:
cd %COUCHBASE_HOME%\Server\bin
Edit the script service_register.bat
Replace NS_NAME=ns_1@%IP_ADDR% with the

Final effort. I uninstalled yet again and downloaded the latest version 2.0.0-dev-preview-4 and ran through the install process. Everything came unstuck when the wizard hit the 'Computing space requirements'; we basically hung at this stage. I wasn't able to cancel the install, so I had to kill the process. I tried once more and one last time - same result. There is a saying, 'If at first you don't succeed, try once more and give up.

UPDATE: 2012 Olympic Opening Day
$sudo dpkg -i couchbase-server-community_x86_64_2.0.0-1495-rel.deb

dependency error

$sudo apt-get install libssl0.9.8
$sudo dpkg -i couchbase-server-community_x86_64_2.0.0-1495-rel.deb

Now I can hit the Admin UI. I tap up
We're getting there; I want to install some samples; I chose the beer sample, no surprise really. I was thrown back an error.

I hit next again and it said the sample was already installed. OK. So I unseleted the sample and hit next again. Success. So, semi-SIMPLE, it took less than 5 minutes; all I had to do was be careful about my choice of OS and grab the very latest build (-;

Thanks to Frank Weigel who pointed me at the latest build.

Initial thoughts are:
  1. it's weird not having the shell and doing everything via a web UI
  2. from the brief look at the beer sample, it looks to my uneducated eye that we are defining the functions by_key_value, by_location and brewery_beers in an almost utility helper class document.

Now may the time to go and find some 101 documentation (-;


  1. But the have cool BBQs - don't you want to be in their community? You don't really need to query your data do you?

  2. Sorry to hear you didn't find the getting up and running experience super easy! 2.0-DP4 is a tad old. we started releasing "nightly" dev builds. You can find them on the "Download All" page ( as "2.0 Recent Builds". Don't have it for Windows yet, but try this one on your Ubuntu box: Now has sample DB include which you can select in the wizard, so you get some data and views to play around with out-the-box.

    Oh and the video on the download page ( has a quick summary of stepping you through the setup wizard (BTW any registration is optional).

    Of course try making a cluster as well!

    Good feedback on the lack of shell. There are some early experiments around a shell here: let us know whether you think such a shell would be something you'd like.

    1. Thanks for the tips.

      CB must be moving at a rate of knots if a developer preview release is considered an old version (-; It finally sunk in, the 3rd or 4th time I tried to install that I didn't need to fill the registration...

      I use a bunch of Windows boxes for my local dev/prototyping environment and linux in prod. It's easy to get the Windows boxes as they are just lying around the place.
      The really reason for using Windows in dev is I want it to be accessible to other members of not only our team, but anyone else looking to kick the tyres of NoSQL.
      There is something in being able install and configure something alien to you in less than 5 minutes; I've seen people get quite excited about it; in a geeky way.
      What I've noticed though, is that not everyone is comfortable away from Windows - it's just a fact I'm afraid - some folks were brought up on Windows even though they curse it daily will not ove away from it.
      I'm happy for them to jump on those boxes and get a feel for installing their own instance, play with replicasets, sharding et al.
      I've never seen anyeone - with zero guidance - get up and running in longer than 10 mins. A one-pager, quick start is ideal here. They are inserting data in moments, creating indexes minutes later and map/reducing by the end of the day.
      So what I'm getting at it, if I don't have a Windows version I can install, then I'm going to need steal a bunch of linux boxes for dev/proto env and lose out on seeing folk gain some satisfaction from installing their own multi-machine NoSQL instance.

      As far as the shell goes. Yes please.