Mastering Concurrency Programming with Java 8(Paperback)
暫譯: 精通 Java 8 並發程式設計(平裝本)

Javier Fernandez Gonzalez

  • 出版商: Packt Publishing
  • 出版日期: 2016-02-29
  • 售價: $2,420
  • 貴賓價: 9.5$2,299
  • 語言: 英文
  • 頁數: 430
  • 裝訂: Paperback
  • ISBN: 1785886126
  • ISBN-13: 9781785886126
  • 相關分類: Java 程式語言
  • 海外代購書籍(需單獨結帳)

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

商品描述

Master the principles and techniques of multithreaded programming with the Java 8 Concurrency API

About This Book

  • Implement concurrent applications using the Java 8 Concurrency API and its new components
  • Improve the performance of your applications or process more data at the same time, taking advantage of all of your resources.
  • Construct real-world examples related to machine learning, data mining, image processing, and client/server environments

Who This Book Is For

If you are a competent Java developer with a good understanding of concurrency but have no knowledge of how to effectively implement concurrent programs or use streams to make processes more efficient, then this book is for you.

What You Will Learn

  • Design concurrent applications by converting a sequential algorithm into a concurrent one
  • Discover how to avoid all the possible problems you can get in concurrent algorithms
  • Use the Executor framework to manage concurrent tasks without creating threads
  • Extend and modify Executors to adapt their behavior to your needs
  • Solve problems using the divide and conquer technique and the Fork/Join framework
  • Process massive data sets with parallel streams and Map/Reduce implementation
  • Control data-race conditions using concurrent data structures and synchronization mechanisms
  • Test and monitor concurrent applications

In Detail

Concurrency programming allows several large tasks to be divided into smaller sub-tasks, which are further processed as individual tasks that run in parallel. All the sub-tasks are combined together once the required results are achieved; they are then merged to get the final output. The whole process is very complex. This process goes from the design of concurrent algorithms to the testing phase where concurrent applications need extra attention. Java includes a comprehensive API with a lot of ready-to-use components to implement powerful concurrency applications in an easy way, but with a high flexibility to adapt these components to your needs.

The book starts with a full description of design principles of concurrent applications and how to parallelize a sequential algorithm. We'll show you how to use all the components of the Java Concurrency API from basics to the most advanced techniques to implement them in powerful concurrency applications in Java.

You will be using real-world examples of complex algorithms related to machine learning, data mining, natural language processing, image processing in client / server environments. Next, you will learn how to use the most important components of the Java 8 Concurrency API: the Executor framework to execute multiple tasks in your applications, the phaser class to implement concurrent tasks divided into phases, and the Fork/Join framework to implement concurrent tasks that can be split into smaller problems (using the divide and conquer technique). Toward the end, we will cover the new inclusions in Java 8 API, the Map and Reduce model, and the Map and Collect model. The book will also teach you about the data structures and synchronization utilities to avoid data-race conditions and other critical problems. Finally, the book ends with a detailed description of the tools and techniques that you can use to test a Java concurrent application.

Style and approach

A complete guide implementing real-world examples with algorithms related to machine learning, data mining, and natural language processing in client/server environments. All the examples are explained in a step-by-step approach.

商品描述(中文翻譯)

**掌握 Java 8 並發 API 的多執行緒程式設計原則與技術**

## 本書介紹
- 使用 Java 8 並發 API 及其新組件實作並發應用程式
- 提升應用程式的效能或同時處理更多數據,充分利用所有資源
- 構建與機器學習、資料探勘、影像處理及客戶端/伺服器環境相關的實際範例

## 本書適合誰
如果您是一位具備良好並發理解的熟練 Java 開發者,但對如何有效實作並發程式或使用串流來提高處理效率沒有任何了解,那麼這本書就是為您而寫的。

## 您將學到什麼
- 通過將順序算法轉換為並發算法來設計並發應用程式
- 探索如何避免在並發算法中可能遇到的所有問題
- 使用 Executor 框架管理並發任務,而無需創建執行緒
- 擴展和修改 Executors 以適應您的需求
- 使用分而治之技術和 Fork/Join 框架解決問題
- 使用平行串流和 Map/Reduce 實作處理大量數據集
- 使用並發資料結構和同步機制控制資料競爭條件
- 測試和監控並發應用程式

## 詳細內容
並發程式設計允許將幾個大型任務劃分為更小的子任務,這些子任務進一步作為獨立任務並行處理。一旦達到所需結果,所有子任務將被合併,然後合併以獲得最終輸出。整個過程非常複雜。這個過程從並發算法的設計開始,到測試階段,並發應用程式需要額外的關注。Java 包含一個全面的 API,提供許多現成的組件,以簡單的方式實作強大的並發應用程式,但具有高度的靈活性以適應這些組件的需求。

本書首先詳細描述並發應用程式的設計原則以及如何將順序算法平行化。我們將向您展示如何從基礎到最先進的技術使用 Java 並發 API 的所有組件,並在 Java 中實作強大的並發應用程式。

您將使用與機器學習、資料探勘、自然語言處理、影像處理相關的複雜算法的實際範例,這些範例適用於客戶端/伺服器環境。接下來,您將學習如何使用 Java 8 並發 API 的最重要組件:Executor 框架來執行應用程式中的多個任務,phaser 類來實作分為多個階段的並發任務,以及 Fork/Join 框架來實作可以拆分為更小問題的並發任務(使用分而治之技術)。最後,我們將涵蓋 Java 8 API 中的新內容,包括 Map 和 Reduce 模型,以及 Map 和 Collect 模型。本書還將教您有關資料結構和同步工具,以避免資料競爭條件和其他關鍵問題。最後,本書以詳細描述您可以用來測試 Java 並發應用程式的工具和技術作結。

## 風格與方法
一本完整的指南,實作與機器學習、資料探勘和自然語言處理相關的實際範例,適用於客戶端/伺服器環境。所有範例均以逐步方式解釋。