~/talk

CompletableFuture is here

Talkat RigaDevDay 2015 · on Thursday, 2015-01-22· [java, concurrency]
linkedin:dchuyko
slides:none on file

CompletableFuture in JDK 8 replaces nested Future+callbacks with chainable operations and shows measurable costs and gains: microbenchmarks with JMH report sequential multiplication ~5 µs, plain Future versions ~12–13 µs, empty CompletableFutures ~8–9 µs, and heavier parallel work that uses thenCombine and thenApply drops overall latency to the hundreds of microseconds (example score ~342 µs). Examples include file I/O wrapped in supplyAsync, flattening with thenCompose, a JAX‑RS/Jersey + Grizzly endpoint that concatenates two CF results, and a ScheduledExecutorService timeout that completes the promise exceptionally.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 0:49Agenda and disclaimers
  3. 1:32Who writes single-threaded apps?
  4. 2:16Java concurrency evolution
  5. 3:45Future limitations
  6. 5:14Parallelism without main thread
  7. 6:20Future exception handling
  8. 7:29Nested futures and errors
  9. 8:55Problems with nested futures
  10. 9:41CompletableFuture introduction
  11. 11:34API and CompletionStage
  12. 14:05Creating CompletableFuture
  13. 16:41Synchronous submission methods
  14. 17:47Simple CompletableFuture examples
  15. 18:31Transformation methods
  16. 21:21Mapping and reducing futures
  17. 23:15Thread execution in methods
  18. 26:12Working with collections of futures
  19. 27:17Composing futures
  20. 30:58Flattening nested futures
  21. 32:02Blocking and non-blocking access
  22. 33:26Cost of async operations
  23. 35:57Performance benchmarks setup
  24. 38:32Lightweight operation costs
  25. 39:14Heavy computation parallelism
  26. 40:20Web demo introduction
  27. 41:23Server setup and endpoint
  28. 43:10CompletableFuture in web service
  29. 45:18Combining futures in service
  30. 46:43Error handling and timeouts
  31. 48:51Live demo walkthrough
  32. 50:20Demo troubleshooting
  33. 51:04Conclusion and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.