Hands-On Reactive Programming with Reactor

Build reactive and scalable microservices using the Reactor framework
 
 
Packt Publishing
  • 1. Auflage
  • |
  • erschienen am 29. September 2018
  • |
  • 250 Seiten
 
E-Book | PDF mit Adobe-DRM | Systemvoraussetzungen
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-1-78913-634-0 (ISBN)
 
Discover how project Reactor enhances the reactive programming paradigm and allows you to build scalable asynchronous applicationsKey FeaturesUse reactive APIs, Flux, and Mono to implement reactive extensionsCreate concurrent applications without the complexity of Java's concurrent APIUnderstand techniques to implement event-driven and reactive applicationsBook DescriptionReactor 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 learnExplore benefits of the Reactive paradigm and the Reactive Streams APIDiscover the impact of Flux and Mono implications in ReactorExpand and repeat data in stream processingGet to grips with various types of processors and choose the best oneUnderstand how to map errors to make corrections easierCreate robust tests using testing utilities offered by ReactorFind the best way to schedule the execution of codeWho this book is forIf 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.
weitere Ausgaben werden ermittelt
Rahul Sharma is a seasoned Java developer with around 13 years' experience in Java/J2EE applications. He has worked at companies ranging from enterprises to start-ups. Being an open source enthusiast, he has contributed to various projects, including Apache Crunch. He is currently working with a Java framework, Project Reactor.
  • Cover
  • Title Page
  • Copyright and Credits
  • Packt Upsell
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: Getting Started with Reactive Streams
  • Technical requirements
  • Reactive architecture
  • Reactive programming
  • ReactiveX
  • Composite streams
  • Flexible operators
  • Reactive Streams
  • Asynchronous processing
  • Subscriber backpressure
  • David Karnok's classification
  • Zero generation
  • First generation
  • Second generation
  • Third generation
  • Fourth generation
  • Fifth generation
  • Reactor
  • Infinite data streams
  • Push-pull model
  • Concurrency agnostic
  • Operator vocabulary
  • Project setup
  • Summary
  • Questions
  • Further reading
  • Chapter 2: The Publisher and Subscriber APIs in a Reactor
  • Technical requirements
  • Stream publisher
  • Stream subscriber
  • Subscription
  • Reactive Streams comparison
  • The Observable interface
  • Java Messaging Service API
  • Learning about the Reactor Core API
  • The Flux API
  • Generating the Flux API
  • The Flux.just method
  • The Flux.from methods
  • Utility methods
  • The Flux.generate method
  • SynchronousSink
  • Flux.create
  • The Mono API
  • Generating a Mono
  • The Mono.just method
  • The Mono.from method
  • Utility methods
  • Mono.create
  • Building subscribers to Flux and Mono
  • Lifecycle hooks
  • Trying a hands-on project
  • Summary
  • Questions
  • Further reading
  • Chapter 3: Data and Stream Processing
  • Technical requirements
  • Generating data
  • Filtering data
  • The filter() operator
  • The take operator
  • The skip operator
  • Converting data
  • The map() operator
  • The flatMap operator
  • The repeat operator
  • The collect operator
  • The collectMap operator
  • The reduce operator
  • Conditional tests
  • Appending data
  • The concatWith operator
  • Summary
  • Questions
  • Chapter 4: Processors
  • Technical requirements
  • An introduction to processors
  • Understanding processor types
  • The DirectProcessor type
  • The UnicastProcessor type
  • The EmitterProcessor type
  • The ReplayProcessor type
  • The TopicProcessor type
  • The WorkQueueProcessor type
  • Hot versus Cold publishers
  • Summary
  • Questions
  • Chapter 5: SpringWebFlux for Microservices
  • Technical requirements
  • Introduction to SpringWebFlux
  • Configuring annotations
  • SpringBoot Starter
  • Adding a controller
  • Method parameters
  • Exception handling
  • Configuring functions
  • The handler function
  • The router function
  • HandlerFilter
  • HttpHandler
  • Fibonacci functional router
  • Summary
  • Questions
  • Chapter 6: Dynamic Rendering
  • Technical requirements
  • View templates
  • Resolving views
  • Freemarker
  • Thymeleaf
  • Scripting
  • Mustache
  • Learning about static resources
  • WebClient
  • Summary
  • Questions
  • Chapter 7: Flow Control and Backpressure
  • Technical requirements
  • Flow control
  • The groupBy operator
  • The buffer operator
  • The window operator
  • The sample operator
  • Backpressure
  • OnBackpressure
  • Summary
  • Questions
  • Chapter 8: Handling Errors
  • Technical requirements
  • Generating errors
  • Checked exceptions
  • The doOnError hook
  • The doOnTerminate hook
  • The doFinally hook
  • Error recovery
  • The onErrorReturn operator
  • The onErrorResume operator
  • The onErrorMap operator
  • Timeout
  • WebClient
  • Summary
  • Questions
  • Chapter 9: Execution Control
  • Technical requirements
  • Scheduler
  • Reactor schedulers
  • The immediate scheduler
  • The single scheduler
  • The parallel scheduler
  • The elastic scheduler
  • The ExecutorService scheduler
  • Parallel processing
  • PublishOn operator
  • SubscribeOn operator
  • ParallelFlux
  • Broadcasting
  • The replay operator
  • The publish operator
  • Summary
  • Questions
  • Chapter 10: Testing and Debugging
  • Technical requirements
  • Testing Reactor pipelines
  • StepVerifier
  • expectError
  • expectNext
  • Capture values
  • Verify
  • Validating backpressure
  • Validating time operations
  • Publisher probe
  • Publisher stubs
  • Debugging Reactor streams
  • Debug hook
  • Checkpoint operator
  • Stream logging
  • Summary
  • Questions
  • Assessments
  • Other Books You May Enjoy
  • Index

Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

44,59 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
PDF mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen

35,99 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen