A Comfortable Couch

Thursday, September 09, 2004

I'm choosing Erlang

Erlang so far seems to be a great fit for Couch. It seems like it will support all of my design goals and save me lots of development time compared to Java or C++.

However, there are some reasons why I don't wholeheartedly want to use it:
  1. Everything must speak Erlang.
  2. Nobody knows Erlang.
  3. Tool support sucks.
Reason 1 isn't strictly true, as Erlang can use plain TCP sockets. But to get the full benefit all communication endpoints should be running Erlang code or C code that uses the Erlang C Node library. However, I can't think of a good reason why this is a problem for the initial implementation. I can see this being a problem in future implementations, where others will want to write tools that interface with the system. But I'm guilty of premature optimization; that's a problem I don't have yet, I hope to have it. I need to focus on the goals of the project and validating its ideas.

Reason 2 is a problem when I need other coders to help me, which I will probably need eventually. But maybe Paul Graham is right, using an esoteric language like Erlang will attract the best kind of people to my project, while using a language like Java will mostly broaden my horizons to mediocre developers. That theory is controversial, but I think there may be some truth in it.

Reason 3, tool support sucks compared to Java, C++, even Python. However, I really can't complain about the tool support for a language that by itself will give me most of the server and networking infrastructure for free. I like the idea of Java and C++ because I have tons of IDEs, profilers, debuggers, libraries etc. But I'll still have to write a ton of code to get the same high performance server infrastructure that I get for free in Erlang, and that's more code to develop test and debug.

Which brings me to a final reason, a reason so dumb I didn't include it in the list: I want to write all that server infrastructure. I understand that stuff and its fun. Writing that infrastructure I'd feel like I knew what I was doing and that I was making progress for long stretches of the project. But instead using Erlang takes me out of my comfort zone; I'm using a weird, declarative language and I'm getting tons of new stuff that I don't quite understand yet. Oh the horrors! Of course logically I know it's dumb to build it myself, I'm not increasing the projects value by writing a new high performance server infrastructure, especially when I can get one for free. But emotionally I'm giving up the comfortable part of the project.

So, Erlang it is. Unless anyone can point out the flaws in my reasoning.


Anonymous said...

Hey Damien,

very interesting read...cool to follow you along ;-)

Re: Everything must speak Erlang:
Not sure if thats really true, as you could provide language binding wrappers. For example, there are already Python/Erlang interfaces available (http://starship.python.net/crew/gandalf/PyErlang/)
Worst case, provide API libraries in each native language like C, Java, etc. and have them all talk to your Erlang nodes via raw TCP sockets.

Re: Nobody knows Erlang:
Erlang discussion forums most likely much more quality and less noise and trolls than similar forums for more tranditional languages, so the "pool" is not bigger, but much deeper, so to speak.

Tool support sucks.
Stop complaining and build your own. Building tools is fun, too! Keep in mind that most if not all Iris tools for Notes where done from scratch, too. So get that eclipse plugin fixed and off ya go.

Thomas Gumz

11:34 PMlink  
Damien said...

My resolve is strengthing. Thanks Thomas!

9:54 AMlink  

Post a Comment

<< Home