In this chapter, we discovered how to harness the power of asynchronous programming with the Scala standard library using Future
and Promise
. We improved MVT backtesting performance by introducing concurrency to improve runtime performance and discovered how Promise
can be used to extend Future
. Along the way, we investigated the shortcomings of Future
along with the techniques to mitigate these shortcomings. We also explored an alternative to Future
with Scalaz Task
, which provides compelling performance benefits while retaining referential transparency. Using what you have learned in this chapter, you can take full advantage of multicore hardware using Scala to scale your software systems and deliver higher throughput. In our final chapter, Chapter 7, Architecting for Performance, we explore a set of advanced functional programming techniques and concepts to enrich your functional programming toolbox.