Erlang and OTP in Action
RickJWagner writes "Manning has just released a new Erlang title, called Erlang and OTP in Action. For quite some time now, there's been a definitive guide to Erlang-- Joe Armstrong's excellent book Programming Erlang. Well, it's time to make a little extra room on the bookshelf, because the Erlang book-o-sphere has just shifted. There are now two must-have resources for an Erlang programmer." Keep reading for the rest of Rick's review.
Erlang and OTP in Action
author
Martin Logan, Eric Merritt, Richard Carlsson
pages
500
publisher
Manning Publications
rating
9/10
reviewer
Rick J Wagner
ISBN
1933988789
summary
Teaches you to apply Erlang's message passing model for concurrent programming
The book is divided into three sections. The first one deals with the basics of Erlang and details about the OTP application framework. Part two shows how to build a production-worthy application in Erlang. The third part of the book is about integration and tuning.
Section 1 has chapters that cover the following: basics of Erlang and OTP, Erlang language fundamentals, writing a TCP-based RPC server, OTP and the supervisor model, and graphical tools to help your development efforts. Language newbies will spend some time here, as Erlang can be a little odd to programmers coming from non-functional environments. (Concepts like recursion are given great coverage, as it should be.) OTP, the Erlang ubber-framework, is explained in detail as well. Section 1 alone would make a decent book on Erlang, but there is much more here.
Section 2 covers building a production application. The example given is a caching application, designed to increase throughput of a web application. In addition to expected topics like logging and an event-framework, the reader is exposed to Erlang's built-in distributed database, Mnesia. Application packaging and deployment considerations are also covered here.
Chapters in section 2 follow a helpful pattern to guide the reader through building an application. First, there is an introduction to some high level concept. Next, it is shown how this new widget can be used to further the needs of our production-worthy caching application. Finally the authors provide code that brings the desired functionality into the ever growing caching application. Erlang code tends to be somewhat dense-- not much code goes a long way-- so much of the latter part of each chapter is explanatory text explaining why you'd want to implement things in the way the authors did. Chapters in this part of the book read like an in-depth tutorial, and that's not a bad thing.
The third section of the book shows how to integrate with external users via HTTP, how to allow programs written in other languages to communicate with your Erlang code, and how to tune your environment. It's notable that Java gets a whole chapter on integration, through JInterface (in comparison, Joe's book offers about 4 lines on this topic. In fairness, that's a much older book, though.)
Throughout the book, simple illustrations are used to demonstrate key concepts. I found these to be extremely helpful, as Erlang in general is quite different than most programming languages. The delta between Erlang application development and other-language development is an order of magnitude different than something like the difference between Java and Ruby or Python and .Net. It's got different characteristics and different concepts. Given these large differences, I really appreciated the illustrations.
The book covers language built-ins like management tools, profilers, etc. (If you've ever used GNU development tools to profile an application, some of these might look a little familiar). The reader is given a lot to think about, and it's scattered over nearly 400 pages. To make a Java analogy, it's like an all-in-one book that teaches the language, the JDK and tools, JEE, and shows how to integrate your enterprise application with external entities. It's ambitious, but the book does a good job in explaining everything. That's why the impressive page-count helps. A skinnier book probably wouldn't be able to pull all that off.
The book is written with easy-to-understand anecdotes that help the reader grasp the finer points of Erlang craftsmanship. You definitely get the impression the authors have written 'real' code, and they offer strong direction to guide the reader through constructing application code. There is a big difference between understanding language syntax and understanding best practices in application construction. Section 2 in particular is loaded with best practices, and this alone makes this book a worthwhile read for Erlang coders writing production applications.
Probably the best thing I can say about this book is that the authors seem to put the advancement of Erlang above all else. To bolster that statement, I'd point out that they give the reader a list of other Erlang books they may wish to read, and they also include several mentions of Joe Armstrong. (Joe is the author of what has been the most popular Erlang book.) In my opinion, the authors can afford this indulgence, as this book is strong enough to merit inclusion on the Erlang programmer's bookshelf.
So who is this book good for? I'd recommend this book to anyone who wants to program in Erlang. It can get beginners off the ground, and will reveal many best-practices to those who already know their way around Erlang.
You can purchase Erlang and OTP in Action from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Section 1 has chapters that cover the following: basics of Erlang and OTP, Erlang language fundamentals, writing a TCP-based RPC server, OTP and the supervisor model, and graphical tools to help your development efforts. Language newbies will spend some time here, as Erlang can be a little odd to programmers coming from non-functional environments. (Concepts like recursion are given great coverage, as it should be.) OTP, the Erlang ubber-framework, is explained in detail as well. Section 1 alone would make a decent book on Erlang, but there is much more here.
Section 2 covers building a production application. The example given is a caching application, designed to increase throughput of a web application. In addition to expected topics like logging and an event-framework, the reader is exposed to Erlang's built-in distributed database, Mnesia. Application packaging and deployment considerations are also covered here.
Chapters in section 2 follow a helpful pattern to guide the reader through building an application. First, there is an introduction to some high level concept. Next, it is shown how this new widget can be used to further the needs of our production-worthy caching application. Finally the authors provide code that brings the desired functionality into the ever growing caching application. Erlang code tends to be somewhat dense-- not much code goes a long way-- so much of the latter part of each chapter is explanatory text explaining why you'd want to implement things in the way the authors did. Chapters in this part of the book read like an in-depth tutorial, and that's not a bad thing.
The third section of the book shows how to integrate with external users via HTTP, how to allow programs written in other languages to communicate with your Erlang code, and how to tune your environment. It's notable that Java gets a whole chapter on integration, through JInterface (in comparison, Joe's book offers about 4 lines on this topic. In fairness, that's a much older book, though.)
Throughout the book, simple illustrations are used to demonstrate key concepts. I found these to be extremely helpful, as Erlang in general is quite different than most programming languages. The delta between Erlang application development and other-language development is an order of magnitude different than something like the difference between Java and Ruby or Python and .Net. It's got different characteristics and different concepts. Given these large differences, I really appreciated the illustrations.
The book covers language built-ins like management tools, profilers, etc. (If you've ever used GNU development tools to profile an application, some of these might look a little familiar). The reader is given a lot to think about, and it's scattered over nearly 400 pages. To make a Java analogy, it's like an all-in-one book that teaches the language, the JDK and tools, JEE, and shows how to integrate your enterprise application with external entities. It's ambitious, but the book does a good job in explaining everything. That's why the impressive page-count helps. A skinnier book probably wouldn't be able to pull all that off.
The book is written with easy-to-understand anecdotes that help the reader grasp the finer points of Erlang craftsmanship. You definitely get the impression the authors have written 'real' code, and they offer strong direction to guide the reader through constructing application code. There is a big difference between understanding language syntax and understanding best practices in application construction. Section 2 in particular is loaded with best practices, and this alone makes this book a worthwhile read for Erlang coders writing production applications.
Probably the best thing I can say about this book is that the authors seem to put the advancement of Erlang above all else. To bolster that statement, I'd point out that they give the reader a list of other Erlang books they may wish to read, and they also include several mentions of Joe Armstrong. (Joe is the author of what has been the most popular Erlang book.) In my opinion, the authors can afford this indulgence, as this book is strong enough to merit inclusion on the Erlang programmer's bookshelf.
So who is this book good for? I'd recommend this book to anyone who wants to program in Erlang. It can get beginners off the ground, and will reveal many best-practices to those who already know their way around Erlang.
You can purchase Erlang and OTP in Action from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
will just love this book.
Oh, and by the way, "First!"
Please do not read this sig. Thank you.
ahh, fuck it.
I was heavily considering writing a book on Erlang. It's a good thing I didn't. God only knows what the market for Erlang publications would be like if there were THREE books to choose from!
Jeeez... one would think there are much better options for books to review.
it leaked?
But hot damn, after reading this review, I'll buy eight!
I'm interested if the book goes into a lot of detail on Mnesia. Mnesia just seems like databases done right.
... the principle developer of Erlang and the OTP. So you'd expect his name and publications mentioned a few times.
But apparently the Haskell comunity found a programmer that actually care about Haskell just last week, they are now up to 38 people. I quote:
People see words like monads and category theory," Briars continued, swatting invisible flies around his head for emphasis, "and their Giving a Shit gene shuts down...
Everyone needs more programming languages in their life this holiday season, and everyone loves Erlang!
With this book, no one will EVER guess what you gave them, it is truly original.
Pick up your copy today, makes a great stocking stuffer!
He who knows best knows how little he knows. - Thomas Jefferson
I just ordered this a couple days ago. Do the erlang guys know that the language makes complex science calcs a snap on distributed networks? What scientist wants to spend days programming in C when you can do stuff in a few hours instead? They should look into this.
Erlang sucks. C++ and Boost.MPI is better.
...OK just kidding. Erlang's a neat language. C++ is one of those things you wouldn't wish on your worst enemy, although it's occasionally very interesting what people achieve with it. I hope more programmers will throw aside their initial fear and learn how fun (and easy) functional programming really is.
OTP? "One True Pairing?"
i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
That does NOT look like a good cover for a book on computer programming!!!
"Stratigraphically the origin of agriculture and thermonuclear destruction will appear essentially simultaneous" -- Lee
But if you don't want scalable, secure communications using a well established protocol, I guess you wouldn't be interested.
From scarped cliff or quarried stone she cries "A thousand types are gone, I care for nothing, no not one."
...so you can read them concurrently.
Pick up your copy today, makes a great stocking stuffer!
Who's stocking are you putting it into? Bigfoot's?
What with being more up on the activities of fan-fiction authors than the activities of the Erlang world (it's really a fine slicing of 'vaguely aware of' for both), I keep wanting to read "OTP" as "One True Pairing", and wonder who Erlang is supposed to be having an imagined relationship with.
I'm not sure I want to google for the real meaning of OTP in this context. I kinda like the mental images.
egypt urnash minimal art.
Just a warning for anyone thinking of picking up Erlang programming. The Mnesia database is unstable under 10.04 -- so unstable that it loses the entire database every few restarts of an application.
I do not fail; I succeed at finding out what does not work.
Here is the version of this book for people who haven't money http://www.wowebook.com/java/erlang-and-otp-in-action.html
Dont forget "Erlang Programming" http://oreilly.com/catalog/9780596518189/. Its been out for a while