Well, reactive programming means that you complete all your IO-related tasks, such as network calls asynchronously. For example, if your application calls an external REST API or database, you can make this call asynchronously. If you do this, the current thread is not blocked. You can submit multiple requests simply by creating one or more threads. If you follow the lock method, you need to have one thread to handle each request. You can link to my blog post in several parts, part one , part two, and part 3 for more details.
Alternatively, you can use callbacks to do the same. You can make an asynchronous call using callbacks. But if you do this, sometimes you may end up in an addon. Having one callback inside another leads to very complex codes that are very difficult to maintain. On the other hand, RxJava gives you the opportunity to write asynchronous code, which is much simpler, more convenient and more convenient. In addition, RxJava provides you with many powerful operators, such as Map, Zip, etc., which makes your code much simpler, while increasing productivity due to the parallel execution of various tasks that are independent of each other.
RxJava is not another Observer implementation with many operators, but provides good error handling methods and retry mechanisms that are really convenient.
But I didnβt do any RxJava desktop marking with required programming to thank you statistically. But I am sure that RxJava should provide good performance on locking mechanisms.
source share