Reactive Programming in Java: How, Why, and Is It Worth Doing? Part II. Reactivity

Reactivity

Reactive programming is asynchronicity combined with streaming data. In other words, there is no thread blocking in asynchronous processing, yet data is processed in portions. Reactivity adds a capability of data processing in a flow. Remember the example where the manager assigns a task to John, who should pass the result to Jim, and Jim should submit it to the manager? But our task is a specific portion, and you cannot pass it on until it is done. Such an approach can help removes some tasks from the manager, but Jim and John stay idle from time to time because Jim has to wait for John’s results and John has to wait for a new task.

  • Publishers — those who publish new messages;
  • Observers — those who are subscribed to them. In the case of reactive streams, observers are usually called Subscribers. These are two different terms for essentially the same thing. Most communities use the terms Publisher/Subscriber.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store