Programming Concurrency on the JVM and over one million other books are available for Amazon Kindle. Learn more



or
Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $3.55 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Start reading Programming Concurrency on the JVM on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors [Paperback]

Venkat Subramaniam
3.9 out of 5 stars  See all reviews (10 customer reviews)

List Price: $35.00
Price: $23.54 & FREE Shipping on orders over $25. Details
You Save: $11.46 (33%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 6 left in stock (more on the way).
Ships from and sold by Amazon.com. Gift-wrap available.
Want it Tuesday, May 21? Choose One-Day Shipping at checkout. Details

Formats

Amazon Price New from Used from
Kindle Edition $16.50  
Paperback $23.54  
Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

September 2, 2011

More than ever, learning to program concurrency is critical to creating faster, responsive applications. Speedy and affordable multicore hardware is driving the demand for high-performing applications, and you can leverage the Java platform to bring these applications to life.

Concurrency on the Java platform has evolved, from the synchronization model of JDK to software transactional memory (STM) and actor-based concurrency. This book is the first to show you all these concurrency styles so you can compare and choose what works best for your applications. You'll learn the benefits of each of these models, when and how to use them, and what their limitations are.

Through hands-on exercises, you'll learn how to avoid shared mutable state and how to write good, elegant, explicit synchronization-free programs so you can create easy and safe concurrent applications. The techniques you learn in this book will take you from dreading concurrency to mastering and enjoying it. Best of all, you can work with Java or a JVM language of your choice - Clojure, JRuby, Groovy, or Scala - to reap the growing power of multicore hardware.

If you are a Java programmer, you'd need JDK 1.5 or later and the Akka 1.0 library. In addition, if you program in Scala, Clojure, Groovy or JRuby you'd need the latest version of your preferred language. Groovy programmers will also need GPars.


Frequently Bought Together

Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors + Java Concurrency in Practice + Java Performance
Price for all three: $103.41

Buy the selected items together
  • Java Concurrency in Practice $37.86
  • Java Performance $42.01


Editorial Reviews

About the Author

Dr. Venkat Subramaniam is an award-winning author, founder of Agile Developer, Inc., and an adjunct faculty at the University of Houston. He has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia, and is a regularly-invited speaker at several international conferences.


Product Details

  • Paperback: 280 pages
  • Publisher: Pragmatic Bookshelf; 1 edition (September 2, 2011)
  • Language: English
  • ISBN-10: 193435676X
  • ISBN-13: 978-1934356760
  • Product Dimensions: 7.1 x 1.1 x 9 inches
  • Shipping Weight: 1.3 pounds (View shipping rates and policies)
  • Average Customer Review: 3.9 out of 5 stars  See all reviews (10 customer reviews)
  • Amazon Best Sellers Rank: #406,270 in Books (See Top 100 in Books)

More About the Author

Dr. Venkat Subramaniam, founder of Agile Developer, Inc., has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia. Venkat helps his clients effectively apply and succeed with agile practices on their software projects. He is a frequent invited speaker at international software conferences and user groups. He's author of .NET Gotchas (O'Reilly), coauthor of the 2007 Jolt Productivity award-winning book Practices of an Agile Developer (Pragmatic Bookshelf),
and author of Programming Groovy (Pragmatic Bookshelf).

Customer Reviews

Most Helpful Customer Reviews
14 of 15 people found the following review helpful
4.0 out of 5 stars An important work on a challenging topic August 31, 2011
Format:Paperback
This book should be considered part of a two book series along with Venkat's 2009 book "Programming Scala: Tackle Multi-core Complexity on the JVM". The earlier book was a relatively short (250 pages versus 852 pages for Oderski's Scala book), perhaps too short, overview of Scala. It's 12 chapters skip over lots of the details in Oderski's 18 chapter book, and contains only a single chapter on Concurrent Programming.

By comparison the new book is all about Concurrent Programming models and attempts to be agnostic about the JVM language to be used. Most examples are first given in Java, then a simpler way is shown to do it in Scala, and then often a short section saying how the example could be done in Ruby.

The book describes the difficulties of concurrent programming in JVM languages especially given the rise of multi-core processors. It then describes three "solutions": the naďve Java approach, Software Transactional Memory and Actors. It should be noted that the Actors chapter is based on Akka, so if you don't care for Akka you may not like this book.

The Power and Perils of Concurrency - This should be an unsurprising recap of well known problems; if you're reading this book you will almost certainly have run into the problems listed here already.
Strategies for Concurrency - Talks about ways to divide problems into parts that can be computed independently

Modern Java/JDK Concurrency - This talks in detail about the changes made to the Java libraries to better support concurrency, specifically things like using ExecutorService rather than "new Thread()" and using Lock vs. synchronized. Interestingly though the chapter fails to discuss the little known but serious differences between synchronized blocks and methods involving fairness and barging.

Taming Shared Mutability - This chapter begins to offer the Scala kool-aid of mutability is bad. Reading this chapter is made easier if you've already read Goetz's "Programming Concurrency".

Software Transactional Memory - This chapter talks about Clojure's STM model and how to use it in Java via Akka. Its an interesting chapter but one that will feel odd if you're a programmer also coming to terms with non-relational databases. As databases move away from the transitional transactional model here comes STM bringing transactions to mutable variables.

Actor-based Concurrency - Actors are basically a message passing schema where immutable messages are passed between lightweight actors (thread-like). Just as you can use thread pools to reduce the cost of threads there are what amount to actor pools which lighten their cost. It does require some rethinking to embrace the actor approach.

Overall this is a fine book that brings quite a lot to the table. My only reservation would be that if you are a seasoned Java programmer you might take the first four sections as a given and jump right to the Actors approach. And if you're not a seasoned Java programmer you probably don't realize how badly you need this book.
Comment | 
Was this review helpful to you?
11 of 15 people found the following review helpful
3.0 out of 5 stars Skimpy October 25, 2011
Format:Paperback|Amazon Verified Purchase
I am a veteran Java programmer, looking to move into Scala, using Akka actors. As "Actors in Scala" wasn't released yet, this looked like the best choice. Unfotunately, the "language neutral" aspect of the book will probably satisfy no one. Too much space is used to repeat the same concepts, but in different languages. Particularly annoying was a section on actors, in which a problem is first implemented in Java, then Scala; then we are shown the use of Typed Actors (which are conceptually very similar to untyped actors) to implement the same problem, again in both Java and Scala (making that 4 detailed implementations and explanations of the same problem, instead of highlights of the important differences). This like a freshman padding out his term paper.

I was hoping for a book that would go into deep concepts related to actors and STM. This is more of an introduction to modern JVM concurrency idioms, with a few variations on the usual highly simplified programming examples one can find on web blogs, such as the obligatory bank account implementation.

Still, there were some interesting bits of theoretical background which I did not know, such as the formula for determining the number of threads to use in an application based on how compute-bound the tasks are.
Was this review helpful to you?
4 of 5 people found the following review helpful
Format:Paperback
The review is for the Beta version of "Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors" as of March 23, 2011 which I generously received from the publisher.

The book "Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors" focuses on three concurrency models - java.util.concurrent API, STM and actor-based concurrency model - to handle (or rather avoid) troubles with shared mutable, isolated mutable and purely immutable state. As the author points out in the Preface (page 10) "In this book, we'll take an example-driven approach to learn the three models" and he sticks to it. The example-driven approach is mostly based upon Java and Scala with two dedicated chapters for the other JVM languages - Clojure, Groovy and JRuby. You'll find enough to get up to speed with Akka/Multiverse and very few words about GPars.

The author makes it crystal clear that he's "written this book for experienced Java programmers who are interested in learning how to manage and make use of concurrency on the JVM, using languages like Java, Clojure, Groovy, JRuby and Scala" (page 10). You won't find an explanation between multithreaded and concurrent application. You won't find the book very in-depth into concurrency either. The book's, however, sufficient to let you be aware of concurrency issues and how to tackle or, better, avoid them.

While I was reading the Preface I set out the reading plan for the book that assumed to have started off with the chapters 1-3 and have jumped right into Clojure's STM (the chapters 6-7) which I was the most interested in. The whole plan felt down right after the chapter 2 when I found out I'd been better off following along the book order. It paid off very well. The vivid, lively and often humorous writing style invites for further reading and has an extraordinary hypnotic quality. Chances are a chapter or two will not suffice for a single uninterrupted reading session. Many complete yet succinct examples don't let you get bored, and the languages as well as the intensive introduction to Akka set my mind racing all the time. The book flattens the learning curve of concurrency on the JVM substantially.

No idiomatic code, no introduction to any of the languages, no unnecessary import statements in the code listings, just a bare minimum for a topic at hand. The book's very informative, succinct and concise. Recommendations for effective concurrent applications are everywhere. The book's fully packed with them. The figures, the surprisingly large number of examples are all in the book to lend a helping hand. If that'd not been enough, the book provides eye-opening examples from real life and book references. Learning by examples is constantly utilized. Very handy examples; no clutter, just code that's necessary to get the point across. People who're not accustomed with Clojure, Scala, Groovy or JRuby may find the examples a bit uneasy and suffer a great pain wondering if nothing's missed. There're some language terms that are not explained yet extensively used or referred to (to me Scala's trait was the most mysterious term which I had a vague understanding of).

The respective language chapters - the chapters 7 and 9 - follow the same scheme to explain a topic, so reading their sections one by one will quickly reveal the similarity and may turn out a bit boring or even annoying. The author did make it clear in the opening section when he wrote "Focus on the sections related to the languages you're interested in, and feel free to skip the others." (page 152).

You can gain proficiency in Java concurrency quickly, perhaps too quickly for some. People who need elaborative, almost academic treatment of the topic will not find much in here. If your goal's to hone in on concurrency with code samples, the book will make it quick and easy. Be careful, though, as the examples are often quite intensive on using a language and anonymous, inner classes, generics and traits are the norm.

As a side-effect, I learnt that "Groovy is not thrilled to see" package objects in Scala, learnt about JRuby's wrapping exceptions into NativeException or importing Scala's package classes woes in Java. I'm encouraged to give Scala a serious try, too.

The book gradually develop a reasonable level of competence in concurrency on the JVM. It's so vigilant to ensure necessary details are all in one place easily found and comprehensible. Sufficiently in-depth to build a confidence in designing highly concurrent applications or tackling concurrency issues.

It's not uncommon to find one or two ending sections as a sort of summary for the entire chapter. The Recap's are often too short and with the previous summary-like sections seems unnecessary, but quite a few can also be used as a single-page, one-stop reference to be printed out and hang on the wall.

I enjoyed a great deal of excellent technical writing. The book brought more knowledge than I could digest upon a single reading. It's very language-rich and therefore mind-twisting's incurred. Rest assured you'll find plenty of useful information to introduce in your code right away.

Opt to read the book and it will reward you with a couple of ready-to-apply advices to set out a smooth sail to the world of concurrency on the JVM. To put it simply, I love it and will surely get back to it often.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
1.0 out of 5 stars Very light weight
This provides text is a lightweight look into Java concurrency. This may be appropriate for part of an introductory undergraduate course on concurrency, however, this text... Read more
Published 2 months ago by Frustrated
5.0 out of 5 stars JVM programming is not only about the threads and synchronization -...
Concurrency programming is hard. Concurrency programming in Java is even harder. There are some wonderful books that address concurrency programming in Java like "Java Concurrency... Read more
Published 2 months ago by vrto
4.0 out of 5 stars Good pedagogy
This book is remarkably well written - as a teaching book. Subramaniam addresses difficult topics and makes them understandable through the use of clear prose, useful... Read more
Published 3 months ago by Rick Goff
3.0 out of 5 stars Impression pretty poor
I could not read the book to the end, so maybe it has some useful information which I missed. But first impression is pretty poor. The style is verbose and vague. Read more
Published 8 months ago by Dimitri K
5.0 out of 5 stars Extremely good book, very clear handling of complex subject
I can highly recommend this book. It takes a more modern view of concurrency than Java Concurrency in Practice, being 6 years later. Read more
Published 15 months ago by D. Fancellu
4.0 out of 5 stars Gives solid basics
The book provides a good introduction into the modern approaches for implementing concurrency in Java. It is easy to read. Read more
Published 17 months ago by Andriy Palamarchuk
5.0 out of 5 stars Learning about new concurrency programming models
Original review written by Andrea Chiodoni, JUG Lugano, www.juglugano.ch

Honestly speaking I don't consider myself an expert concurrent programming developer. Read more
Published 18 months ago by JUG Lugano
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 



So You'd Like to...


Create a guide


Look for Similar Items by Category