jokerconf Joker 2015 (16.10.2015 — 17.10.2015)

CompletableFuture in Java 8, asynchronous processing done right

img

The talk is about CompletableFuture — new Java 8 tools for processing tasks asynchronously. No slides, only Live Coding!

Future objects prior to Java 8 were surprisingly limited. CompletableFuture introduced in JDK 8 is way more powerful. You can finally register asynchronous callbacks, transform, chain and combine futures on the fly. This shift from blocking Future allows writing more responsive, scalable and robust applications without too much hustle.

Deep foundation in functional programming together with shiny lambda expressions make CompletableFuture a modern and comprehensive tool for every multi-threaded application. New futures can also act as so-called promises, thus providing simple synchronization mechanism. Java finally got an asynchronous processing abstraction that can compete with Scala.

During this coding-only session we will explore various examples of CompletableFuture and familiarize ourselves with some patterns and practices. However we WON’T use the word «monad» at all.