Reactive Architecture provides ways to build application which remains responsive in all situations. Reactive Systems ensures the user about the application availability with prompt responses back quickly and linear fashion. The reactive application will be address the below

  • Be responsive to all user interactions
  • Handle Error/Fatal issues gracefully
  • Ensure application stability during heavy usage
  • Handle the network communications properly routing channels and receiving responses

Quick look at Reactive Principles

  • Responsive: The system consistently responds in a timely fashion. Responsiveness means that problems may be detected quickly and dealt with effectively. It is the cornerstone of usability and utility. Systems must respond in fast and consistent fashion if at all possible. This consistent behavior in turn simplifies error handling, builds end user confidence, and encourages further interaction.
  • Resilient: The system stays responsive in the face of failure. Resilience is achieved by replication, containment, isolation and delegation. Failures are isolated to a single component to ensure that parts of the system can fail and recover without compromising the system as a whole. Recovery of each component is delegated to external component.
  • Elastic: The system stays responsive under varying workload. Reactive Systems can react to changes in the input rate by increasing or decreasing the resources allocated to service these inputs. Reactive Systems support predictive and reactive scaling algorithms to support elasticity. Scaling up is done to provide responsiveness during peak load, while scaling down is down to improve cost effectiveness.
  • Message Driven: Responsiveness, resilience, elasticity is supported by message driven architecture. Reactive Systems rely on asynchronous message-passing to establish a boundary between components that ensures loose coupling, isolation and location transparency. This boundary also provides the means to delegate failures as messages. Non-blocking communication allows recipients to only consume resources while active, leading to less system overhead.

Reactive System vs Reactive Programming

It’s important to understand the difference between Reactive Systems or Reactive Architecture and Reactive Programming, because they are different.

Reactive System

Reactive Systems apply the Reactive Principles at the architectural level. The Reactive Manifesto principles are intrinsic to the design and architecture of reactive systems. All major architectural components interact in a reactive way. They follow the principles of being message driven, elastic, resilient, and responsive. In order to do this Reactive Systems are separated along asynchronous boundaries. Reactive micro services are an example of something that is built using Reactive Systems.

Reactive Programming

Reactive Programming can be used to support the construction of Reactive Systems. It takes a problem and breaks it up into small discrete steps. Those individual steps are then executed in an asynchronous non-blocking fashion, usually through a callback mechanism. Reactive Programming techniques like futures, Reactive Streams, RxJava, RxScala can be used to build Reactive Systems. Although, a system that uses Reactive Programming is not necessarily Reactive System.

Leave a comment

Trending