Victor Rentea

Java Champion, ex Lead Architect @IBM
Victor (@VictorRentea) is a Java Champion, and one of the top Technical Trainers, having trained more than 1.5K developers in dozens of companies worldwide.
Victor’s talks are regularly top-rated at the largest international conferences in Europe: his live-coding sessions are lightning-fast but well crafted, full of enthusiasm, deep insights and take-away tips. His passion is Simple Design, Refactoring, and Unit Testing, about which he regularly talks at top conferences. His personal commitment is to seed passion for writing clean, professional code.

Workshop topic:
Reactive Programming

Time & Date:
April 4th & 5th | 9am-5pm CEST

About workshop

The first challenge when approaching reactive programming is understanding WHY and WHEN NOT to use it. Starting from ‘classic’ blocking web endpoints, we’ll benchmark the bottleneck that occurs under heavy load and then explore the different historical alternatives to Reactor (some very good). Besides exploring hundreds of ‘common’ operators, the focus will remain on understanding the signals that drive all reactive flows. Understanding them is key to unlocking the mysteries of backpressure, hot publishers and avoiding common pitfalls when starting to work with Reactor.

We will then use this knowledge to approach several typical reactive flows, drawing conclusions about the best way to write the code to be maintainable and safe. After a roundtrip of Spring WebFlux features and quirks, we’ll then talk about 2 tough tasks: testing reactive flows and progressive migration of blocking code to reactive flows, and if there’s time left, about performance tuning.

Agenda

  • Chapter 1: Motivation and History
      » Blocking Endpoints (Servlet 2.4 style)
      » Async Servlets (v3.0), Deferred Result and a taste of the Callback Hell
      » CompletableFutures (compared with async-await in other languages)
      » Exercise: Trace a Thread Exhaustion with a Load Test + fix with above solutions
      » Reactive Streams Specification
  • Chapter 2: Publishers and Signals
      » Understanding Marble Diagrams
      » Mono, Flux
      » Signals = the key to understanding Reactive: onNext, complete, error, request, subscribe, cancel
      » Hooks (doOn* methods) – best practices
      » Subscriptions; leaks
  • Chapter 3: Creating Publishers and Basic Operators
      » Sync publishers: just, from, empty, error, never, range, repeat
      » Async publishers: interval, defer, from callable, from future, timer
      » Basic Operators: distinct, filter, map, first, take, contains, all, ...
      » Combining operators: merge, concat, combineLatest, zip, takeUntil
      » Empty/null handling: defaultIfEmpty, switchIfEmpty
      » Orchestration Operators: zip, flatMap, flatMapSequential, concatMap
      » Time series analysis Operators: scan, reduce, window, buffer
  • Chapter 4: Hot publishers
      » Difference vs “classic” cold ones; real-life use-cases
      » Caching signals operators: replay, cache, Connectable, autoConnect, refCount
      » Exercises
  • Chapter 5: Throttling and Resilience:
      » Operators: buffer, debounce, sample, throttle, delay, timeout, retry
      » Error handling - common patterns
      » Exercises
  • Chapter 6: Real-life Scenarios
      » Orchestrating non-blocking interactions
      » Enhancing data from multiple sources
      » Grouping and batching an infinite stream of data
      » Fire-and-forget calls
  • Chapter 7: Common Pitfalls
      » Not subscribing/ resubscribing to Cold Publisher
      » Blocking non-blockable threads
      » Cancelation propagation
      » Mutating state - Difference vs Imperative Mindset
  • Chapter 8: Spring 5 Web Flux + Reactor Specifics (show case)
      » NoSql DB: Mongo, Cassandra
      » Relational DB: R2DBC, Oracle Driver
      » WebClient
      » Exposing REST Endpoints
      »Non-blocking Files and Logging
      »Reactor Context
      »ParallelFlux
  • Chapter 9: Testing Reactive Flows
      » Verifying steps
      » Mocking publishers
      » Controlling Virtual Time
  • Chapter 10: Migrating to Reactive Programming
      » Bridging to/from non-reactive code
      » Schedulers: I/O vs. CPU threads, forking/joining a pipeline, publishOn/subscribeOn
      » Best Practices integrating blocking code or external APIs
      » Backpressure [optional]: intra/inter-systems mechanics
  • Chapter 11: Performance Tuning [optional]
      » Operator Fusion
      » Custom operators
      » Profiling

You can download the full program for this workshop at the following LINK.

* If you're interested in this program, please contact us at info@itkonekt.com to find out more about availability and prices.