Reactive Programming applied to Legacy Services — A WebFlux example

João Esperancinha
The Startup
Published in
28 min readJan 6, 2020

--

1. Introduction

The concept of reactive programming can be traced way back to the mid-60s. It’s a declarative programming model or programming paradigm which is mainly concerned about the handling of asynchronous data streams and the propagation of data through transformations with certain determined orders of execution. The term was invented by Erik Meijer probably around 2010. The history of reactive programming isn’t very clear as to where it started. However, we can see references about it when in old literature we find terms like “data flows”. These ended up being what we for a long time have been used to call and refer to as streams. Data flows as such were a part of another programming paradigm then called dataflow programming. This term was invented by Jack Dennis and his graduate students in the 1960s at MIT. Reactive programming is sometimes referred to as Dataflow programming on steroids. If you’d like to know more about the history of Reactive programming, I placed a lot of links in the resource repo of this article. Please have a look at them at the end of this article.

2. Reactive Programming in General

Reactive programming has many implementations, and they are all based on the observer pattern. In reactive programming terms, this…

--

--

João Esperancinha
The Startup

Kotlin, OCP JSE 11, OCP JSE 8, OCP JEE 7, VMA Spring Professional #java #kotlin #scala #jvm #kafka #flux #reactive #spring #springmvc #springwebflux #coroutines