Modeling Java Concurrency Using State Transitions

Solid theory with a practical model for avoiding concurrency problems, sometimes cryptic, somewhat dry material.


Multithreading is deceivingly simple in Java but the ease with which it can be used does not remove its danger. Race conditions and deadlock are difficult to diagnose and repair and often show up long after production releases, at a time when the problem is expensive to fix. In critical applications, it can even cause injury, or worse. "Concurrency: State Models and Java Programs" is about understanding concurrent systems as a set of state transitions which can be modeled in advance to avoid these kinds of problems. It is of particular interest to developers working with highly concurrent systems and, since more of us are working with distributed systems that exhibit the same characteristics, is clearly a powerful and important avenue of investigation.

The book introduces a Finite State Process (FSP) notation that is used throughout the book to explore the implications of different systems. The FSP is clearly specified and documented in the three appendices of the book, and introduced in incremental steps in the body of the chapters. Most of the classic concurrency benchmarks are presented using this notation in the hope that these well understood problems will demonstrate the power of this modeling approach. Their familiarity certainly helped me understand the modeling techniques but may do little for those to whom these examples are encountered for the first time.

I found the visual animation method the authors use confusing in the first part of the book and would have like to see more up front discussion to clarify the objectives. If you suffer the same problem rest assured, it will eventually come together if you just keep on reading. Unfortunately, the nature of this approach is a little dry and the material is not entirely fluid. This is the kind of book you have to read in multiple sittings because it does nothing to pull you into a practical implementation, focussed primarily on the theory and supporting proof.

The net message in this book is compelling. The technique to predict concurrent system behavior is powerful and represents a clear investment in overall project timeline reduction. Like most such techniques, however, the cost must be paid up front and the expectation management is likely to be a bigger challenge in the current software development world. If you work with mission-critical applications, applying these techniques could save you considerable long-term cost, even if it catches only a fraction of the problems. This is an expensive book, but invaluable if reducing the overall cost of concurrent systems development is important to you.