To develop a high performant web service in Java, Reactive WebFlux has previously been utilized as the only alternative. With the introduction of virtual threads in Java 19, it has been considered that it would be an alternative to the current provided option. This paper presents the performance difference between Spring applications powered by normal threads, virtual threads, and its reactive counterpart Reactive WebFlux. The tests were done by creating three prototypes, which were used to call an endpoint with a set delay time and increasing the number of requests per second until system failure. The results show that the virtual threaded prototypes performed slightly better than the reactive prototype. The question remains whether the Reac- tive WebFlux application using the most optimal web server produces a different re- sult, as well as future research on how virtual threads perform with database usage. ; För att utveckla högpresterande webbtjänster i Java har Reactive WebFlux varit det främsta alternativet. Med introduktionen av virtuella trådar i Java 19 har spekulerats kunna ersätta reaktiva webbtjänster. Detta arbete presenterar prestandaskillnaden mellan Spring-applikationer som drivs av normala trådar, virtuella trådar och dess reaktiva motsvarighet Reactive WebFlux. Testerna utfördes genom att skapa tre pro- totyper, som användes för att anropa en slutpunkt med en satt fördröjningstid och öka antalet förfrågningar per sekund fram till systemfel. Resultaten visade att proto- typen med virtuella trådar presterade något bättre än den reaktiva prototypen. Där- emot är det ännu oklart om Reactive WebFlux-applikationen med en optimal webb- server skulle producera ett annat resultat. Dessutom skulle det vara intressant för framtida forskning om hur virtuella trådar fungerar med databasanvändning.


    Access

    Download


    Export, share and cite



    Title :

    Comparing Virtual Threads and Reactive Webflux in Spring : A Comparative Performance Analysis of Concurrency Solutions in Spring ; Jämförelse av virtuella trådar och Reactive WebFlux i Spring : En jämförande analys av lösningar för samtidighet i Spring


    Contributors:

    Publication date :

    2023-01-01


    Type of media :

    Theses


    Type of material :

    Electronic Resource


    Language :

    English



    Classification :

    DDC:    629



    Spring lock for secondary spring

    KREUZWEGER DAVID | European Patent Office | 2019

    Free access

    SPRING LOCK FOR SECONDARY SPRING

    KREUZWEGER DAVID | European Patent Office | 2020

    Free access

    Comparing Fundamentals of Spring Suspensions

    FAHNESTOCK, MURRAY / HENDRICKSON, N. E. | SAE Technical Papers | 1949


    SPRING PAD FOR SUSPENSION SPRING

    LIM MAN SEUNG / KIM HA YUN / JEON BONG SOO et al. | European Patent Office | 2015

    Free access

    Spring

    OGISO HIROYUKI / NONO KAZUYOSHI / NAKAZAWA YUICHI et al. | European Patent Office | 2023

    Free access