Comparative analysis of reactive programming and Java virtual threads

Main Article Content

Daniel Charlak

s95374@pollub.edu.pl

https://orcid.org/0009-0002-9635-5174
Jakub Brzeziński

s95372@pollub.edu.pl

https://orcid.org/0009-0008-8421-5506
Grzegorz Kozieł

g.koziel@pollub.pl

https://orcid.org/0000-0002-9948-7087

Abstract

This study presents a comparative analysis of two concurrency paradigms in modern Java applications: reactive programming and Java virtual threads. Traditional operating system threads consume excessive resources under high concurrency, which has driven the adoption of non-blocking, event-driven frameworks such as Spring WebFlux, as well as lightweight JVM-managed virtual threads introduced as part of Project Loom in Java 21. While prior research highlights the benefits of both approaches, direct empirical comparisons under controlled conditions remain limited. To address this gap, this study evaluates the performance, scalability, and resource utilization of both paradigms through controlled experiments conducted on the Google Cloud Platform. The analysis investigates their behaviour under varying levels of concurrent load and examines the impact of different CPU and memory configurations on system efficiency. The results aim to support developers and architects in selecting appropriate concurrency models for Java applications.

Keywords:

Virtual threads, Spring WebFlux, Concurrency, Java 21

Sustainable Development Goals (SDG)

  • 9 - Industry, Innovation, Technology and Infrastructure

References

Article Details

Charlak, D., Brzeziński, J., & Kozieł, G. (2026). Comparative analysis of reactive programming and Java virtual threads. Journal of Computer Sciences Institute, 39, 154–160. https://doi.org/10.35784/jcsi.9409