Erlang Programming Book Review
While the Erlang language has been in existence for over 20 years, it has been only recently that it has attained broader recognition thanks to its inherent multicore concurrent programming capabilities. However, there is so much more that the language has to offer, and this book fully enumerates and articulates these exciting advantages. Read on for my review.
I have been curious about Erlang ever since the first dual-core processors hit consumer-end PC's. In my research on how to quickly take advantage of this expanded data processing pipeline, Erlang was a language that kept rising to the surface. However, it wasn't until earlier this year when I attended FlourishConf in Chicago that I saw Erlang demonstrated in action by presenter Martin Logan that I have been captivated by the language ever since. While I initially attempted to learn the language via the various dedicated websites, online documentation resources and screencasts, it wasn't until this book by Erlang expert Francesco Cesarini and co-writer Simon Thompson that I finally was able to wrap my head around the higher language constructs from Erlang Term Storage (ETS) Tables to Open Telecom Platform (OTP) Behaviors. Learning the details of such concepts would be considerably more challenging and time consuming without the thorough explanations and examples provided by the authors.
The book follows the typical computer language tutorial book arc, starting with the basics (background history, case studies, standard syntax and data structures, etc.), working with Erlang sequentially, and then delves into the more sophisticated aspects of what made Erlang so attractive - concurrent programming. This part of the book teaches both the conceptual framework of concurrent programming methodologies as well as how Erlang implements and executes such functionality. Process creation and registration, message passing and more are detailed along with problems associated with concurrency, such as tail recursion, memory leaks, process starvation, race conditions and deadlocks. Process design patterns and error handling are reviewed in Chapters 5 and 6, respectively, followed by chapter on records and macros. Chapter 8, a relatively short chapter, discusses one of Erlang's most impressive features, that is how Erlang programs can be upgraded on the fly without halting existing processes. The second half of the book educates readers with Erlang's higher level constructs such as its functional programming aspects, ETS and Disk Erlang Term Storage (Dets), distributed computing models, OTP behaviors with generic servers, supervisors and children, creating GUI interfaces via the wxErlang/wxWidgets library and network socket programming. Chapter 16 on interfacing Erlang with other languages demonstrates how Erlang can connect with Java, C and Ruby as well as Haskell, Perl, Python. It can also communicate via the ASN, CORBA, ODBC, SNMP and XML protocols. Tracing and debugging via built-in functions (BIF's), dbg tracer, profiling functions, the fun2ms tool and match specifications. The remaining three brief chapters on types and documentation, EUnit and test-driven development and a short yet insightful discussion on coding practice style and efficiency conclude this deep technical reference. Each chapter concludes with exercises that stimulate the reader and reinforce the key discoveries made that respective section.
Honestly, I don't know when I will actually call upon Erlang's power for a project. Most of the work I do these days is accomplished using Java, Python or Ruby. Still, I am glad I took the time to read this book and learn about the potential Erlang may have in a future scenario requiring concurrent, functional programming aspects. While Scala and Clojure have aspects of Erlang's potential, neither match the longevity or proven business uptime scenarios that Erlang has to offer. I found Erlang Programming to be a valuable educational reference, one that I will certainly revisit when demanding uptime and proven distributed systems programming is required.

Title: Erlang Programming
Author: Fracesco Cesarini & Simon Thompson
Publihser: O'Reilly Media
ISBN: 978-0-596-51818-9
Pages: 496
Price: $49.99

