Hands-On Reactive Programming with Reactor: Build reactive and scalable microservices using the Reactor framework

Rahul Sharma

  • 出版商: Packt Publishing
  • 出版日期: 2018-09-29
  • 售價: $1,770
  • 貴賓價: 9.5$1,682
  • 語言: 英文
  • 頁數: 250
  • 裝訂: Paperback
  • ISBN: 1789135796
  • ISBN-13: 9781789135794
  • 相關分類: Microservices 微服務SOAJVM 語言
  • 海外代購書籍(需單獨結帳)

商品描述

Discover how project Reactor enhances the reactive programming paradigm and allows you to build scalable asynchronous applications

Key Features

  • Use reactive APIs, Flux, and Mono to implement reactive extensions
  • Create concurrent applications without the complexity of Java's concurrent API
  • Understand techniques to implement event-driven and reactive applications

Book Description

Reactor is an implementation of the Java 9 Reactive Streams specification, an API for asynchronous data processing. This specification is based on a reactive programming paradigm, enabling developers to build enterprise-grade, robust applications with reduced complexity and in less time. Hands-On Reactive Programming with Reactor shows you how Reactor works, as well as how to use it to develop reactive applications in Java.

The book begins with the fundamentals of Reactor and the role it plays in building effective applications. You will learn how to build fully non-blocking applications and will later be guided by the Publisher and Subscriber APIs. You will gain an understanding how to use two reactive composable APIs, Flux and Mono, which are used extensively to implement Reactive Extensions. All of these components are combined using various operations to build a complete solution.

In addition to this, you will get to grips with the Flow API and understand backpressure in order to control overruns. You will also study the use of Spring WebFlux, an extension of the Reactor framework for building microservices.

By the end of the book, you will have gained enough confidence to build reactive and scalable microservices.

What you will learn

  • Explore benefits of the Reactive paradigm and the Reactive Streams API
  • Discover the impact of Flux and Mono implications in Reactor
  • Expand and repeat data in stream processing
  • Get to grips with various types of processors and choose the best one
  • Understand how to map errors to make corrections easier
  • Create robust tests using testing utilities offered by Reactor
  • Find the best way to schedule the execution of code

Who this book is for

If you're looking to develop event- and data-driven applications easily with Reactor, this book is for you. Sound knowledge of Java fundamentals is necessary to understand the concepts covered in the book.

Table of Contents

  1. Getting started with Reactive Streams
  2. The Publisher and Subscriber APIs in a Reactor
  3. Data and Stream processing
  4. The fundamentals of Processors
  5. SpringWebFlux for Microservices
  6. Dynamic rendering
  7. Flow Control and Back Pressure
  8. Handling Errors
  9. Execution Model
  10. Testing and Debugging

商品描述(中文翻譯)

發現如何使用 Reactor 項目增強反應式編程範式,並允許您構建可擴展的異步應用程式。

主要特點:
- 使用反應式 API、Flux 和 Mono 實現反應式擴展
- 創建並發應用程式,無需處理 Java 的並發 API 的複雜性
- 理解實現事件驅動和反應式應用程式的技術

書籍描述:
Reactor 是 Java 9 反應式流規範的實現,是一個用於異步數據處理的 API。該規範基於反應式編程範式,使開發人員能夠以更少的複雜性和更短的時間構建企業級、健壯的應用程式。《Hands-On Reactive Programming with Reactor》向您展示了 Reactor 的工作原理,以及如何在 Java 中使用它開發反應式應用程式。

本書從 Reactor 的基礎知識和其在構建有效應用程式中的角色開始。您將學習如何構建完全非阻塞的應用程式,並通過 Publisher 和 Subscriber API 進行指導。您將了解如何使用兩個反應式可組合的 API,Flux 和 Mono,這些 API 在實現反應式擴展時被廣泛使用。所有這些組件都使用各種操作結合在一起,構建出一個完整的解決方案。

此外,您還將瞭解 Flow API 的使用,並理解背壓以控制超額。您還將研究使用 Spring WebFlux,這是 Reactor 框架用於構建微服務的擴展。

通過閱讀本書,您將獲得足夠的信心來構建反應式和可擴展的微服務。

您將學到什麼:
- 探索反應式範式和反應式流 API 的好處
- 發現 Flux 和 Mono 在 Reactor 中的影響
- 在流處理中擴展和重複數據
- 瞭解各種類型的處理器並選擇最佳處理器
- 理解如何映射錯誤以便更容易進行修正
- 使用 Reactor 提供的測試工具創建健壯的測試
- 找到最佳的程式碼執行排程方式

本書適合對使用 Reactor 輕鬆開發事件和數據驅動應用程式感興趣的讀者。需要具備 Java 基礎知識以理解本書中涵蓋的概念。

目錄:
1. 開始使用反應式流
2. Reactor 中的 Publisher 和 Subscriber API
3. 數據和流處理
4. 處理器的基礎知識
5. 用於微服務的 SpringWebFlux
6. 動態渲染
7. 流量控制和背壓
8. 處理錯誤
9. 執行模型
10. 測試和調試