Thursday, August 24, 2006

I Can Feel It in the Ether: A Big Erlang Renaissance Is Coming

A few weeks ago, I submitted to digg.com an article I had written comparing web development with Erlang + Yaws to Ruby on Rails. Why? Because it seemed like Ruby on Rails was getting all the buzz, whereas the developer community was overlooking an arguably much more powerful alternative: Erlang + Yaws.



By "more powerful," I don't mean to suggest that Yaws has more web development libraries or that it's as accessible to most web developers as Ruby on Rails.



It isn't.



(Yaws does have many useful APIs -- just not as many as Rails).



I mean "powerful" in the sense that Ericsson has been developing Erlang for 20 years with the goal of creating the ultimate language for powering its distributed, fault-tolerant, massively scalable telephone switches -- the stuff that operates with %99.9999999 (nine nines) availability.



Erlang has delivered.



Yaws is a web server written in pure Erlang, which means that it automatically inhertis the traits that have made Erlang-powered telcom switches so robust. When you're building a webapp with Yaws, you have the full power of Erlang at your fingertips.



The cost? $0.



The source code? Open.



All this stuff struck me as a very appealing package, especially in contrast to the popular array of web development tools (last I checked, nobody was programming commercial phone switches in Python or Ruby :) ) but despite my semi-serious attempt to promote it, my article got only 18 diggs.



Possibly overreacting, I thought that my Digg experience has proven that the larger developer community will probably never be interested in Erlang.



"It's a functional language in a Java dominated world," was my favorite rationalization.



Apparently, I made a mistake by thinking of digg as "the" destination for serious developers. A couple of weeks ago, somebody submitted my Erlang + Yaws vs. Ruby on Rails article was to reddit.com, where it made the front page. Then another article I wrote, Why Erlang Is a Great Language for Concurrent Programming was featured on reddit.com as well.



"Wow," I thought, "it looks like reddit.com is where less mainstream but more interesting programming blogs get real attention."



After these events, I started following reddit.com -- especially programming.reddit.com. I was mostly curious as to what kind of programming languages are featured there.



Today, I had a very pleasant -- almost shocking -- surprise: programming.reddit.com has 6 Erlang-related links, the top of which is also on the front page of reddit.com.



Here they are:



  • 1) New Blog: Joe Armstrong (one of the fathers of Erlang) (armstrongonsoftware.blogspot.com).

  • 3) Secret Weapons for Startups (yarivsblog.com)

  • 5) The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software (gotw.ca)

  • 9) Haskell vs. Erlang (wagerlabs.com)

  • 19) HiPE (High Performance Erlang compiler) presentation (erlang.se).

  • 22) The DIALYZER: a DIscrepancy AnaLYZer for ERlang programs (eg, an Erlang debugger) (ii.uu.se)



This is nothing short of amazing. I've never seen so many links specific to one language on programming.reddit.com -- and Erlang is far from one would call "popular."



Maybe I'm just seeing trends where I'm subconsciously trying to look for them, but maybe this really does indicate real shifts are happening and that developers are starting to recognize that for building scalable, high-available, fault tolerant systems, today's array of popular programming languages are simply nowhere close to where Erlang was 20 years ago.



Interesting times are ahead for Erlang.




Side note: DIALYZER isn't a debugger, but a static analysis tool for finding software defects.

7 comments:

Jeremy Dunck said...

I've never looked at Erlang before, but have been poking around at functional languages due to the coming (more mainstream) importance of concurrency.

In picking a language, my main interest is in the health of the community, the licensing of the software, and the wealth of the libraries. I'm looking at Erlang now because of the features on Reddit. I haven't yet looked at OCaml.

It's good to see constructive discussion of upcoming issues for mainstream acceptance, e.g.

http://www.erlang.org/ml-archive/erlang-questions/200608/threads.html#00255

Will I go with Erlang? I dunno. But I'm looking at it, and am sure others are as well.

Bob Ippolito said...

As amazing as Erlang+Yaws is, it's not at all ready for the same group that Rails targets. Erlang and Yaws is a pain to setup, cumbersome to embed, and the documentation for Yaws and Erlang in general isn't in the same league as the docs for Ruby/Rails.

Honestly, who cares whether a library is in the kernel or stdlib application? It's all rather arbitrary unless you're looking at the source code. From a user's perspective the documentation would be much better if it gave you a flatter list of modules to save a few clicks. Also, for doing web development, Erlang+Yaws would greatly benefit from having better and more accessible text manipulation facilities (more advanced regex support, adding obvious functions to uppercase/lowercase strings to the string module, etc). I'd like to see someone put together a module that puts Erlang text support on par with what Python ships with, at least for byte strings if not for unicode.

That said, I'm use and enjoy Erlang and Yaws (to a much lesser extent, I would have done a web server VERY differently). It's an excellent fit to most of what I'm working on, and it's easy enough to interoperate with the things that aren't a good fit.

nobody said...

Yariv, I think that you most likely single-handedly started that little trend that you're talking about. I was seeing that trend myself, and I'm one of the redditers that you now have looking more closely at Erlang. I use Ruby currently, but I love playing with new languages every so often, although it doesn't generally result in a language choice shift on my part. I've wanted to learn more about functional languages for quite a while. I've played a bit with Ocaml and Scheme, looked at Haskell (syntax put me off), but I continue to look for something that fits my brain the way that Ruby does. Erlang looks like something that I might need to do a little playing with as well... once I think up a project. Keep writing. You're doing an excellent job of bringing some attention to what looks like a very useful language.

Frank said...

+1 with nobody
You're the voice of erlang these days. :D

But be carefull: this is just a reddit trend in my eyes. People are always looking for some interesting blogs about the next cool programming language and now after all that LISP and Ruby and Ruby vs Python and a bit of Haskell stuff Erlang is the current underdog.

In a few weeks reddit might be full of CURL links or s.th.
If you want to create a momentum like ruby has, I think you'd had to create a Rails for Erlang s.th.

Frank said...

hey! why do the comments leave out my line breaks?! is this a typo flaw? somebody fix this

Yariv said...

Bob -- I think Yaws is *much* easier to set up than Rails. If you're using Mnesia, you don't even need to set up a separate database engine. Just read my comparison between Ruby on Rails and Yaws, which started from my frustration with setting up Rails on my MacBook. Yes -- the documentation needs to be better designed.


Nobody -- I initlally liked writing about Erlang because so few people knew about it and I never thought my blog would get all this attention. It's kind of weird. I'm not sure I like all this attention :)


Frank -- it's this damn Rails powered blog engine that removes the line breaks... it needs to be rewritten in Erlang ;) Just kidding -- I love typo! :) Don't worry about the libraries -- they are coming sooner than you think.

Robert Wilkins said...

You live in Boston? Well , I come from Boston!

Hey, if you want to try out a new data crunching programming language, check out the tarball download at my opera blog:

www.my.opera.com/datahelper

It's a free trial download. It's for Linux(with GCC 3.x).

It crunches, manipulates , and transforms data, hence is
somewhat comparable to the SQL SELECT statement, or
SPSS, or SAS/BASE. But it's better than any of them for
nitty gritty data crunching. And it's gonna keep getting better,
because I already have some good ideas for later versions.

I call it Vilno, although it's also called dcrunch, when using it
at the command line.