Saturday, July 2, 2011
Book Review for "Oracle JRockit The Definitive Guide"
Have you ever worked with someone who knew a lot about the JVM? I did once, and it was an eye opening experience. Not only was this guy the right person to go to for performance and GC questions, he also was confident he'd written his programs for optimal performance. I was so impressed I decided this must be one of the characteristics of a superior programmer, and decided I'd try to improve myself in this regard.
I've just finished "Oracle JRocket The Definitive Guide" and I think this book has helped me on my journey to Java mastery. The early chapters are a little deep for an application programmer, but they still make for interesting reading. (Just how deep? How about discussions of the assembly code generated for your Java source? The very lowest levels of the JVM are discussed.)
After the lowest level workings of the JVM are covered, we encounter some material that's more likely to be of use to the average Java coder. We start learning about memory management, including in-depth coverage of garbage collection. (This is sure to be of use to any serious Java developer.) Java constructs of interest like Soft References, Phantom References, etc. are discussed. IMHO, these are topics that are beyond basic Java-- another tool in your Java toolkit!
There's a whole chapter on threading and synchronization. Once again, treading ground beyond that occupied by Java programmers at the basic level. Here you'll encounter topics like thin and fat locks, spin locks, and the innards of how threading is implemented on a JVM. If you're starting to get the feel this book is partly about computer science, not just programming, I'd think you may be right.
There's a lot of material related to understanding how the JVM is working. (This includes benchmarking, profiling, and understanding the running JVM.) It goes without saying this is all of high value to any Java programmer.
The final chapters of the book are devoted to the tools associated with JRockit. JRockit comes with a bunch of handy tools to help you monitor and control your JVM. These chapters show you all the slick GUI features and low-level switches you can use now that you understand what the JVM is up to.
Final impressions? This is an interesting book, because it's written hardest-materials-first. If you can hang with the early chapters you stand a lot to gain.
Who is this book good for? Any Java programmer will benefit from the early chapters. (They aren't specific to JRockit.) The latter chapters will be of use only to JRockit users, but since it's now freely available under a user friendly license, these tools are available to everyone.
It's a big book-- well over 500 pages, and none of it is fluff. I liked this book, it can be found here.