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

Comments
I think you've made the right call, Damien. Java is so much more enterprisey, you'll get all the IBM customers switched over to CouchDb in no time: 5, 6 years tops.
I for one welcome our new corporate ant overlords...
Anonymous, April 1, 2008 9:35 AM
Very good :)
Ben Poole, April 1, 2008 9:39 AM
And I'm guessing Eclipse is your window to Java love?
-- troy
Troy, April 1, 2008 9:50 AM
Fantastic news!! I've always thought this whole erlang idea was a mistake for what is essentially an enterprise app. I mean it's probably ok for phone switches, but this isn't the same kind of thing is it?
Really looking forward to seeing the code. Any thoughts on moving the version control to ClearCase?
Kerr, April 1, 2008 10:00 AM
Hhm,
I thought Erlang.0 was almost complete. You really should consider, since it will run on the Zero engine anyway if JavaScript wouldn't be the better choice. But I guess the move to Java was needed for the Domino integration I talked about here: http://www.wissel.net/blog/d6plinks/SHWL-7DA9KG
:-) stw
Stephan H. Wissel, April 1, 2008 10:55 AM
Wow, think of all the Design Patterns you'll need to use now! I'll get out my GOF book and make sure you have 'em all!
Don't even get me started on XML config files! If CouchDB suffers from anything, it's XML deficiency. Java'll cure that!
Dan Sickles, April 1, 2008 10:58 AM
I assume you're also planning to bundle a J2EE runtime? The servlet model is obviously a perfect for couchdb.
James Snell, April 1, 2008 10:58 AM
I didn't understand CouchDB at all before, but now I get that documents are beans. This is great news.
partdavid, April 1, 2008 11:53 AM
Ahaha, very amusing, Damien. I was curious to see your April fool's. :)
Antonio Cangiano, April 1, 2008 11:55 AM
Happy fools day!
Tobbe, April 1, 2008 11:58 AM
Congratulations, it's a hard decision but in the long term it can work.
Have you considered EJB Entity Beans? I think they are really enterprisey... And .NET?
Diego Parrilla, April 1, 2008 12:01 PM
"One major problem with Erlang is a general lack of libraries."
...
"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."
Ha!
cjh, April 1, 2008 12:08 PM
"But the code completion in Java is so damn nice it really makes it easy to produce gobs of code quickly."
That's good because when you choose Java as your language, you're going to need gobs more code to accomplish anything than if you used a more flexible tool.
JS, April 1, 2008 12:39 PM
So, less than 10 X easily 100 = about 1,000 developers have seen successful Java projects! Nice to know.
Fernando, April 1, 2008 12:42 PM
http://tinyurl.com/39rsry
Michael Campbell, April 1, 2008 1:31 PM
If 10x more developers know Java, then Java is clearly the best platform for building a highly concurrent non-blocking database.
Now that CouchDB will be rewritten in Java, it will be significantly cheaper to outsource development over seas.
This is a new era for CouchDB.
Robin, April 1, 2008 1:39 PM
Very nice. I'll admit that you had me fooled there for a minute. I think it's the utter lack of pranks around my office today.
Only 1,000 Java developers have had successful projects + the rewrite should be done in a couple of months. I'm rofl. You had me there for a little bit :). One figure should be higher and one should probably be lower ;).
Patrick Farrell, April 1, 2008 1:46 PM
When you're done, could you go help mozilla.org rewrite Firefox on Eclipse?
Dan Sickles, April 1, 2008 1:47 PM
I always wondered -- what is the point in April Fool jokes when everybody gets them immediately? ;)
Berislav Lopac, April 1, 2008 2:54 PM
Why not use an existing low level database like BerkeleyDB that just provides persistents, threadsafe BTrees and HashTables ? To build a higher level database like couchdb ?
Olivier Lauzanne, April 1, 2008 3:03 PM
An alternative is to make april fool's jokes earlier(March 28 joke) or later to avoid them to be caught so quickly. :)
Bairos, April 1, 2008 5:53 PM
wuhuu...
everyone talk about enterprise here :P
I guess it's just another april fool
bayuadji, April 1, 2008 11:22 PM
Congratulation! You had me fooled! Great joke!
Ash, April 1, 2008 11:58 PM
That was not funny.
I got really scared there for a moment. Probably because I first read it today on the 2.
Søren Hilmer, April 2, 2008 2:26 AM
You always get me.
Nick Mudge, April 2, 2008 2:49 AM
I'd like to hear what you really think about this post.
Nick Mudge, April 2, 2008 2:54 AM
GAA! I bought this one hook line and sinker, and was writing bitchy email about it...
...then I remembered what day it was.
Great one, man!
HarryC, April 2, 2008 7:47 AM
You really got me ;-)
It's a wonderful (second-reading) post :-))))
PatternStorm, April 7, 2008 2:07 PM
This is where April Fools jokes go bad. I'm reading this over a week past April Fools, and almost cried, just to realize the date it was written.
So is CouchDB staying Erlang?
Cortland Klein, April 9, 2008 9:23 PM
Todays the 21st of April, and my heart almost stopped beating....until I read the comments...
trshant, April 21, 2008 12:48 PM
Pfffffffffffffft. I was knocked over when I read this then got around to noticing the publish date. Beats being rickrolled...
Dunderballs McBonghit, May 1, 2008 3:11 AM
I was close to having a heart attack... The firsts comments really sucks, even more than Java...
José Manuel Peña, May 16, 2008 2:14 AM
Post a comment