The review is for the Beta version of "Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors" as of March 23, 2011 which I generously received from the publisher.
The book "Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors" focuses on three concurrency models - java.util.concurrent API, STM and actor-based concurrency model - to handle (or rather avoid) troubles with shared mutable, isolated mutable and purely immutable state. As the author points out in the Preface (page 10) "In this book, we'll take an example-driven approach to learn the three models" and he sticks to it. The example-driven approach is mostly based upon Java and Scala with two dedicated chapters for the other JVM languages - Clojure, Groovy and JRuby. You'll find enough to get up to speed with Akka/Multiverse and very few words about GPars.
The author makes it crystal clear that he's "written this book for experienced Java programmers who are interested in learning how to manage and make use of concurrency on the JVM, using languages like Java, Clojure, Groovy, JRuby and Scala" (page 10). You won't find an explanation between multithreaded and concurrent application. You won't find the book very in-depth into concurrency either. The book's, however, sufficient to let you be aware of concurrency issues and how to tackle or, better, avoid them.
While I was reading the Preface I set out the reading plan for the book that assumed to have started off with the chapters 1-3 and have jumped right into Clojure's STM (the chapters 6-7) which I was the most interested in. The whole plan felt down right after the chapter 2 when I found out I'd been better off following along the book order. It paid off very well. The vivid, lively and often humorous writing style invites for further reading and has an extraordinary hypnotic quality. Chances are a chapter or two will not suffice for a single uninterrupted reading session. Many complete yet succinct examples don't let you get bored, and the languages as well as the intensive introduction to Akka set my mind racing all the time. The book flattens the learning curve of concurrency on the JVM substantially.
No idiomatic code, no introduction to any of the languages, no unnecessary import statements in the code listings, just a bare minimum for a topic at hand. The book's very informative, succinct and concise. Recommendations for effective concurrent applications are everywhere. The book's fully packed with them. The figures, the surprisingly large number of examples are all in the book to lend a helping hand. If that'd not been enough, the book provides eye-opening examples from real life and book references. Learning by examples is constantly utilized. Very handy examples; no clutter, just code that's necessary to get the point across. People who're not accustomed with Clojure, Scala, Groovy or JRuby may find the examples a bit uneasy and suffer a great pain wondering if nothing's missed. There're some language terms that are not explained yet extensively used or referred to (to me Scala's trait was the most mysterious term which I had a vague understanding of).
The respective language chapters - the chapters 7 and 9 - follow the same scheme to explain a topic, so reading their sections one by one will quickly reveal the similarity and may turn out a bit boring or even annoying. The author did make it clear in the opening section when he wrote "Focus on the sections related to the languages you're interested in, and feel free to skip the others." (page 152).
You can gain proficiency in Java concurrency quickly, perhaps too quickly for some. People who need elaborative, almost academic treatment of the topic will not find much in here. If your goal's to hone in on concurrency with code samples, the book will make it quick and easy. Be careful, though, as the examples are often quite intensive on using a language and anonymous, inner classes, generics and traits are the norm.
As a side-effect, I learnt that "Groovy is not thrilled to see" package objects in Scala, learnt about JRuby's wrapping exceptions into NativeException or importing Scala's package classes woes in Java. I'm encouraged to give Scala a serious try, too.
The book gradually develop a reasonable level of competence in concurrency on the JVM. It's so vigilant to ensure necessary details are all in one place easily found and comprehensible. Sufficiently in-depth to build a confidence in designing highly concurrent applications or tackling concurrency issues.
It's not uncommon to find one or two ending sections as a sort of summary for the entire chapter. The Recap's are often too short and with the previous summary-like sections seems unnecessary, but quite a few can also be used as a single-page, one-stop reference to be printed out and hang on the wall.
I enjoyed a great deal of excellent technical writing. The book brought more knowledge than I could digest upon a single reading. It's very language-rich and therefore mind-twisting's incurred. Rest assured you'll find plenty of useful information to introduce in your code right away.
Opt to read the book and it will reward you with a couple of ready-to-apply advices to set out a smooth sail to the world of concurrency on the JVM. To put it simply, I love it and will surely get back to it often.