Understanding JVM Futures
Starting with JDK 5, we have had Futures, and they mostly went ignored. Now with concurrency and reactive technology in demand, it is essential that we understand what futures are, and how to handle them and make use of their power in asynchronous systems.
This presentation is a basic ground up introduction to Futures. We start with Futures and how they came packaged with JDK 5. We take a look at Executors, how to create a thread pool, which pool you should choose. How to model Futures in the JDK and show the difference for awaiting the answer and taking on the answer asynchronously. We also take a look at what a Promise is and when to use one. We then invest time taking a look at Guava’s callback solution. Then we finally look at the handling of futures in both Scala and Clojure.