Comparative analysis of reactive and imperative approach in Java web application development

Sebastian Iwanowski

sebastian.iwanowski@pollub.edu.pl
Politechnika Lubelska (Poland)

Grzegorz Kozieł


(Poland)

Abstract

The subject of this study was to compare web applications created using the imperative and reactive approaches in Java. For this purpose, two applications with the same functionalities were developed using both approaches. The study looked at the performance, stability and time-consumption of implementation of each application. Based on the obtained results, it was found that the reactive application processes queries faster, uses less CPU, and is more stable in the case of handling many simultaneous requests, where the processing time is greater than 10 seconds. No significant differences were observed in using the computer's RAM by the applications. In addition, the study showed that reactive application takes more time to create.


Keywords:

imperative approach., reactive approach, web applications, Java

Dokumentacja Spring Framework odnośnie reaktywnych bibliotek, https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html, [28.05.2022].
  Google Scholar

G. Salvaneschi, S. Proksch, S. Amann, S. Nadi, M. Mezini, On the positive effect of reactive programming on software comprehension: An empirical study. IEEE Transactions on Software Engineering, 43(12) (2017) 1125-1143.
DOI: https://doi.org/10.1109/TSE.2017.2655524   Google Scholar

H. K. Dhalla, Benchmarking the performance of RESTful applications implemented in spring boot Java and MS. Net core. Journal of Computing Sciences in Colleges, 36(3) (2020) 178-178.
  Google Scholar

S. Komolov, N. Askarbekuly, M. Mazzara, An empirical study of multi-threading paradigms Reactive programming vs continuation-passing style. 2020 the 3rd International Conference on Computing and Big Data, Taichung, 2020.
DOI: https://doi.org/10.1145/3418688.3418695   Google Scholar

G. Amuthan, Spring MVC. Przewodnik dla początkujących, Helion, 2015.
  Google Scholar

J. Brittain, I. F. Darwin, Tomcat: The Definitive Guide, 2nd Edition, O'Reilly Media, 2003.
  Google Scholar

O. Dokura, I. Lozynskyi, Hands-On Reactive Programming in Spring 5, Packt Publishing, 2018.
  Google Scholar

Dokumentacja Spring Framework odnośnie reaktywnych bibliotek, https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html, [28.05.2022].
  Google Scholar

Opis Spring WebFlux, https://piotrminkowski.com/2020/03/30/a-deep-dive-into-spring-webflux-threading-model/, [28.05.2022].
  Google Scholar

Download


Published
2022-09-30

Cited by

Iwanowski, S., & Kozieł, G. (2022). Comparative analysis of reactive and imperative approach in Java web application development. Journal of Computer Sciences Institute, 24, 242–249. https://doi.org/10.35784/jcsi.2999

Authors

Sebastian Iwanowski 
sebastian.iwanowski@pollub.edu.pl
Politechnika Lubelska Poland

Authors

Grzegorz Kozieł 

Poland

Statistics

Abstract views: 394
PDF downloads: 365