~/talk

Asynchronous programming with Kotlin coroutines in Spring

Talkat Spring I/O 2018 · 2018-05-24..05-25· [kotlin, reactive-programming]
links:none on file
slides:none on file

Shows exactly what changes let synchronous Spring apps become nonblocking: add suspend to methods, flip dependency from Spring MVC to Spring WebFlux, and use the spring-kotlin-coroutine support library (add enableCoroutine). Explains argument/return-value resolvers for the compiler-added Continuation, using CoroutineWebClient instead of WebClient, coroutine repositories, coroutine-aware caching, suspending event listeners and custom CoroutineContext/dispatchers for dedicated thread pools. Notes limits: no reactive SQL support yet, thread‑locals and transactions don’t work and stack traces span threads.

AI-written summary · about

  1. 0:00Asynchronous programming with coroutines
  2. 3:22Synchronous blocking problems
  3. 10:27Spring needs coroutine handling
  4. 15:41Kotlin coroutines library for Spring
  5. 16:25Blocking code to coroutines
  6. 21:16CoroutineContext for threads
  7. 24:45Annotations for CoroutineContext
  8. 29:00Non-blocking I/O with WebFlux
  9. 31:49RestTemplate to WebClient
  10. 36:08Reactive repositories
  11. 40:17Caching for suspending functions
  12. 42:28Migrating to async Spring
  13. 44:36Q&A
~/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.