Sebastian Cohnen

my tech-related blog

Migrating Riak From 0.14.2 to 1.2

Last week I helped migrating a small Riak production cluster from 0.14.2 to 1.2. I’d like to share the experiences regarding the preparation and testing of the process.


Upgrading straight from 0.14.2 to 1.2 is possible if you are willing to take an additional risk. And, as always, you should be very cautions about your steps. When in doubt, ask the guys on the ML, or do the detour via 1.1.4.

NoSQL: Not Only a Fairy Tale (Video)

It took some time, but the first videos of the NoSQL Matters 2012 Cologne are online. Timos and my talk is under these first videos! Unfortunalty the audio quality is not ideal, but still okay. Have fun!

NoSQL: Not Only a Fairy Tale

At this year’s NoSQL Matters conference in Cologne, which was also the first one of its kind, I held a talk together with Timo Derstappen about the evolution of adcloud’s adserver. We took the audience on a journey spanning multiple years of changing requirements and the resulting architectural decisions made during that time. A focus was on NoSQL databases involved in the adserver, of course :)

How to Find Periodic Effects on Performance Using Autocorrelation

For one of my clients I’m doing performance assessments on a quite regular basis. For adcloud, performance is a primary key to success. To give you a little background: adcloud’s adserver system is serving thousands of requests per second — only with a couple of application servers. And since customers don’t like slow loading ads on their pages, latency besides raw throughput is a fundamental criteria defining the service’s quality.

We basically run extensive load tests with different scenarios all the time to ensure that a new feature or even a small improvement does not compromise the stability and quality of the system — especially under load. Functional correctness is covered by unit and integration tests, but non-functional aspects like throughput and latency are a bit harder to measure and to deliver. How exactly the setup looks like, which I created to help adcloud to run automated, distributed load tests, will be the topic of another post. For this article I’d like to outline an idea I have had in mind for quite some time now and which has been proven to work at least once.

Ruby Is Magic!

As you might have been noticed already Dirk and I started First it was just a quick idea to give a talk at cologne.rb – the local Ruby User Group here in Cologne. We talked about the seven types of closures in Ruby and we good quite positiv feedback right after the talk. So we decided to make the show a regular one at colognerb. We will take a closer look stuff you see everyday using Ruby, like closures.

For every presentation at colognerb we’ll post an article, the slides and code. Additionally we’ll add some articles in between on subjects that are related to the shows topics.

We hope you have fun reading the first episodes post about Closures in Ruby.

Native List Functions With CouchDB

Show and List Functions are used to transform single documents (show) and multiple documents e.g. from a view (list) into anything you want: JSON, HTML lists, SVG graphs…

You might know that you can write CouchDB Views in Erlang. But you can also write Show and List functions in Erlang as well. Today I played a bit around with a list function I’ve implemented in JavaScript first. I wanted to know, how much faster a native version would be and I wanted to write some Erlang too. I’ve not done any extensive benchmarking, just simple queries, but the difference is quite significant. Writing Erlang – if you aren’t used to it – might be an obstacle though.

Fixing Problems With Iconv and Ruby 1.9.x (Rvm)

Today I had some weird issues with various gems complaining about missing iconv and readline. Here is how I fixed it: Installing the libs via rvm package install, switched to the system ruby (not sure if this is really necessary), remove ruby 1.9.2 (important!) and reinstall it. Before installing the rvm packages I removed any previous trace of them by rm -rf ~/.rvm/usr.

I hope that might be handy for anyone having issues with that too.

Fix iconv in ruby1.9.2 ( download
#!/usr/bin/env bash
rm -rf ~/.rvm/usr
rvm package install iconv
rvm package install readline
rvm package install zlib
rvm package install autoconf
rvm use system
rvm remove 1.9.2
rvm install 1.9.2 --with-iconv-dir=$rvm_path/usr \
                  --with-readline-dir=$rvm_path/usr \
                  --with-zlib-dir=$rvm_path/usr \
rvm --default 1.9.2
rvm wrapper 1.9.2 textmate