Skip to main content

Book review -- Programming Erlang Software for a Concurrent World

Gary Pollice, Professor of Practice, Worcester Polytechnic Institute
Author photo
Gary Pollice is a professor of practice at Worcester Polytechnic Institute, in Worcester, MA. He teaches software engineering, design, testing, and other computer science courses, and also directs student projects. Before entering the academic world, he spent more than thirty-five years developing various kinds of software, from business applications to compilers and tools. His last industry job was with IBM Rational Software, where he was known as "the RUP Curmudgeon" and was also a member of the original Rational Suite team. He is the primary author of Software Development for Small Teams: A RUP-Centric Approach, published by Addison-Wesley in 2004. He holds a B.A. in mathematics and an M.S. in computer science.

Summary:  from The Rational Edge: Read how Joe Armstrong's new book on programming in the Erlang language is a valuable resource for coders looking to solve concurrency issues. This content is part of the The Rational Edge.

Date:  15 Dec 2007
Level:  Introductory
Activity:  381 views

book cover Programming Erlang Software for a Concurrent World
by Joe Armstrong
The Pragmatic Programmers, 2007
ISBN 19343560X

Erlang is a functional programming language and runtime system that was designed at the Ericsson Computer Science Laboratory. It was designed especially for building fault-tolerant, real-time systems that can be deployed across a network. Erlang is designed to support concurrency naturally and easily. Erlang is now available as an open source system that runs on most computing platforms.

Joe Armstrong has written an excellent book on programming Erlang. The book is suitable for everyone from novices in functional languages to those who have experience with Erlang and want to improve their skills. This is not a reference manual, but a book to learn how to program using Erlang.

Armstrong organizes the book into twenty moderate-sized chapters and six appendices. The book seems shorter than its 515 pages. This is a tribute to Armstrong's easily readable writing style. I found myself taking a few minutes and reading a chapter or two just for the enjoyment. The best way to enjoy the book is to write some Erlang code as you go.

The first section of the book, chapters 1-6, presents the fundamental concepts of programming sequential programs in Erlang. The meat of this section is in chapters 2-6. The first chapter is really a preface. The second chapter tells you how to obtain and install the open source version of Erlang and make sure that it's working on your platform. If you have never programmed using a functional language, you should read the first six chapters carefully. If you're comfortable with functional languages you can easily scan these chapters and start with chapter 7.

Chapter 7 is, according to Armstrong, a "nontechnical chapter." He offers a short, five-page, introduction to concurrency. Two technical chapters follow that describe how to do concurrent programming in Erlang. Chapter 8 shows how to create processes, send messages between them, and so on. These are the basic operations you will need to master before moving ahead. Chapter 9 contains a detailed discussion of how to handle errors in concurrent programs.

Once you are comfortable with concurrency you're ready to take the next step -- distributed programming. These are programs that run on networks and require message passing. Chapter 10 is a short chapter that gives you the tools you need to write distributed programs in Erlang. Erlang has some special requirements, such as the "magic cookie" that allows two Erlang programs to communicate. When you finish this chapter, you're ready to become a distributed programming master.

Several of the next chapters stand by themselves. For example, chapter 11 describes an IRC program. Other chapters focus on specific topics such as working with files, sockets, and so on. Chapter 17 describes Mnesia, a database management system that supports replicated databases and is built into Erlang. Although Armstrong says that Mnesia queries look a lot like SQL, he omits the fact that the similarity only becomes apparent after you've become quite good with Erlang.

The final two chapters focus on programming multicore computers. This is the area that first caught my attention. These chapters give you some guidelines and examples that will help you write high-performance programs for multicore programs.

The six appendices cover an array of topics. If you're going to write Erlang programs, read Appendix A before you start. The title of the appendix is Documenting Our Program, but it's really a chapter on how to write readable code and follow established guidelines. The other appendices provide reference material and an extended example.

If you've tried functional programming and been turned off by it for any reason, you might want to give Erlang a look. If you're wondering how to master concurrency and distributed applications, you will find some great material in a very readable form. I highly recommend this book to all programmers. You will learn something from it.


Resources

About the author

Author photo

Gary Pollice is a professor of practice at Worcester Polytechnic Institute, in Worcester, MA. He teaches software engineering, design, testing, and other computer science courses, and also directs student projects. Before entering the academic world, he spent more than thirty-five years developing various kinds of software, from business applications to compilers and tools. His last industry job was with IBM Rational Software, where he was known as "the RUP Curmudgeon" and was also a member of the original Rational Suite team. He is the primary author of Software Development for Small Teams: A RUP-Centric Approach, published by Addison-Wesley in 2004. He holds a B.A. in mathematics and an M.S. in computer science.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=277351
ArticleTitle=Book review -- Programming Erlang Software for a Concurrent World
publish-date=12152007
author1-email=gpollice@cs.wpi.edu
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers