Be reactive with reactive programming

Obviously, our computed property (discussed in the previous section) cannot be reactive or represent reactive programming. Reactive programming has specific designs and technologies. To experience the reactive programming or to be reactive, you can start with documents, available at http://reactivex.io/ and experience it by going through the reactive manifesto (https://www.reactivemanifesto.org/).

In simple terms, reactive properties are binding properties that react when an event is triggered.

Nowadays, when we deal with various large systems/applications, we find that they are too large to handle at once. These large systems are divided or composed into smaller systems. These smaller units/systems rely on reactive properties. To adhere to reactive programming, reactive systems apply design principles so that these properties can apply to all methods. With the help of this design/approach, we can make a composable system.

According to the manifesto, reactive programming and reactive systems are both different.

On the basis of the reactive manifesto, we can conclude that reactive systems are as follows:

  • Responsive: Reactive systems are event-based design systems; these systems are quick to respond to any request in a short amount of time.
  • Scalable: Reactive systems are reactive in nature. These systems can react to changing the scalability rate by expanding or reducing the allocated resources.
  • Resilient: A resilient system is one that will not stop even if there is a failure/exception. Reactive systems are designed in such a way so that in any exception or failure, the system will never die; it remains working.
  • Message-based: Any data item represents a message that can be sent to a specific destination. When a message or data item has arrived at a given state, an event emits a signal to notify the subscribers that a message has reached. Reactive systems rely on this message passing.

The following diagram shows a pictorial view of a reactive system:

In this diagram, a reactive system is composed of small systems that are resilient, scalable, responsive, and message-based.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.12.172