CompletableFuture in Java 8, asynchronous processing done right

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.

Tomasz Nurkiewicz 

Spent half of his life on programming, for the last 8 years professionally in Java land. Loves back-end, tolerates JavaScript. Passionate about alternative JVM languages. Disappointed with the quality of software written these days (so often by himself!), hates long methods and hidden side effects. Interested in charting, data analysis and reporting. Technical reviewer of «Learning Highcharts» and «Getting started with IntelliJ IDEA». Believes that computers were invented so that developers can automate boring and repetitive tasks. Also their own.

On a daily basis works in financial sector. Involved in open-source, DZone’s Most Valuable Blogger, used to be very active on StackOverflow. Likes programming. Claims that code not tested automatically is not a feature but just a rumour.