Scala Reactive Programming
上QQ阅读APP看书,第一时间看更新

Benefits of Reactive systems with RP

We will get more benefits when we use RP as a programming paradigm to develop the components of a Reactive system. The combination of RP and Reactive systems gives us the following benefits:

  • Self-healing: As per the Reactive Streams specification, RP should support Resilience. This means we can write Reactive systems in a way that they have some technique to recover from failure and continue working to give responses to the clients. This is known as self-healing. A client will not know about this, and they will never see those failures.
  • Highly available systems: As per the Reactive Streams specification, RP should support Elasticity (scale up/down and scale out/in). This means we can write Reactive systems in a way that they are always available. They support 100% up time.
  • Highly Scalable to support heavy loads.
  • Loose coupling.
  • Utilizes system resources (both hardware and software) efficiently.
  • Provides better responsiveness.
  • Provides real-time behavior or data streaming.
  • Easy to perform distributed data processing.
  • Supports Location Transparency.
  • Low latency.
  • Better performance.
  • Ease of maintainability.
  • No need to use anonymous callbacks (so no more callback hell).
  • Easy to address and handle failures.
  • Easy to reason about failures.

We should also understand the things that are forcing us to develop and use Reactive systems:

  • IoT (Internet of Things)
  • Cloud environment or services
  • Big data systems
  • Real-time fast data streaming
  • Mobile architectures
  • Communication between heterogeneous systems
  • Multicore hardware architecture
Here, Reactive systems means Reactive Web Applications, Reactive applications, and Reactive microservices. In my point of view, all have the same meaning.

So far, we have discussed Reactive World, that is, RP. Now, it's time to enter the Functional World, that is, functional programming.