Examination of the performance and scalability of a web application in a reactive and imperative approach using the Spring Framework
Karol Lis
karol.lis@pollub.edu.plLublin University of Technology (Poland)
Jakub Smołka
Lublin University of Technology (Poland)
https://orcid.org/0000-0002-8350-2537
Abstract
The purpose of this paper was to test the performance and scalability of a web application written in reactive and imperative approaches using the Spring Framework, in order to understand the differences between these approaches and choose the technology that best meets the requirements and provides optimal performance. Two test applications were compared in terms of query processing times and CPU/RAM usage. The effect of Api Gateway microservices on application performance was analyzed. The tests showed that the reactive application processed I/O operations faster, used less RAM but more CPU. The imperative approach was faster for transactional operations performed sequentially. The reactive variant reacted with less latency to the presence of Api Gateway than the imperative approach.
Keywords:
spring boot, reactive programming, imperative programming, application performanceReferences
Poradnik do budowy reaktywnych systemów w języku Java, https://www.baeldung.com/java-reactive-systems, [10.11.2023].
Google Scholar
Poradnik do pisania aplikacji z użyciem Spring Frame-work w Javie, https://www.baeldung.com/spring-tutorial, [10.11.2023].
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, In IEEE Transactions on Software Engineering, (2017), 1125–1143, https://doi.org/10.1109/TSE.2017.2655524.
Google Scholar
M. Lagergren, M. Soneryd, Programming by voice: Efficiency in the Reactive and Imperative Paradigm, Bachelor's thesis, Mid Sweden University, Östersund, 2021.
Google Scholar
M. Jeleń, M. Dzieńkowski, The comparative analysis of Java frameworks: Spring Boot, Micronaut and Quarkus, Journal of Computer Sciences Institute 21 (2021) 287–294, https://doi.org/10.35784/jcsi.2724.
Google Scholar
Dokumentacja Spring Cloud Gateway, https://spring.io/projects/spring-cloud-gateway, [10.11.2023].
Google Scholar
Dokumentacja projektu JWT.io, https://jwt.io/, [10.11.2023].
Google Scholar
B. Goetz, Java Concurrency in practice, Reading, Massa-chusetts, Addison–Wesley, 2006.
Google Scholar
Statistics
Abstract views: 57PDF downloads: 58