~/talk

Introducing RxJava into a Spring Boot REST API

Talkat SpringOne2GX 2015 · 2015-09-14..09-17· [java, reactive-programming]
links:none on file
slides:none on file

Stepwise migration of a Spring Boot REST API into RxJava converts blocking services into Observables, shows how to use map/flatMap/zip to transform and combine streams, and handles failures with onErrorResumeNext and retry (cold vs hot sources matter for retries). Examples include counting users, summing hash power for a Dogecoin mining pool, and falling back from a flaky free FX API to a paid API. Controllers temporarily use toBlocking then move to Spring DeferredResult for nonblocking responses; tests use MockMvc async dispatch.

AI-written summary · about

  1. 0:00Introduction to RxJava
  2. 1:00Why blocking code is bad
  3. 8:28RxJava basics and Observable
  4. 11:00Migrating legacy Spring Boot app
  5. 16:46First RxJava operator: map
  6. 24:29Blocking vs non-blocking in controllers
  7. 34:08Flat map and reduce operators
  8. 40:30Filter, take and count operators
  9. 48:34Side effects with doOn operators
  10. 51:06Combining observables: concat, merge, zip
  11. 1:01:26Error handling: retry and onError
  12. 1:15:51Fallback strategies with onErrorResume
  13. 1:27:11Making controllers reactive in Spring
  14. 1:33:18Summary and takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.