Comparison between the traditional and reactive approaches

The traditional approach is very simple. The reactive approach needs to implement a reactive subscribe and event chain. If the event chain involves a message broker, it becomes even more complex.

In the traditional approach, we poll for changes. This means that the entire sequence is triggered every minute (or the specified interval) irrespective of whether there is a change in the stock price. In the reactive approach, once we register for the event, the sequence is triggered only when the stock price changes.

The lifetime of the threads in the traditional approach is longer. All resources used by the thread are locked for a longer duration. Considering the big picture of a server ...

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.