- Building RESTful Web Services with Spring 5(Second Edition)
- Raja CSP Raman Ludovic Dewailly
- 213字
- 2021-06-30 19:13:28
Benefits of Reactive programming
Let's assume we have one million user transactions happening in our application. Next year, it is going to increase to 10 million, so we need to scale it. The traditional method of doing this is to add enough servers (horizontal scaling).
Instead of doing horizontal scaling, what if we get an option to scale with the same servers? Yes, Reactive programming will help us to do that. Reactive programming is all about non-blocking applications that are synchronous and event-driven, and it doesn't require a lot of threads to scale vertically (within the JVM) rather than horizontally (through clustering).
Reactive types are not intended to process requests faster. However, they focus more on request concurrency, especially requesting data from a remote server efficiently. With Reactive type support, you will get higher-quality service. While comparing traditional processing, which blocks the current thread while waiting for a result, a Reactive API requests only the amount of data that can be consumed. Reactive APIs deal with streams of data, not only with individual elements one by one.
Overall, Reactive programming is about non-blocking, event-driven applications that can be scaled with a small number of threads, with back pressure as a main component to make sure the producers (emitters) do not overwhelm consumers (receivers).
- MERN Quick Start Guide
- 電子政務(wù)效益的經(jīng)濟(jì)分析與評價
- SD-WAN架構(gòu)與技術(shù)(第2版)
- 通信簡史:從信鴿到6G+
- 2018網(wǎng)信發(fā)展報告
- 通信原理及MATLAB/Simulink仿真
- jQuery Mobile Web Development Essentials
- 物聯(lián)網(wǎng)場景設(shè)計與開發(fā)(初級)
- 物聯(lián)網(wǎng)頂層設(shè)計與關(guān)鍵技術(shù)
- 移動互聯(lián)網(wǎng)新思維
- 現(xiàn)場綜合化網(wǎng)絡(luò)運(yùn)營與維護(hù):運(yùn)營商數(shù)字化轉(zhuǎn)型技術(shù)與實(shí)踐
- 計算機(jī)通信網(wǎng)絡(luò)安全
- Hands-On Cloud:Native Microservices with Jakarta EE
- 網(wǎng)絡(luò)安全和信息化黨政領(lǐng)導(dǎo)干部一本通
- 物聯(lián)網(wǎng)工程應(yīng)用技術(shù)