Evaluation of Virtual Threads and RxJava : A performance and code complexity analysis in a real-time clearing system

This thesis evaluates the trade-offs between Java virtual threads and RxJava in the context of a real-time clearing system. As Java’s concurrency model evolves with the introduction of virtual threads in Project Loom, traditional reactive libraries like RxJava face renewed scrutiny. This thesis compares the two paradigms in terms of performance (latency, throughput, and resource usage) and code complexity, using measurable metrics such as cyclomatic and cognitive complexity. Through empirical testing in a production-grade system, results indicate that virtual threads outperform RxJava in scenarios involving high concurrency and blocking I/O, with significantly lower resource consumption. However, in hybrid use cases and optimised reactive contexts, RxJava maintains a performance edge. This study provides actionable insights into when and how to adopt virtual threads in enterprise Java applications and highlights areas for further research into structured concurrency and tooling support.

Publication Details

Journal
DiVA at Umeå University (Umeå University)
Published
2025-01-01
Primary Topic
Real-Time Systems Scheduling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Evaluation of Virtual Threads and RxJava : A performance and code complexity analysis in a real-time clearing system

DiVA at Umeå University (Umeå University)
Real-Time Systems Scheduling
article

Evaluation of Virtual Threads and RxJava : A performance and code complexity analysis in a real-time clearing system

article en

Abstract

This thesis evaluates the trade-offs between Java virtual threads and RxJava in the context of a real-time clearing system. As Java’s concurrency model evolves with the introduction of virtual threads in Project Loom, traditional reactive libraries like RxJava face renewed scrutiny. This thesis compares the two paradigms in terms of performance (latency, throughput, and resource usage) and code complexity, using measurable metrics such as cyclomatic and cognitive complexity. Through empirical testing in a production-grade system, results indicate that virtual threads outperform RxJava in scenarios involving high concurrency and blocking I/O, with significantly lower resource consumption. However, in hybrid use cases and optimised reactive contexts, RxJava maintains a performance edge. This study provides actionable insights into when and how to adopt virtual threads in enterprise Java applications and highlights areas for further research into structured concurrency and tooling support.

DiVA at Umeå University (Umeå University)
Decent work and economic growth
Openalex Percentile: Top 44%
Real-Time Systems Scheduling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.