Product Details
Concurrent Programming in Java: Design Principles and Patterns

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

List Price: £40.99
Price: £22.64 & eligible for FREE Super Saver Delivery. Details

Availability: Usually dispatched within 24 hours
Dispatched from and sold by Amazon.co.uk

29 new or used available from £20.00

Average customer review:

Product Description

  • One of Java's most powerful capabilities is its built-in support for concurrent programming, a design technique in which multiple concurrent activities-threads take place inside a single Java program. Thread programming enables developers to design applications that are more responsive to user demands, faster, and more easily controlled.
  • This book offers comprehensive coverage of this vital aspect of the Java language. The book is completely up-to-date with the new thread model that is now incorporated into the most recent version of the Java Virtual Machine. All Java programmers interested in doing concurrent programming must understand these new concepts. The book approaches the topic from a design pattern point of view. It introduces and summarizes Java's concurrency support, shows readers how to initiate, control, and coordinate concurrent activities, and offers numerous recipe-like techniques for designing and implementing Java structures that solve common concurrent programming challenges. Specifically, the book presents important strategies for avoiding the inconsistencies that can crop up in multi-threaded programs, addresses the concept of "liveness"-how to ensure that all threads in use are kept active simultaneously, examines state-dependent action, and demonstrates effective methods for handling user requests in a multi-threaded environment.


Product Details

  • Amazon Sales Rank: #124404 in Books
  • Published on: 1999-12-07
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 432 pages

Editorial Reviews

Amazon.co.uk Review
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).

From the Back Cover

In this second edition, you will find thoroughly updated coverage of the Javao 2 platform and new or expanded coverage of:

  • Memory model
  • Cancellation
  • Portable parallel programming
  • Utility classes for concurrency control

The Java platform provides a broad and powerful set of APIs, tools, and technologies. One of its most powerful capabilities is the built-in support for threads. This makes concurrent programming an attractive yet challenging option for programmers using the Java programming language.

This book shows readers how to use the Java platform's threading model more precisely by helping them to understand the patterns and tradeoffs associated with concurrent programming.

You will learn how to initiate, control, and coordinate concurrent activities using the class java.lang.Thread, the keywords synchronized and volatile, and the methods wait, notify, and notifyAll. In addition, you will find detailed coverage of all aspects of concurrent programming, including such topics as confinement and synchronization, deadlocks and conflicts, state-dependent action control, asynchronous message passing and control flow, coordinated interaction, and structuring web-based and computational services.

The book targets intermediate to advanced programmers interested in mastering the complexities of concurrent programming. Taking a design pattern approach, the book offers standard design techniques for creating and implementing components that solve common concurrent programming challenges. The numerous code examples throughout help clarify the subtleties of the concurrent programming concepts discussed.



0201310090B04062001

About the Author

Doug Lea is one of the foremost experts on object-oriented technology and software reuse. He has been doing collaborative research with Sun Labs for more than five years. Lea is Professor of Computer Science at SUNY Oswego, Co-director of the Software Engineering Lab at the New York Center for Advanced Technology in Computer Applications, and Adjunct Professor of Electrical and Computer Engineering at Syracuse University. In addition, he co-authored the book, Object-Oriented System Development (Addison-Wesley, 1993). He received his B.A., M.A., and Ph.D. from the University of New Hampshire.




Customer Reviews

Excellent5
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.

Good Solid Information4
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...

Not light bedtime reading4
I have both Doug Lea's "Concurrent Programming in Java" and Oaks and Wong's "Java Threads". Doug Lea's book is by far the most comprehensive. The book focuses strongly on applied uses of locking mechanisms and covers a great deal of the theoretical basis of monitor-based locking schemes. The book is not easy reading though -- it is extremely dense. It has applicability outside of the Java programming environment and I recommend it to you if you are interested in the theoretical side of concurrent programming. Oaks and Wong's book is far less academic. It is an extremely easy read. Notwithstanding the fact that it is 250 pages, it can easily be read (and understood) in an afternoon. Their approach is much more practical and focuses on Java's support for concurrent programming. If you need to dive into multi-thread programming in Java then I heartily recommend this book to you as it will get you started quicker than Doug Lea's book. If your interest is in concurrent programming in general or if you are using a different language, then Doug Lea's is probably the more suitable.