Book Image

Scala Reactive Programming

By : Rambabu Posa
Book Image

Scala Reactive Programming

By: Rambabu Posa

Overview of this book

Reactive programming is a scalable, fast way to build applications, and one that helps us write code that is concise, clear, and readable. It can be used for many purposes such as GUIs, robotics, music, and others, and is central to many concurrent systems. This book will be your guide to getting started with Reactive programming in Scala. You will begin with the fundamental concepts of Reactive programming and gradually move on to working with asynchronous data streams. You will then start building an application using Akka Actors and extend it using the Play framework. You will also learn about reactive stream specifications, event sourcing techniques, and different methods to integrate Akka Streams into the Play Framework. This book will also take you one step forward by showing you the advantages of the Lagom framework while working with reactive microservices. You will also learn to scale applications using multi-node clusters and test, secure, and deploy your microservices to the cloud. By the end of the book, you will have gained the knowledge to build robust and distributed systems with Scala and Akka.
Table of Contents (16 chapters)


In this chapter, we discussed what Reactive programming is, why we need it, its benefits, and its architecture.

Like Imperative and OOP, RP is a kind of programming paradigm.

We also covered the Reactive Manifesto and the Reactive Streams Specification and why we need RSS. You learned the four principles or tenants of Reactive Streams.

We also explored the Java 9 Flow API and its components in depth. It is defined as an API by Oracle Corporation as part of JEP-266. This API is also known as the Reactive Streams API.

Then we introduced another popular programming paradigm known as FP, and discussed why FP is a better fit for RP. Finally, we combined FP and RP into FRP.

We focused on some of the Reactive Streams API implementations, such as Akka Streams, Reactive Extensions (RxJava, Rx Scala), Vert.x, the Spring Reactor module, Reactive Mongo, and more.

I hope you have understood all about what the importance of FRP is in developing Reactive systems.

In this book, we will use the Lightbend Reactive Platform to develop our Reactive applications. The Lightbend Reactive Platform is a set of components, such as Scala, Play Framework, Akka Toolkit, Lagom, and ConductR. So let's start learning about each component one by one in the subsequent chapters.

Once you learn each component, at the end of the book, we will develop our final Reactive systems by following the Reactive Architecture.