Part 1. Fundamentals

 

The words react, reactive, and streams are popular today. You may think that they’re the newest trends in programming, but though they are trendy, they’re hardly new. Reactive programming techniques, especially the actor model, are decades old. What has changed is that internet-scale applications are no longer limited to a few giant companies. Your application may have to grow from toy to powerhouse in far less time than you’d need to rewrite it.

Services such as Amazon Web Services (AWS) make adding servers easy, but that capability does you no good if your application isn’t designed to be scalable. The first part of this book delves into factors that can prevent your application from taking advantage of the additional power. Chapter 1 breaks down a traditional application and shows why more servers sometimes make performance even worse. It describes properties of an application that avoid these limits. Chapter 2 is a fast-paced introduction to the Akka toolkit. You start with a simple example that runs in a single process, and with a few small changes, you transform it into a flexible architecture that spans multiple servers. Chapter 3 examines the workings of the toolkit and addresses a problem that you probably didn’t encounter in chapter 2: handling failure gracefully. With this foundation, you’ll understand why reactive applications can withstand often-unpredictable challenges.