CouchDB Language Change
April Fools! We aren't switching to Java. Erlang has been a great choice for CouchDB. It is badass and we love it, so step off and watch out. Erlang is like a million ninjas ready to explode.
So, after a lot of heated discussion internally, I'm somewhat sad to say that Erlang will not be used in future releases of CouchDB. We are switching the whole codebase to (...drumroll..) Java.
Now while I say I am somewhat sad, but that doesn't mean I oppose this, not at all. I like Erlang, it's approach to software concurrency and reliability is brilliant. It's found a programming model that just works and built it's whole environment optimized around supporting that model.
But the truth is you can integrate most of that into existing environments if you design your software properly. Programming is programming, whatever your language can compute, mine can compute too. This naturally means the details of a language aren't nearly as relevant as the community and number of libraries available.
As Christopher Lenz points out here, Apache is dominated by Java projects. Having CouchDB be an Erlang based project at Apache just doesn't make sense. The more things at Apache that are Java, the better they can interoperate.
Noah Slater, another project contributor, started to fork the project, partially out of dissatisfaction with Erlang.
At IBM, all the internal groups I've been talking with all are using Java for core development. The Erlang codebase of CouchDB is a constant obstacle to reusing their code, and vice-versa.
One major problem with Erlang is a general lack of libraries. Erlang lacks OO programming support, where the main focus is code reuse. Without OO you can't build software like Lego bricks, mixing and matching and swapping out the parts freely. This is a big reason why there aren't as many Erlang libraries as Java libraries, without OO it's just harder to make software reusable.
But perhaps the biggest problem with Erlang is the relative lack of Erlang developers. Developers in the US who've worked on a successful Erlang project probably number less than 10. But the number of developers who've worked on a successful Java project are easily 100X that amount. With a much wider talent pool to work from the quality of the contributions should increase dramatically.
So I've seen the writing on the wall. Erlang was great for a single developer working alone, but it's more important that CouchDB be able to take contributions from more developers with more backgrounds. Database internals aren't rocket science, it's simply a bunch of algorithmic transformations and actions combined to store and report on data with certain reliability and performance guarantees. On modern PC hardware, this stuff is a breeze. And now with Java it will get even easier for people to contribute to it.
I've already started rewriting the core in Java. Unfortunately finding libraries to support the indexing and storage features I need don't exist or have serious design shortcomings, so I'm writing most of that from scratch again. But the code completion in Java is so damn nice it really makes it easy to produce gobs of code quickly. With the amount of code I'm writing right now this thing will be done in a few months tops.
Posted April 1, 2008 9:09 AM