Channels ▼

Mike Riley

Dr. Dobb's Bloggers

Erlang Programming Book Review

September 21, 2009

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

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video