Concurrent Programming in Java: Design Principles and Patterns

Concurrent Programming in Java: Design Principles and Patterns by Doug Lea

Concurrent Programming in Java: Design Principles and Patterns

Binding:
Paperback
Number of Pages:
432
ISBN:
0201310090
Product Group:
book
Publisher:
Prentice Hall
Publication Date:
Dec. 7, 1999
BooksForGeeks.com ID:
1300

Concurrent Programming in Java, second edition, surveys a wide field of research in parallelism and concurrency and shows how to do more with multithreading in Java with dozens of patterns and design tips. Written for the advanced Java developer, this book offers a comprehensive tour of leading-edge thinking about parallel coding processes.

Within the dozens of techniques and tips offered here, this book accomplishes at least two goals. First, it shows how concurrency is implemented by default within Java, with material on how built-in features (like the synchronized keyword and its memory model) can be expected to perform when dealing with multiple threads. Naturally, the author also covers Java threads themselves (including priorities, scheduling and the like).

Next, much of this book looks at ways to improve performance of concurrent code beyond the simple default strategies. After defining criteria for measuring concurrent code (such as safety and "liveness", a measure of running live threads effectively), the author presents dozens of techniques for letting threads work together safely. For the working Java programmer, coverage of patterns that have been implemented in downloadable java.concurrency package will be the most immediately useful. (Within this nearly encyclopaedic survey, short code snippets are used for every pattern and concept.) Though theoretically written at times, this book offers plenty of ideas and sample code to get you started thinking of ways to improve multithreaded code.

Impressively comprehensive, Concurrent Programming in Java offers a veritable bible of techniques for doing two things at once with threads in Java. It's a worthwhile guide to the state-of-the-art strategies for improving the performance of your Java threads. --Richard Dragan, Amazon.com

Topics covered: Threads and concurrency in Java, design considerations: safety, liveness and performance, Before/After Patterns, layering, adapters, immutability and synchronisation, deadlock, resource ordering, the Java Memory Model and concurrency, using the java.concurrency package, confinement, refactoring for concurrency, mutexes, read-write locks, recovering from failure, notifications, semaphores, latches, exchanges, transactions, one-way messages, worker threads, polling and event-driven I/O, parallelism techniques: fork/join, computation trees and barriers, Communicating Sequential Processes (CSP).

Reviews for Concurrent Programming in Java: Design Principles and Patterns

  1. Does more to obfuscate the topic than explain it

    Rated 1 out of 5 stars, June 12th, 2004

    I bought this book on the strength of several Amazon reviews, which praised it highly. However, it is easily the worst computer textbook I have ever owned. The author uses overly elaborate diagrams and pitifully few code examples to illustrate concurent programming.

    A sensible approach would have been to outline the typical designs of concurrent applications, and then to have built on that with increasingly sophisticated examples. Instead Lea relies on amazingly cryptic diagrams and descriptions loaded with jargon. I appreciate this is a complex topic, but having done a fair bit of threaded programming with POSIX threads and C, I know it can be explained more clearly.

    In conclusion, this is a poor addition to the otherwise excellent range of Addison Wesley Java books.

    Chris

  2. Waste of time and money

    Rated 1 out of 5 stars, March 12nd, 2001

    I purchased this book as a recommended course text. So far course texts have been readable and good quality however this book is a different matter. Even the simplest issue in the book is tackled in the most long winded way possible. I found myself reading paragraphs over and over again because i just did not understand what it was explaining partly caused by the fact that i had to keep checking the dictionary every 5 minutes as hardly any of the terminology was explained (invariants etc). Ive managed to read 200 pages and i have learnt nothing.
  3. Excellent overview of all multi-tasking flavours

    Rated 5 out of 5 stars, June 12th, 2000

    This book is a must-have for those who need an in-depth introduction to multi-tasking in Java. It explains all standard concepts (thread-safety, lifeness, semaphores, etc . . .) and gives clear examples of the concepts. If I were teaching at university I would recommend this book to my students.
  4. Excellent

    Rated 5 out of 5 stars, February 12nd, 2000

    This book stresses design principles over API teaching - most if it is dedicated to illustrating the issues that arise in multi-threaded systems, and then to presenting design patterns that over come these difficulties.

    It is well written, and the issues raised are illustrated with code snippets (as opposed to complete programs) in Java - no type-and-run listings in this book.

    The emphasis of design over implementation makes it best suited to those who already have a good knowledge of Java and OO design ideas. The threading API is covered very well, but I'd look elsewhere if you are looking for an introduction to it.

  5. Good Solid Information

    Rated 4 out of 5 stars, May 12th, 1999

    This is a good, solid book. I don't understand some of the comments here - although not aimed at people with little programming experience, it is not impenetrable or badly written. It is not an academic textbook, but neither is it an inspirational classic. It's simply a good explanation of many of the issues involved in concurrent programming - the best I have read.

    An experienced Java programmer who has already used and worried about threads could read this in a couple of days and learn a great deal - at least, I certainly did. The emphasis on patterns really helps - this is the first book I have seen that uses patterns as a tool and succeeds. They clarify the argument and let the reader decide whether they want to continue with a particular section or skip over to something more interesting.

    Some of thread programming is difficult and, at least at the moment, there is no way to avoid thinking about the problem - but even in the detailed discussions of the final chapter, concentrating on particular examples, there were useful general comments.

    My only criticisms are: (1) The organisation of the book wasn't as clear as it could be - it wasn't until I had read it from cover to cover that I felt I could find particular items of information. (2) There was little mention of Hoare's CSP/occam and the related Java work done at the University of Kent (I'm not an expert on this, but I found that work very useful and wished it had been discussed here). Amazon doesn't seem to like links from its pages, but I am not connected with these people and think readers here would be interested in this, so please - leave in this pointer: http://www.cs.ukc.ac.uk/projects/ofa/jcsp/ Thanks!

    Incidentally, if you are hoping this is a manual for Doug Lea's respected concurrency package - it isn't. I read the book hoping it would be, but I wasn't disappointed because, once I had finished the book, I found the package (with the online docs) easy to understand. So the book complements (and funds!) the package, but isn't a manual - it's much more useful than that...

Our Network

BooksForGeeks.com is a participant in the Amazon Europe S.à r.l. Associates Programme, an affiliate advertising programme designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.co.uk