Migrating from Imperative to Reactive

By Nicolas Frankel

Elevator Pitch

While Reactive Programming is very different from the usual Imperative way, there’s no denying it fits “the Cloud”, as every bit of resource is used to its fullest. Let’s see how to migrate from the latter to the former using a Spring Boot web app as an example.

Description

The Reactive Programming model is complex to master. It requires a lot of experience to feel comfortable with its API. However, there’s no denying that it fits the cloud ecosystem perfectly. Since on-premises infrastructure is oversized, running a program that executes a couple of additional CPU cycles won’t change anything. On the other hand, you will pay for them if you host the same program on third-party infrastructure. Depending on the number of those cycles, and the number of nodes the program runs on, it can make a huge difference in your monthly bill.

In this demo-based talk, I’ll show how to migrate a traditional Spring Boot application that uses WebMVC, Spring Data JPA, and Spring Cache to its Reactive equivalent in a step-by-step process.