O'Reilly logo

Developing an Akka Edge by Thomas Lockney and Raymond Tay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8: Diving Deeper into Futures

In the second chapter I walked you through some code that used futures, but I didn't spend much time on them. I'd like to develop the idea a bit further here and show you how they can be used effectively to interact with actors and to sequence operations (or, computations, speaking more formally).

Clarifying our definition

Earlier I defined futures very generally, but let's be a bit more specific. A future represents the value of some expression or computation that may not have yet completed or which is not yet known. This mechanism was first proposed as a model for obtaining the result of parallel evaluation of expressions in a programming language.

As you saw earlier, futures are useful when you need to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required