The Futures are Calling and I Must Choose
summary
Compares Scala Futures, Twitter Futures, Guava ListenableFutures, Java CompletableFutures and lazy Tasks (Scalaz/Monix/FS2) with concrete interoperability code and runtime gotchas: finagle/protobuf use brings Twitter Futures into a Java codebase, by-ejection converts Twitter↔Scala Futures without wrapping repeatedly, GFC helps Guava↔Scala conversion, CompletableFuture works best for Java interop. Notes runtime differences: cooperative cancellation (Twitter/Tasks), immediate callback execution when a Twitter Future is already completed, ignored interrupt flag on CompletableFuture.cancel, and the need to control execution pools.
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:24The Reactive Manifesto
- 1:35What is the future really
- 1:55History lesson
- 2:54Outline
- 3:18Scala Futures
- 4:46Apply
- 5:10Promise
- 5:58Callbacks
- 6:29Map Flatmap
- 10:03Fork Join Pool
- 11:26Twitters Future
- 11:59Standard Combinators
- 13:42Standard Combinators
- 14:20Execution Context
- 15:44Future Pool
- 16:47Cancellation
- 18:46Twitter and Scala
- 19:56Listenable Future Guava
- 21:30Listenable Future Helper
- 22:39Transforms and Callbacks
- 23:35Type Interfaces
- 24:44Guava
- 26:39completable future
- 27:48apply async
- 28:37executor
- 30:47task
- 32:54monix
- 35:29Recommendations
- 36:32Reactive Extensions
- 37:25Questions
related talks
24mScala Ecosystems: Lightbend vs Typelevel
33mJourney to the Heart of the For-Yield
46mIntegration of Distributed Real-time Data Computing in a Web App
35mThe Multi-Threaded Asynchronous Parallel World of Swift
27mPractical functional programming: pick two
49mScalaz, or: how I learned to stop worrying and love monads
52mGo Fully Functional and Take Your Legacy Code with You!
22mConcurrency Models Demystified
