CompletableFuture in Java 8, asynchronous processing done right

by Tomasz Nurkiewicz 

Friday, 12 June 2015 11:30 @ Room 2

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.