Reactive Programming With Java 9

This book will teach you how to build robust asynchronous and event-driven applications with ease.
Preview in Mapt

Reactive Programming With Java 9

Tejaswini Mandar Jog

This book will teach you how to build robust asynchronous and event-driven applications with ease.
Mapt Subscription
FREE
$20.83/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Reactive Programming With Java 9 Book Cover
Reactive Programming With Java 9
$ 35.99
$ 25.20
Modular Programming in Java 9 Book Cover
Modular Programming in Java 9
$ 27.99
$ 19.60
Buy 2 for $35.00
Save $28.98
Add to Cart

Book Details

ISBN 139781787124233
Paperback402 pages

Book Description

Reactive programming is an asynchronous programming model that helps you tackle the essential complexity that comes with writing such applications.

Using Reactive programming to start building applications is not immediately intuitive to a developer who has been writing programs in the imperative paradigm. To tackle the essential complexity, Reactive programming uses declarative and functional paradigms to build programs. This book sets out to make the paradigm shift easy.

This book begins by explaining what Reactive programming is, the Reactive manifesto, and the Reactive Streams specifi cation. It uses Java 9 to introduce the declarative and functional paradigm, which is necessary to write programs in the Reactive style. It explains Java 9’s Flow API, an adoption of the Reactive Streams specifi cation. From this point on, it focuses on RxJava 2.0, covering topics such as creating, transforming,fi ltering, combining, and testing Observables. It discusses how to use Java’s popular framework, Spring, to build event-driven, Reactive applications. You will also learn how to implement resiliency patterns using Hystrix. By the end, you will be fully equipped with the tools and techniques needed to implement robust, event-driven, Reactive applications.

Table of Contents

Chapter 1: Introduction to Reactive Programming
Asynchronous programming
Summary
Chapter 2: Programming Paradigm Shift
Programming paradigm
Functional programming
Declarative programming
Operator fusion
Summary
Chapter 3: Reactive Streams
Discussing the Collection framework
Understanding backpressure
Summary
Chapter 4: Reactive Types in RxJava
ReactiveX
Observer design pattern
The Iterator design pattern
RxJava
Hot or cold Observables
Creating Observable emitting sequential data
Transforming Rx non-compatible sequences into Observables
Creating Observables for unrestricted infinite length
Types of observables
Understanding the Disposable interface
Subject
Summary
Chapter 5: Operators
Demystifying RxMarbles using an Observable
Transforming Observables using operators
Filtering Observable
Combining Observables
Conditional operators
The mathematical and aggregate operators
Summary
Chapter 6: Building Responsiveness
Concurrency
Scheduling
Latency
Summary
Chapter 7: Building Resiliency
Resilience
Error handling in RxJava
Exceptions specific to RxJava
Error handler
Summary
Chapter 8: Testing
Testing the need and role of a developer
The traditional way of testing an Observable
The modern approach for testing an Observable
Testing the Subscriber
The test() operator
Testing notifications
Mockito testing
Summary
Chapter 9: Spring Reactive Web
An introduction to Spring Framework 
The Spring architecture
Project Reactor
Spring web Reactive Programming
Server-side support
Client side
Server-Sent Events (SSE)
Summary
Chapter 10: Implementing Resiliency Patterns Using Hystrix
Hystrix- an introduction
Demonstrating HystrixObservableCommand
Handling fallback
Design patterns in resiliency
Queue-based load leveling pattern
Patterns used by Hystrix
Request collapsing or request batching
Request caching
Summary
Chapter 11: Reactive Data Access
Spring Data
Spring Data repositories
Spring Data and Reactive Programming
Spring Data Reactive and Redis
Kafka
Running the Kafka application
Summary

What You Will Learn

  • Understand the Reactive Manifesto
  • Grasp the Reactive Streams types introduced in Java 9 in the form of the Flow API
  • Use RxJava, a Reactive Streams implementation, to build asynchronous applications
  • Build responsiveness and resilience into applications using RxJava operators
  • Demonstrate the usage of Hystrix, a latency and fault tolerance library from Netfl ix that uses RxJava
  • Implement Reactive web applications using Spring Framework 5 and RxJava

Authors

Table of Contents

Chapter 1: Introduction to Reactive Programming
Asynchronous programming
Summary
Chapter 2: Programming Paradigm Shift
Programming paradigm
Functional programming
Declarative programming
Operator fusion
Summary
Chapter 3: Reactive Streams
Discussing the Collection framework
Understanding backpressure
Summary
Chapter 4: Reactive Types in RxJava
ReactiveX
Observer design pattern
The Iterator design pattern
RxJava
Hot or cold Observables
Creating Observable emitting sequential data
Transforming Rx non-compatible sequences into Observables
Creating Observables for unrestricted infinite length
Types of observables
Understanding the Disposable interface
Subject
Summary
Chapter 5: Operators
Demystifying RxMarbles using an Observable
Transforming Observables using operators
Filtering Observable
Combining Observables
Conditional operators
The mathematical and aggregate operators
Summary
Chapter 6: Building Responsiveness
Concurrency
Scheduling
Latency
Summary
Chapter 7: Building Resiliency
Resilience
Error handling in RxJava
Exceptions specific to RxJava
Error handler
Summary
Chapter 8: Testing
Testing the need and role of a developer
The traditional way of testing an Observable
The modern approach for testing an Observable
Testing the Subscriber
The test() operator
Testing notifications
Mockito testing
Summary
Chapter 9: Spring Reactive Web
An introduction to Spring Framework 
The Spring architecture
Project Reactor
Spring web Reactive Programming
Server-side support
Client side
Server-Sent Events (SSE)
Summary
Chapter 10: Implementing Resiliency Patterns Using Hystrix
Hystrix- an introduction
Demonstrating HystrixObservableCommand
Handling fallback
Design patterns in resiliency
Queue-based load leveling pattern
Patterns used by Hystrix
Request collapsing or request batching
Request caching
Summary
Chapter 11: Reactive Data Access
Spring Data
Spring Data repositories
Spring Data and Reactive Programming
Spring Data Reactive and Redis
Kafka
Running the Kafka application
Summary

Book Details

ISBN 139781787124233
Paperback402 pages
Read More

Read More Reviews

Recommended for You

Modular Programming in Java 9 Book Cover
Modular Programming in Java 9
$ 27.99
$ 19.60
Mastering Microservices with Java 9 - Second Edition Book Cover
Mastering Microservices with Java 9 - Second Edition
$ 35.99
$ 25.20
RESTful Java Web Services - Third Edition Book Cover
RESTful Java Web Services - Third Edition
$ 35.99
$ 25.20
Architecting Modern Java EE Applications Book Cover
Architecting Modern Java EE Applications
$ 39.99
$ 28.00
Spring 5 Design Patterns Book Cover
Spring 5 Design Patterns
$ 35.99
$ 25.20
Machine Learning: End-to-End guide for Java developers Book Cover
Machine Learning: End-to-End guide for Java developers
$ 75.99
$ 53.20