Introduction to Reactive Streams

It is estimated that around 3 billion people are on the internet. They are using Internet for their various requirements, such as searching for information, communicating with friends and family, doing official communication, making online payments, browsing for online purchasing, and what not. Internet gives us ease, and, more importantly, it saves lots of time and money. Many of us are using Twitter or Facebook to communicate with society and friends. Many companies market their product online. Years ago, responsive web pages and mobile apps were rare; however, nowadays, many of us use them quite frequently. We use internet for hotel booking, online purchasing, bill payments, and much more. Nowadays, we have highly responsive online applications that have a complex frontend rendering. They handle the events and provide real-time data. Obviously, the experience is enhanced along with the increase in the development complexity.

J2EE, SOA, and XML are the technologies used to develop web applications with ease. The increasing demand and load on application raises many issues, such as application scalability, performance, and providing quick responses. Few years ago, Internet was a luxury, but now, it is a part of our day-to-day life. As more people are joining Internet, the demand is also increased. The competition in the market is leading the companies to think about different ways to provide services to target a major audience. The very first hurdle is to overcome the issue of blocking responses.

In a normal functional programming paradigm, the user has to keep waiting until the function is completed, the network call is done to get information from the server, or the database returns a result. This is called blocking the response. The wait means loss of time as well as an opportunity to do something in parallel until the service that we asked for is getting completed. Reactive programming is somewhat similar to giving reactions on events. Most of us have already handled button click event while working with Swing applications, or JavaScript in HTML pages where we already handled events. In reactive programming, we handle some different events, but you can get an idea of what the events are. However, this is not the end of the story, it's actually the beginning. Reactive programming creates and processes the data streams. The data streams may be the user input, properties, variables, or even some data structure. Reactive programming provides a facility to respond in a timely manner, asynchronously, to the unending input of data. It has a major shift in the programming paradigm from imperative to declarative style for the asynchronous coding. Reactive Streams follows Reactive Manifesto and is bound to provide a standard for asynchronous stream processing that supports back pressure. Many concepts are new and I'm sure you are interested in understanding them in depth; however, we will revisit Reactive Streams again in the section, Understanding stream, later in this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.171.121