- TypeScript Microservices
- Parth Ghiya
- 223字
- 2021-06-25 21:48:46
Why should I consider adopting reactive programming?
Now that we have unveiled the mystery of reactive programming, the next big question is why we should care about reactive programming and what advantages we can get while doing reactive programming. In this section, we'll see major benefits of reactive programming and how easily code can be managed to introduce major new functionalities at any point in time:
- Easy to interpret or tap into any functions compared to callbacks or middleware.
- Handle errors and memory management easily, without any centralized configurations. A single subscription can have an error function in which you can easily dispose of the resources.
- Efficiently handle time-related complexities. Sometimes, we are bound by rate limiting constraints in calling some external APIs such as the Google Cloud Vision API. Reactive programming has immense use cases in such situations.
- Go to market rate is faster. When correctively implemented, reactive programming drastically reduces old school code to a very few lines of code.
- Easy-to-handle throttleable input streams, that is, my input stream is dynamic. It can increase or decrease as per demand.
Now that we have gone through some of the major advantages of reactive programming, in the next section we will talk about the outcome of reactive programming, a reactive system. We will see a set of standards defined in the Reactive Manifesto.