My talk for JavaOne 2009
Writing concurrent programs in the Java programming language is hard, and writing correct concurrent programs is even harder. What should be noted is that the main problem is not concurrency itself but the use of mutable shared state. Reasoning about concurrent updates to, and guarding of, mutable shared state is extremely difficult. It imposes problems such as dealing with race conditions, deadlocks, live locks, thread starvation, and the like.
It might come as a surprise to some people, but there are alternatives to so-called shared-state concurrency (which has been adopted by C, C++, and the Java programming language and become the default industry-standard way of dealing with concurrency problems).
This session discusses the importance of immutability and explores alternative paradigms such as dataflow concurrency, message-passing concurrency, and software transactional memory. It includes a pragmatic discussion of the drawbacks and benefits of each paradigm and, through hands-on examples, shows you how each one, in its own way, can raise the abstraction level and give you a model that is much easier to reason about and use. The presentation also shows you how, by choosing the right abstractions and technologies, you can make hard concurrency problems close to trivial. All discussions are driven by examples using state-of-the-art implementations available for the JVM machine.
Clipping is a handy way to collect important slides you want to go back to later.