09 May 2007
Erlang For The Practical Man
Table of contents:
1: General overview
3: Fighting with POP3 / SSL
4: Serving the thing through HTTP
5: Putting the pieces together
6: Conlusions
This article is my submission for the Erlang blogging contest. You can also grab it as a PDF file - in a4 format or in letter format.
Functional programming languages are often underestimated, as they seem to be not suited for the “real world”, being thought of as designed by scientists who spend their time mainly developing theories, not practical software. What makes Erlang stand out from the crowd is the fact it was designed by the industry and for the industry. Ericsson, where the language originated, has a telecom switch with more than 2 million lines of Erlang code running it that has a downtime of a few minutes per year - now this is reliability!
Telecom switches don’t make programmers too excited those days through, so we will try to do something more related to your everyday hacking. In this tutorial I will show you how to write a standalone daemon, that checks your email every x minutes, and makes the results available as an RSS feed. If you want to centralize all your notifications around RSS this may even be useful a bit and even if not, at least it makes a good example of some of Erlang strengths. I try to explain everything in as much detail as possible, but be warned - we won’t be writing any “hello worlds” here, we will just rapidly introduce a lot of awkward stuff as it becomes necessary, so if you don’t have a solid programming background you may have serious trouble. Either way, you will probably want to consult Programming Erlang and the free, official Erlang docs if you want to do anything serious in Erlang. Also see my previous post for an overview of general high level Erlang concepts.