Java Concurrency in Practice by Brian Goetz, Tim Peierls, Joseph Bowbeer, et all
Post by:Book Review Team
Author/s : Brian Goetz, Tim Peierls, Joseph Bowbeer, David Holmes, Joshua Bloch, Doug Lea
Publisher : Addison-Wesley
Category :Advanced Java Review by : Lasse Koskela
Rating : 9 horseshoes
I've been doing most of my recent consulting in technology companies building systems that deal with concurrency, which is part of the reason why this book ended up on my desk -- I wanted to upgrade my know-how on the new concurrency features in Java 5 and a brand new book from recognized authors in the field sounded like a great source of information beyond the javadocs. And it is.
I'd almost call this the current bible on Java concurrency. At less than 400 pages it's relatively compact and still manages to properly cover a lot of ground. The text is easy to understand and avoids "difficult" words better than Doug Lea's "Concurrent Programming in Java", although it's been a couple of years since I read Lea's earlier book.
What I really like about the book is the thorough discussion on not just the API but also on the underlying theory. In other words, you're not just reading about the new synchronizer objects, thread factories or the executor architecture -- you're also getting the low-down on a lot of what's happening inside the JVM.
This, on the other hand, also makes the book somewhat less approachable as it might be if the authors would just give you the "tutorial". I did have hard time figuring out some sections on the first time around but I can't say it was because of the authors' writing. In any case, definitely not a course book for Java Programming 101.
It was a positive surprise to see the authors dedicating a chapter for testing multithreaded code. I would've wanted to read more on the topic, but the material in this one chapter is already a huge help in helping the reader to understand some important differences between unit testing the logic and the concurrent behavior of Java code.
I'm giving a big thumbs-up for "Java Concurrency in Practice". Besides the couple of pages in my copy having print quality problems (the copy we have at the office doesn't, so it's probably a one-off case), I don't have much negative things to say about this book. If you're looking for an advanced title on concurrency programming in Java, you won't go wrong with this one.
Category :Advanced Java Review by : Ulf Dittmer
Rating : 8 horseshoes
Java has had multi-threading capabilities from the beginning, but with the arrival of multi-core and multi-processor CPUs on desktops everywhere, and the broad range of new concurrency features in Java 5, there are no excuses any more not to take advantage of multithreading. Getting it right can be tricky, though, and that's where this book comes in.
It explains not just the features of the Java virtual machine and the class libraries that help implement concurrent applications, but also serves as an introduction to the problems arising in multi-threaded code in general. That can range from the small -how to share a class variable between threads - to the large - how to structure applications to take advantage of concurrency. More specialized chapters deal with threading in GUIs (important for Swing developers), how to maximize performance while retaining thread safety, and how to test concurrent code.
All concepts are explained with plenty of code examples that show what is and what isn't thread-safe. If several ways to solve a concurrency problem exist, their functional and performance differences are investigated, and -where possible- quantified. Engineering consists of tradeoffs everywhere, and this book makes clear how those between functionality, performance and thread safety can usefully be made.
Everyone not having had the benefit of CS 401 "Issues in Concurrency" will get a lot out of this book. And those who did will learn how to properly implement concurrent applications in Java.
Wow. So many examples! I love books that really SHOW me what's going on.
This was my first *real* in depth look at threads. When I first got this book, I said, "wow, kindof a smallish book for a big deal subject...." I assure you: there's a ton of material packed into this book. I can bet that everyone could benefit from the concentrated knowledge in this text.
I mainly got through the first section of the book, the fundamentals. There's talk about easy-ish stuff like definitions and use of volatile and synchronized keywords, and a way more in depth description of what happens in the JVM and why. I will be reading this whole section over again because it's a whole lot to wrap my head around.
I really enjoyed picking at the code examples and using the snippets to work through what was going on. This was really helpful in helping me understand the concepts.
The only (minor) downfall is the book goes like a steamtrain through the material. Because of this, I wouldn't recommend this book to anyone without a very good understanding of core Java, and at least some foundational knowledge of threads and threadsafety.
The other sections of the book look at design, performance, testing, and advanced topics. This is a book that will remain in my collection and be used time and time again.