Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors (Paperback)

Venkat Subramaniam

買這商品的人也買了...

商品描述

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.

商品描述(中文翻譯)

學習並行程式設計對於創建更快、更具回應性的應用程式至關重要,尤其是在當今速度快且價格實惠的多核硬體推動下。您可以利用Java平台來實現這些應用程式。

Java平台上的並行性已經發展,從JDK的同步模型到軟體交易記憶體(STM)和基於角色的並行性。本書是第一本展示所有這些並行性風格的書籍,讓您可以比較並選擇最適合您應用程式的方法。您將學習每個模型的優點,何時以及如何使用它們,以及它們的限制。

通過實踐練習,您將學習如何避免共享可變狀態,以及如何編寫良好、優雅且無需同步的程式,從而創建簡單且安全的並行應用程式。您在本書中學到的技巧將使您從對並行性的恐懼中解脫出來,並掌握並享受它。最重要的是,您可以使用Java或您選擇的JVM語言(如Clojure、JRuby、Groovy或Scala)來利用多核硬體的不斷增強的能力。

如果您是Java程式設計師,您需要JDK 1.5或更新版本以及Akka 1.0程式庫。此外,如果您使用Scala、Clojure、Groovy或JRuby進行程式設計,您需要最新版本的所選語言。Groovy程式設計師還需要GPars程式庫。