Introduction to Reactive Spring

Next-Level Spring: Reactive Programming & ReactiveX, APIs in Spring, WebFlux, REST, Spring Data / Databases & More

TT3355

Intermediate

4 Days

Course Overview

Spring Data reative allow us to implement database operations relying on Reative Programming APIs. While the Spring R2DBC initiative aims to bring reactive programming to relational databaes, several NoSQL databases already provide this possibility. After an introduction to NoSQL and the MongoDB, this courses covers the APIs available to communicate with this NoSQL database using both blocking and reactive APIs.

Introdcution to Reactive Spring is a comprehensive Spring training workshop geared for experienced Java and Spring developers who wish to explore concurrent, asynchronous and reactive programming APIs and techniques using Spring. After an introduction to reactive programming, Reactive Streams and the Project Reactor APIs, this course will show how this APIs are integrated into Spring. Spring 5 includes Spring WebFlux, providing a reactive programming model for web applications, including support for Reactive REST APIs.  Spring WebSocket assists in the creation of web applications which provide a full-duplex, two-way communication between client and server.

Course Objectives

Reactive Spring focuses on providing an understanding of the fundamental principles and technologies that are used in reactive programming.  This understanding is critical to being able to diagnose, troubleshoot, tune, and perform other lifecycle activities.

Working within in an engaging, hands-on learning environment, guided by our expert team, attendees will:

  • Understand the ReactiveX specification
  • Understand the basics of Reactive Programming
  • Discuss the advantages and limitations of Observables
  • Write a client application capable of handling Reactive events
  • Apply operators to event streams to filter, modify and combine the objects emitted by event publishers
  • Select the appropriate type of Event Source
  • Use both Cold and Hot Observables
  • Deal with backpressure problems in reactive programming
  • Develop a reactive web application using Spring WebFlux
  • Define application flows of a WebFlux application
  • Use the WebClient API to work with both synchronous and streaming APIs
  • Develop Unit and Integration tests to test WebFlux endpoints
  • Creating a reactive REST endpoint
  • Become familiar with the basics of WebSockets
  • Create a WebSocket endpoint using Spring
  • Create a WebSocket client
  • Understand the basics of NoSQL
  • Become familiar with the basics of MongoDB
  • Understand how the data in MongoDB can be retrieved using a Reactive API
  • Define Spring Data MongoDB repositories
  • Query the MongoDB using Spring Data
  • Define a reactive repository using MongoDB
  • Explore the Spring Data R2DBC API to perform reactive CRUD operations against a relational database

Need different skills or topics?  If your team requires different topics or tools, additional skills or custom approach, this course may be further adjusted to accommodate.  We offer additional Spring, programming, Microservices / Services, REST, TDD / testing, design, application security and other related topics that may be blended with this course for a track that best suits your needs. Our team will collaborate with you to understand your needs and will target the course to focus on your specific learning objectives and goals.

Course Prerequisites

This in an intermediate-level Java development course geared for students experienced with Java and Spring programming essentials.  This course does not cover Java or Spring development basics.

Please see the Related Courses tab for specific Pre-Requisite courses, Related Courses that offer similar skills or topics, and next-step Learning Path recommendations.

Course Agenda

Please note that this list of topics is based on our standard course offering, evolved from typical industry uses and trends. We’ll work with you to tune this course and level of coverage to target the skills you need most.

Session: Introduction to Reactive Programming

Lesson: Introduction to Reactive Programming

  • Reactive Manifesto
  • Introduce ReactiveX
  • ReactiveX implementations
  • The Observer, Iterator pattern and functional programming
  • Discuss hot and cold publishers

Lesson: Reactive Streams API

  • Introduce the Reactive Streams specification
  • Publisher and Subscribers
  • java.util.concurrent.Flow
  • Transformation of Messages (Processor)
  • Controlling messages
  • Tutorial: Setup Eclipse for Using Maven

Session: Project Reactor

Lesson: Introduction

  • Introduce the Reactor Building blocks
  • Flux and Mono
  • Creating observables
  • Subscribing to a stream
  • Lab: Project Reactor introduction

Lesson: Testing Event Sources (introduction)

  • Testing reactive implementations
  • StepVerifier : test sequence of emitted items
  • Defining expectations
  • TestPublisher: produce test data to test downstream operators
  • Lab: Project Reactor Testing

Lesson: Reactive Operators

  • Introduce Operators
  • Show the use of marble diagrams
  • Explain some commonly used operators
  • Callback operators
  • Lab: Project Reactor Operators

Lesson: Schedulers (Multithreading)

  • Thread usage of subscriber and consumer
  • Using the subscribeOn method
  • Introduce the Scheduler interface
  • Using the observeOn method

Lesson: Backpressure

  • Strategies for dealing with Backpressure
  • “reactive pull” backpressure
  • Lab: Reactor Backpressure

Lesson: Exception Handling

  • Handling errors in onError
  • Exception handling strategies
  • Using onErrorReturn or onErrorNext operators
  • Using the retry operators
  • The Global Error Handler
  • Lab: Reactor Exceptions

Session: Spring Data R2DBC

Lesson: Spring Data Review

  • Quick review of Spring Data repositories
  • Query return types
  • Defining Query methods
  • Pagination and sorting

Lesson: R2DBC

  • Reactive Relational Database Connectivity
  • DatabaseClient
  • Performing CRUD operations
  • Reactive Query annotated methods
  • Lab: Spring Data R2DBC

Session: Spring WebFlux

Lesson: Introduction

  • Annotated Controllers
  • Functional Endpoints
  • WebFlux configuration
  • Creating a reactive REST endpoint
  • Lab: Introduction to Spring WebFlux

Lesson: Defining flows

  • Defining the application flow
  • Actions
  • Defining decision
  • Navigating flows
  • RouterFunction
  • Lab: WebFlux, Defining Flows

Lesson: View Technologies

  • View technologies
  • Using Thymeleaf to create the view
  • View Configuration
  • Lab: WebFlux View technologies

Session: Spring WebClient

Lesson: Introduction to WebClient

  • Working with asynchronous and streaming APIs
  • Making requests
  • Handling the response
  • Lab: WebClient

Lesson: WebTestClient

  • Testing WebFlux server endpoints
  • Testing controllers or functions
  • Define integration tests
  • Lab: WebTestClient

Session: Spring Reactive WebSockets

Lesson: Introduction to WebSockets

  • Be familiar with the basics of WebSockets
  • Understand the HTTP handshake and upgrade
  • Name some of the advantages of WebSockets

Lesson: Defining the WebSocket

  • WebSocket Message Handling
  • WebSocketSession
  • Implementing the WebSockethandler
  • Creating a Browser WebSocket Client
  • Lab: Spring WebSocket Introduction

Lesson: WebSocket STOMP

  • Streaming (or Simple) text-orientated messaging protocol
  • Introduce SockJS
  • Connecting to the STOMP endpoint
  • Configuring the message broker
  • STOMP destinations
  • Lab: Spring WebSocket STOMP

Lesson: Reactive WebSocket

  • Reactive WebSocket support
  • Implement the reactive WebSocketHandler

Session: NOSQL and MongoDB

Lesson: BigData

  • Introduce Big Data
  • Explain the need for enhanced data storage

Lesson: Introduction to MongoDB

  • JavaScript Object Notation Overview
  • Introduce Binary JSON (BSON)
  • Starting the database
  • Creating Collections and Documents
  • Executing ‘simple’ database commands
  • Introduce the ObjectID
  • Searching for documents using query operators
  • Updating and deleting documents
  • MongoDB Compass
  • Lab: Introduction to MongoDB

Session: Spring and MongoDB

Lesson: Spring and MongoDB

  • MongoDB Support in Spring Data
  • MongoClient and MongoTemplate
  • Spring Data MongoDB configuration
  • @EnableMongoRepositories
  • Adding documents to the database
  • The @Document and @Field annotations
  • Polymorphism and the _class property
  • The Criteria object
  • Lab: Spring MongoDB

Lesson: Spring Data MongoDB

  • MongoRepository
  • Field naming strategy
  • Using JSON queries to find documents
  • The @PersistenceConstructor annotation
  • Lab: Spring Mongo repositories

Lesson: Reactive Repositories with MongoDB

  • Using reactive repositories
  • ReactiveMongoTemplate
  • RxJava or Reactor
  • Lab: Spring Mongo reactive repositories

Course Materials

Each student will receive a Student Guide with course notes, code samples, software tutorials, step-by-step written lab instructions, diagrams and related reference materials and links (as applicable). Students will also receive the project files (or code, if applicable) and solutions required for the hands-on work.

Hands-on Setup Made Simple! Our dedicated tech team will work with you to ensure your student machines and learning environment is setup, tested and ready to go well in advance of the course delivery date, ensuring a smooth start to class and seamless hands-on experience for your students. We offer several flexible student machine setup options including guided manual set up for simple installation directly on student machines, or cloud based / remote hosted lab solutions where students can log in to a complete separate lab environment minus any installations, or we can supply complete turn-key, pre-loaded equipment to bring ready-to-go student machines to your students or in-person facility.  Please inquire for details.

Raise the bar for advancing technology skills

Attend a Class!

Live scheduled classes are listed below or browse our full course catalog anytime

Special Offers

We regulary offer discounts for individuals, groups and corporate teams. Contact us

Custom Team Training

Check out custom training solutions planned around your unique needs and skills.

EveryCourse Extras

Exclusive materials, ongoing support and a free live course refresh with every class.

Attend a Course

Please see the current upcoming available open enrollment course dates posted below. Please feel free to Register Online below, or call 844-475-4559 toll free to connect with our Registrar for assistance. If you need additional date options, please contact us for scheduling.

Course Title Days Date Time Price
Introduction to Reactive Spring 4 Days Apr 27 to Apr 28 10:00 AM to 06:00 PM EST $2,595.00 Register
Introduction to Reactive Spring 4 Days Jun 22 to Jun 23 10:00 AM to 06:00 PM EST $2,595.00 Register
Introduction to Reactive Spring 4 Days Aug 3 to Aug 4 10:00 AM to 06:00 PM EST $2,595.00 Register
Introduction to Reactive Spring 4 Days Sep 14 to Sep 15 10:00 AM to 06:00 PM EST $2,595.00 Register
Introduction to Reactive Spring 4 Days Nov 9 to Nov 10 10:00 AM to 06:00 PM EST $2,595.00 Register

New Site, BIG Savings!
We're celebrating the launch of our lonnngggg awaited new site with with *50% off all 2021 Public Classes* booked by March 31!  Check out our Current Offers for Individuals, Teams and Organizations to Learn for Less!

See our latest Offers and Promotions

Learn. Explore. Advance!

Extend your training investment! Recorded sessions, free re-sits and after course support included with Every Course
Trivera MiniCamps
Gain the skills you need with less time in the classroom with our short course, live-online hands-on events
Trivera QuickSkills: Free Courses and Webinars
Training on us! Keep your skills current with free live events, courses & webinars
Trivera AfterCourse: Coaching and Support
Expert level after-training support to help organizations put new training skills into practice on the job

The voices of our customers speak volumes

Special Offers
Limited Offer for most courses.

SAVE 50%

Learn More