Java Magazine, Jan/Feb 2018
Reactive Spring Proceeding from fundamentals use the Spring Framework to quickly build a reactive application ORACLE COM JAVAMAGAZINE JANUARY FEBRUARY 2018 61 reactive programming Reactive programming is an approach to writing software that embraces asynchronous I O Asynchronous I O is a small idea that portends big changes for software The idea is simple alleviate inefficient resource utilization by using resources that would otherwise sit idle as they waited for I O activity Asynchronous I O inverts the normal design of I O processing clients are notified of new data instead of asking for it This approach frees the client to do other things while waiting for new notifications There is of course always the risk that too many notifications will overwhelm a client so a client must be able to push back rejecting work it cant handle This is a fundamental aspect of flow control in distributed systems In reactive programming the ability of the client to signal how much work it can manage is called back pressure Many projects such as Akka Streams Vert x and RxJava support reactive programming Vert x and RxJava are examined in detail in the accompanying article Going Reactive with Eclipse Vert x and RxJava on page 32 Ed The Spring team has a project called Reactor which provides reactive capabilities for the Spring Framework Theres common ground across these diferent approaches which has been summarized in the Reactive Streams initiative an informal standard of sorts The Fundamental Data Types The Reactive Streams initiative defines four data types Publisher is a producer of values that might eventually arrive A Publisher produces values of type T as shown in Listing 1 JOSH LONG
You must have JavaScript enabled to view digital editions.