Who needs Oracle/Mysql when you have Mnesia, a free, distributed, in memory database ? The ability to store native Erlang structures out of the box is so liberating: suddenly the need for your object-database mapping layer almost vanishes (well, not 100% to be fairly honest, but a big chunk of it: no need to create a 1-to-n relationship or a n-to-n relationship and a mapping table in many simple cases)Even pragmatic programmers like it...
Not to mention that Mnesia supports table replication and is fully distributed, with the ability to add new 'nodes' on the fly. All of this out of the box ! (did I mention it was free too ?) This makes scaling up almost a joke. Compare this to the usual nightmares (and cost) of trying to implement a distributed Mysql/Oracle...
We just introduced the ability to have live review sessions for PowerPoint slides. You basically see other people currently reviewing the same presentation, you can leave real time notes and also have to ability to send quick IM messages. Think about what really happens in the background for a second. Because all of this is real time, every user is constantly going to the server asking "is there any new note/IM message to display" ? Now, we decided to go with a simple polling approach (== no Comet). This means we have to handle a lot of tiny requests/responses. This would be almost suicidal in any other language (or you would need to start adding plenty of servers to support any decent number of users). But not quite so in Erlang since the language was designed for this type of workload... It just scales beautifully (and yes, we still need to add extra servers as well to handle a large load, but just not as many...)
This book presents Erlang and functional programming in the familiar Pragmatic style. And, it's written by Joe Armstrong, one of the creators of Erlang.Mnesia, written *in* Erlang, for Erlang, is a testiment in itself to the benefits of building distributed systems in that language.
It includes lots of example code you'll be able to build upon. In addition, the book contains the full source code for two interesting applications:
- A SHOUTcast server which you can use to stream music to every computer in your house, and
- a full-text indexing and search engine that can index gigabytes of data and run either on a single computer or collaboratively on a parallel network. The indexing engine is specially written to illustrate how to maximize throughput on a multi-core CPU.