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


or
Sign in to turn on 1-Click ordering.
Trade in Yours
For a £7.77 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Colour:
Image not available

 
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.

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

Venkat Subramaniam
5.0 out of 5 stars  See all reviews (1 customer review)
RRP: £26.99
Price: £22.99 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £4.00 (15%)
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 4 left in stock (more on the way).
Dispatched from and sold by Amazon. Gift-wrap available.
Want delivery by Tuesday, 28 May? Choose Express delivery at checkout. See Details

Formats

Amazon Price New from Used from
Kindle Edition £19.54  
Paperback £22.99  
Amazon.co.uk Trade-In Store
Did you know you can trade in your old books for an Amazon.co.uk Gift Card to spend on the things you want? Visit the Books Trade-In Store for more details. Learn more.

Book Description

2 Sep 2011 193435676X 978-1934356760 1

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 Performance (Java (Addison-Wesley)) + Java Concurrency in Practice
Price For All Three: £84.59

Buy the selected items together


Product details

  • Paperback: 280 pages
  • Publisher: Pragmatic Bookshelf; 1 edition (2 Sep 2011)
  • Language: English
  • ISBN-10: 193435676X
  • ISBN-13: 978-1934356760
  • Product Dimensions: 18.1 x 2.7 x 22.9 cm
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (1 customer review)
  • Amazon Bestsellers Rank: 341,141 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, and more.

Product Description

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.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

4 star
0
3 star
0
2 star
0
1 star
0
5.0 out of 5 stars
5.0 out of 5 stars
Most Helpful Customer Reviews
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 Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 3.9 out of 5 stars  10 reviews
14 of 15 people found the following review helpful
4.0 out of 5 stars An important work on a challenging topic 31 Aug 2011
By Brian Tarbox - Published on Amazon.com
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.
11 of 15 people found the following review helpful
3.0 out of 5 stars Skimpy 25 Oct 2011
By Steven Barnes - Published on Amazon.com
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.
4 of 5 people found the following review helpful
5.0 out of 5 stars Example-driven approach to concurrency on the JVM (with Java, Scala, Clojure, Groovy and JRuby) 1 Mar 2012
By Jacek Laskowski - Published on Amazon.com
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.
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


Look for similar items by category


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges