Java Magazine, Jan/Feb 2018
What Is Reactive Programming ORACLE COM JAVAMAGAZINE JANUARY FEBRUARY 2018 15 reactive programming R eactive programming is a term that means slightly different things to diferent people Central to the concept though is a model of computing that is alerted to certain kinds of events can process or ignore those events and works with the event source to manage the number of events to be processed In practice this model rests on several technologies a message passing framework a subscription based notification system and an asynchronous execution of the event driven tasks The benefit is a loosely coupled implementation that is scalable and tends to isolate failures The scalability here refers to the ability to scale horizontally quickly and it anticipates handling the number of events associated with big data millions to billions of incoming events This aspect in particular is what makes the reactive model different from its familiar forebear the event loop in GUI development In this issue we provide an overview of reactive development page 16 and then do a deep dive into RxJava page 32 one of the leading libraries for developing reactive applications on the JVM We follow that up by looking at the reactive capabilities built into the most recent release of Spring 50 page 61 Finally we examine a slightly diferent model for developing CRUD applications called Command Query Responsibility Segregation or CQRS page 69 which while not reactive per se implements an approach that overlaps with reactive programming It might seem that reactive programming is a design that would lead naturally to microservice implementation And indeed it is REACTIVE PROGRAMMING WITH JAX RS 16 USING VERT X AND RXJAVA 32 REACTIVE SPRING 50 61 CQRS 69 ART BY PEDRO MURTEIRA
You must have JavaScript enabled to view digital editions.