January 28, 2019

Back to the CompletableFuture: Concurrency in Action

Back to the CompletableFuture: Concurrency in Action

Short Abstract

Concurrency is hard! It is especially true for those who have only ever used Threads and Runnables. Fortunately, Java community has been working hard on improving developers experience around multithreading programming. The declarative model has become an essential part of the concurrency development along with resource management features of JDK5, and post-JDK8 structures like CompletableFutures.

In this talk, we explore concurrency programming and how developer-friendly it has become with the latest advantages of Java language.

Recording

Slide Deck

Long Abstract

Callback hell is a known way to give any JavaScript developer nightmares. However, Java developers are not much better off since anything concurrency and multithreading related gives us cold sweats.

With Threads and Runnables being the very first (and often last) things we used in Java, these classes gave many of us impression of and appreciation for complexities of concurrency. As a result, many developers abandoned the idea of ever touching thread management in Java and focused on a single-threaded development.

Fear no more! The world of concurrency in Java has changed since JDK8 and continues getting better. In this talk, we discuss improvements around Concurrency API of JDK5 and the power of asynchronous programming of CompletableFutures post-JDK8. Our goal is to break out of the fear of concurrency in Java and to learn about a new, declarative way of thread programming.

Takeaways

  • Basics of Concurrency and Its Forms in Java
  • Concurrency API and Declarative Model in JDK5
  • Asynchronous development with CompletableFuture post-JDK8