Chapter
Chapter 1: Getting Started with Reactive and Functional Programming
What is Reactive programming?
What is a data stream or stream?
RP versus Reactive systems versus Reactive architecture
Event-Driven versus Message-Driven
Benefits of Reactive systems with RP
What is functional programming?
Principles of functional programming
Benefits of functional programming
Functional Reactive programming
Why FP is the best fit for RP
Need of Reactive Manifesto
Principles of Reactive systems
Why Reactive Streams specification?
Why is Play Framework the best for Reactive systems?
Reactive systems versus traditional systems
Implementations of Reactive Streams
Lightbend's Reactive Platform
Pivotal's Reactor project
Microsoft's Reactive Extensions (RX)
How are Reactive Streams born?
What is a Marble diagram?
Benefits of Marble diagrams
FRP – the map() function Marble diagram
FRP – the flatMap() function Marble diagram
FRP – the merge() function Marble diagram
FRP – the filter() function Marble diagram
FRP – the reduce() function Marble diagram
FRP – the concat() and sorted() functions Marble diagram
Observer pattern versus Reactive pattern
Chapter 2: Functional Scala
Understanding the Scala Application
Scala FP features in action
Scala anonymous functions
Everything is an expression
Functions are first-class citizens
Benefits of linear recursion
A linear-recursion example
Benefits of tail-recursion
Scala Collections in action
Scala Functional Design Patterns
Scala Case class and object
Benefits of Scala Case class
Chapter 3: Asynchronous Programming with Scala
Differences between asynchronous and synchronous
Benefits of asynchronous programming
Differences between Concurrency and Parallelism
Building blocks of the Scala Future API
Benefits of the Scala Future API
What is a Future in Scala?
What is a computation unit?
The complete Scala Future API
What is ExecutionContext?
The relationship between Scala Future components
Differences between a Future and a Promise
Scala Future API callbacks
Scala Future API combinators
The Scala Future API in Play Framework
The Scala Future API in the Akka Toolkit
A Scala Future versus a Java Future
Chapter 4: Building Reactive Applications with Akka
Applications on the JVM (Java Virtual Machine)
Benefits of Akka (or why do we need Akka?)
Building blocks of the Akka Toolkit
Akka Extensions (or modules)
Principles of the Actor Model (or properties of Actor in the Actor Model)
Issues with the Shared-State Concurrency model
Benefits of the Actor Model
Components of the Actor Model (or building blocks of the Actor Model)
What are the benefits of immutable messages in the Actor Model?
How Akka implements the Actor Model
Other Actor Model implementations
Roles and responsibilities of ActorSystem
How to create an Akka ActorSystem?
How to shut down an Akka ActorSystem?
Components of Akka's ActorSystem
What is materialization and Akka's implementation?
Benefits of the dispatcher pattern
Akka Actor – Mailbox(MessageQueue)
The lifecycle of an Akka Actor
Actor's preStart() lifecycle method
Actor's postStop() lifecycle method
Actor's preRestart() lifecycle method
Actor's postRestart() lifecycle method
Why Actors are lightweight?
Sending messages to an Actor
Replaying messages from an Actor
Actor to Actor communication
Actor to non-Actor communication
Become/unbecoming an Actor
What is the main goal of Akka's supervision?
Why don't we write exceptions or failures handling in Actor itself?
Rules of Akka Supervision
Akka Supervision strategies
Akka's supervision hierarchy
What is Akka's Let It Crash model?
Akka HelloWorld Actor example
Akka Actors communicate example
Akka Actor's lifecycle example
Akka parent-child Actors example
Actor's Path versus Reference
Differences between ActorRef and ActorPath
When we execute actorRef.tell (message), what happens internally?
How to configure a dispatcher?
Akka Actor's implementation
Chapter 5: Adding Reactiveness with RxScala
Understanding Rx implementations
Benefits of Reactive Extensions
Limitations of Reactive Extensions
Building blocks of RxScala
Understanding the Observable
Developing RxScala HelloWorld with an Observable
Extending RxScala HelloWorld with Observer
Extending RxScala HelloWorld with Subscriber
Chapter 6: Extending Applications with Play
Introduction to Play Framework
Features of Play Framework
Benefits of Play Framework
Why Play Framework is so fast?
Clients of Play Framework
Building blocks of Play Framework
Benefits of Twirl Templates
Other components – services and repositories
Play Framework View Template constructs
Twirl Template Constructs
Architecture of Play Framework
The new features of Play Framework
Play Framework 2.5.x features
Play Framework 2.6.x features
Play Application project structure
Play/Scala HelloWorld example
What is Play Dependency Injection (DI)
Extend HelloWorld Example With DI
Extending HelloWorld example with Scala Futures
Play Framework Form-based web application
Extending Play/Scala HelloWorld example with Akka Toolkit
Play Fileupload web application
Chapter 7: Working with Reactive Streams
Introduction to Akka Streams
Goals of the Akka Streams API
Features of the Akka Streams API
Benefits of the Akka Streams API
Why do we need Akka Streams and why not just Akka?
Other Reactive Streams implementations
Components of Akka Streams
The Akka Streams Source component
The Akka Streams Sink component
The Akka Streams Flow component
Roles and responsibilities of Akka's ActorMaterializer
Akka's Actor versus Akka Stream's ActorMaterializer
The traditional backpressure approach
Push – Fast Producer / Slow Consumer
Pull – Slow Producer/Fast Consumer
The dynamic push/pull model
Akka Streams programming basics
Connect a Source to a Sink
Connecting a Source to a Flow to a Sink
Why do we need ActorSystem and ActorMaterializer?
Akka Streams HelloWorld example
Extending the Akka Streams HelloWorld example with the Flow component
HelloWorld example description
Goal of Akka Streams Graph DSL
Building blocks of Akka Streams Graph DSL
An Akka Streams GraphDSL example
Akka Persistence features
The ES (Event Sourcing) model
Principles of an Event Sourcing (ES) model
How Akka Persistence implements CQRS/ES
How to develop Akka Persistence Actors
Step1 – Use the PersistenceActor trait
Step2 – Implement PersistenceActor's receiveRecover
Step3 – Implement PersistenceActor's receiveCommand
Step4 – Implement PersistenceActor's persistenceId
Step5 – Configure our journal details in application.conf
Akka Persistence MongoDB Weather example
Chapter 8: Integrating Akka Streams to Play Application
Types of Akka Stream components
Developing Akka Dynamic Streams
Integrating Akka Streams into Play
Designing a Reactive Chat System
Developing the Reactive Chat System
Test Reactive Chat Application
Building blocks of Akka Persistence App
Developing WF Reactive Akka Persistence App
Testing WF Reactive Akka Persistence App
Chapter 9: Reactive Microservices with Lagom
Introduction to Lagom Framework
Features of Lagom Framework
Benefits of Lagom Framework
Drawbacks of monolith architecture
Benefits of microservice architecture
Principles of microservices
Lagom Reactive Platform architecture
Modules of Lagom Framework
Lagom Persistence modules
Building blocks of Lagom Framework
Lagom Framework's identifiers
Lagom ServiceCall in detail
Internal components of Lagom Framework
Lagom System – implementation
Lagom Hello Reactive System
Getting Hello Service code
Testing the Hello Reactive System
Lagom Hello Reactive System microservices
Understanding the Hello Service API code
Understanding HelloService implementation code
Developing Lagom WF Reactive System
WF Reactive System architecture
WF Reactive System – Producer API
WF Reactive System – Producer implementation
WF Reactive System – Consumer API
WF Reactive System – Consumer implementation
WF Reactive System – frontend
Testing the WF Reactive System
Chapter 10: Testing Reactive Microservices
Unit testing Scala applications
Unit testing Play Framework components
Test HelloWorld without using DI Controller
Test HelloWorld with DI Controller
Akka Toolkit's testing modules
Unit testing HelloWorldActor (Version 2)
Executing HelloWorld Actor unit tests
Unit testing Akka Streams
Uniting test Akka Streams, with Actor's Testkit
Unit testing Akka Streams with Akka Stream's Testkit
Unit testing Lagom services
Chapter 11: Managing Microservices in ConductR
Introduction to Lightbend's ConductR
Responsibilities of ConductR
Installing Lightbend ConductR
Installing the ConductR CLI
ConductR Sandbox Visualizer
Understanding ConductR Sandbox information
Preparing WF Reactive System for ConductR
Mix ConductRApplicationComponents trait
Deploying the WF Reactive System on ConductR
Starting ConductR Sandbox with multinodes
Starting ConductR Sandbox with a single node
Bundle WF Reactive System components
Observing the WF Reactive System bundles
ConductR Bundle descriptor
Loading WF Reactive System bundles
Running and testing WF Reactive System bundles
Chapter 12: Reactive Design Patterns and Best Practices
Understanding Design Patterns
Understanding Let-it-Crash
The Circuit Breaker pattern
Understanding the Circuit Breaker pattern
With or without Circuit Breaker
How a Circuit Breaker works
The Event Sourcing pattern
The Event Streaming Pattern
The Active-Passive Replication Pattern
The Resource Management Design Patterns
The Reactive Resource Loan pattern
The Reactive Resource Pool pattern
The Request-Response Design Pattern
Understanding the Reactive Design Pattern
Ask Reactive Design Pattern
Reactive System's best practices and tools
Prefer tell over ask with Akka Actors
Don't sequentialize Futures
Appendix A: Scala Plugin for IntelliJ IDEA
Understanding Scala Plugin
How to set up Scala Plugin for IntelliJ IDE
Appendix B: Installing Robomongo
Other Books You May Enjoy