Learn how to write truly concurrent programs—programs that run on dozens or even hundreds of local and remote processors. See how to write high reliability applications—even in the face of network and hardware failure—using the Erlang programming language.
Programming Erlang: Software for a Concurrent World
by Joe Armstrong
by Joe Armstrong
- This has a new edition! The second edition of Programming Erlang is now available in beta.
About this Title
Release: P5.0 (2011-02-03)
Moore’s Law is the observation that the amount you can do on a single chip doubles every two years. Historically, Moore’s Law has delivered ever faster computing power to more and more demanding audiences. But Moore’s Law is about to break down—there’s a limit to how many interconnections you can create on a chip. Rather than producing faster and faster processors, companies such as Intel and AMD are instead producing multi-core devices: single chips containing two, four, or even more processors. That’s great, but only if your software can take advantage of that extra power. If your programs aren’t concurrent, they’ll only run on a single processor at a time. Your users will think that your code is slow.
Erlang is a programming language designed for building highly parallel, distributed, fault-tolerant systems. It has been used commercially for many years to build massive fault-tolerant systems which run for years with minimal failures.
Erlang programs run seamlessly on multi-core computers. This means your Erlang program should run 4 times faster on a 4 core processor than on a single core processsor, all without you having having to change a line of code.
Erlang combines ideas from the world of functional programming with techniques for building fault-tolerant systems to make a powerful language for building the massively parallel networked applications of the future.
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.
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.
Erlang is a language used by people in-the-know (just like Ruby was a few years ago). It solves one of the most pressing problems facing developerstoday: how to write reliable, concurrent, high-performance systems. Invest in learning Erlang now.
Contents & Extracts
- Table of Contents
- Getting Started (extract)
- Sequential Programming
- Advanced Sequential Programming
- Compiling and Running your Program
- Concurrent Programming (extract)
- Errors in Concurrent Programs
- Distributed Programming
- IRC Lite
- Interfacing Techniques
- Programming With Files
- Programming With Sockets
- Ets and Dets—Large Data Storage Mechanisms
- Introduction to OTP
- MNesia: The Erlang Database
- Advanced OTP
- Programming Multi-core CPUS
- Documenting Our Program
- Erlang on Microsoft Windows
- A Socket Application
- Module and Function Reference
In his search to find better ways to implement fault-tolerant applications, Joe Armstrong designed and implemented the first version of Erlang in 1986. He wrote the first Erlang book and held the first Erlang course—he has worked with Erlang from the very beginning. He has taught Erlang to hundreds of programmers and held countless lectures and keynotes describing the technology.
Joe has a PhD in computer science from the Royal Institute of Technology in Stockholm, Sweden and is an expert in the construction of fault tolerant systems. Joe was the chief software architect of the project which produced the Erlang OTP system. He has worked as an entrepreneur in one of the first Erlang startups (Bluetail) and has worked for 30 years in industry and research.
Joe currently works for Ericsson AB where Erlang is used to build highly-fault tolerant switching systems.