What is Reactive Programming?
The word reactive describes a person or thing that acts only in response to something else. For example, a reactive person will react to being pinched but will not prevent it from happening in the future by taking action before it happens. This type of person or thing is often characterized as lifeless until someone pushes them to act. A reactive chemical is one that will react with other chemicals but will not easily react with itself. Link
To build Reactive systems, developers need to embrace a new model for information flow and handling complexity. This means more than just sprinkling asynchronous APIs and Circuit Breakers on top of your existing code. There’s a need to change how we handle things like device failures, loss of information, and dynamically scaling back-end services on demand. The back-end systems managing these need to be fully resilient and scalable to manage unpredictable load.
Exclusive Insider Look: Behind the Scenes of the Most Anticipated Designer Collaborations
Reactive systems and the programming style it enables revolve around event streams, time-ordered sequences of messages that signal when a condition has changed. These events are typically generated in real time by observers, which are segments of code inside an application that watch for specific conditions, or by devices like IoT sensors. These streams can be triggered to flow through a series of handler processes, or forked into derivative streams that process at different rates.
Many major languages have reactive extensions, engines, or frameworks built into them. Examples include ReactiveX (Java), Reactor (JVM and C#), Spring WebFlux (Java), Vert.x (Java and Kotlin), and Akka Streams (Java). However, adding observer processes to existing applications can be difficult or impossible depending on source code availability and staff programming skills.