{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T01:36:04Z","timestamp":1760060164904,"version":"build-2065373602"},"reference-count":51,"publisher":"MDPI AG","issue":"3","license":[{"start":{"date-parts":[[2025,8,13]],"date-time":"2025-08-13T00:00:00Z","timestamp":1755043200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Software"],"abstract":"<jats:p>Modern web applications increasingly demand rendering techniques that optimize performance, responsiveness, and scalability. Progressive Server-Side Rendering (PSSR) bridges the gap between Server-Side Rendering and Client-Side Rendering by progressively streaming HTML content, improving perceived load times. Still, traditional HTML template engines often rely on blocking interfaces that hinder their use in asynchronous, non-blocking contexts required for PSSR. This paper analyzes how Java virtual threads, introduced in Java 21, enable non-blocking execution of blocking I\/O operations, allowing the reuse of traditional template engines for PSSR without complex asynchronous programming models. We benchmark multiple engines across Spring WebFlux, Spring MVC, and Quarkus using reactive, suspendable, and virtual thread-based approaches. Results show that virtual threads allow blocking engines to scale comparably to those designed for non-blocking I\/O, achieving high throughput and responsiveness under load. This demonstrates that virtual threads provide a compelling path to simplify the implementation of PSSR with familiar HTML templates, significantly lowering the barrier to entry while maintaining performance.<\/jats:p>","DOI":"10.3390\/software4030020","type":"journal-article","created":{"date-parts":[[2025,8,13]],"date-time":"2025-08-13T07:45:31Z","timestamp":1755071131000},"page":"20","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Enabling Progressive Server-Side Rendering for Traditional Web Template Engines with Java Virtual Threads"],"prefix":"10.3390","volume":"4","author":[{"ORCID":"https:\/\/orcid.org\/0009-0009-1863-3782","authenticated-orcid":false,"given":"Bernardo","family":"Pereira","sequence":"first","affiliation":[{"name":"Instituto Superior de Engenharia de Lisboa (ISEL), Polytechnical Institute of Lisbon, 1959-007 Lisbon, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4281-3195","authenticated-orcid":false,"given":"Fernando Miguel","family":"Carvalho","sequence":"additional","affiliation":[{"name":"Instituto Superior de Engenharia de Lisboa (ISEL), Polytechnical Institute of Lisbon, 1959-007 Lisbon, Portugal"}]}],"member":"1968","published-online":{"date-parts":[[2025,8,13]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Edgar, M. (2024). First Contentful Paint. Speed Metrics Guide: Choosing the Right Metrics to Use When Evaluating Websites, Apress.","DOI":"10.1007\/979-8-8688-0155-6"},{"key":"ref_2","unstructured":"Barhamgi, M., Wang, H., and Wang, X. (2025). Progressive Server-Side Rendering with Suspendable Web Templates. Web Information Systems Engineering\u2014WISE 2024, Springer."},{"key":"ref_3","unstructured":"Elmeleegy, K., Chanda, A., Cox, A.L., and Zwaenepoel, W. (\u20132, January 27). Lazy Asynchronous I\/O for Event-Driven Servers. Proceedings of the Annual Conference on USENIX Annual Technical Conference, ATEC \u201904, Boston, MA, USA."},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Carvalho, F.M., and Fialho, P. (2023, January 15\u201317). Enhancing SSR in Low-Thread Web Servers: A Comprehensive Approach for Progressive Server-Side Rendering with Any Asynchronous API and Multiple Data Models. Proceedings of the 19th International Conference on Web Information Systems and Technologies, WEBIST \u201923, Rome, Italy.","DOI":"10.5220\/0012165300003584"},{"key":"ref_5","unstructured":"Carvalho, F.M. (2025, May 29). HtmlFlow Java DSL toWrite Typesafe HTML. Technical Report. Available online: https:\/\/htmlflow.org\/."},{"key":"ref_6","unstructured":"Fern\u00e1ndez, D. (2025, May 29). Thymeleaf. Technical Report. Available online: https:\/\/www.thymeleaf.org\/."},{"key":"ref_7","unstructured":"Fowler, M. (2010). Domain Specific Languages, Addison-Wesley Professional."},{"key":"ref_8","unstructured":"Fowler, M. (2002). Patterns of Enterprise Application Architecture, Addison-Wesley Longman Publishing Co., Inc."},{"key":"ref_9","unstructured":"Alur, D., Malks, D., and Crupi, J. (2001). Core J2EE Patterns: Best Practices and Design Strategies, Prentice Hall PTR."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Parr, T.J. (2004, January 17\u201320). Enforcing Strict Model-View Separation in Template Engines. Proceedings of the 13th International Conference on World Wide Web, WWW \u201904, New York, NY, USA.","DOI":"10.1145\/988672.988703"},{"key":"ref_11","first-page":"26","article-title":"A Description of the Model-View-Controller User Interface Paradigm in the Smalltalk80 System","volume":"1","author":"Krasner","year":"1988","journal-title":"J. Object-Oriented Program."},{"key":"ref_12","unstructured":"Netflix, Pivotal, Red Hat, Oracle, Twitter, and Lightbend (2025, May 29). Reactive Streams Specification. Technical Report. Available online: https:\/\/www.reactive-streams.org\/."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"157","DOI":"10.1145\/365230.365257","article-title":"The next 700 programming languages","volume":"9","author":"Landin","year":"1966","journal-title":"Commun. ACM"},{"key":"ref_14","unstructured":"Evans, E., and Fowler, M. (2004). Domain-Driven Design: Tackling Complexity in the Heart of Software, Addison-Wesley."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"419","DOI":"10.1145\/363347.363387","article-title":"Programming Techniques: Regular Expression Search Algorithm","volume":"11","author":"Thompson","year":"1968","journal-title":"Commun. ACM"},{"key":"ref_16","unstructured":"Resig, J. (2007). Pro JavaScript Techniques, Apress."},{"key":"ref_17","unstructured":"Hors, A.L., H\u00e9garet, P.L., Wood, L., Nicol, G., Robie, J., Champion, M., and Byrne, S. (2025, May 29). Document Object Model (DOM) Level 3 Core Specification. Technical Report. Available online: https:\/\/www.w3.org\/TR\/2004\/REC-DOM-Level-3-Core-20040407\/."},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Carvalho, F.M., Duarte, L., and Gouesse, J. (2020). Text Web Templates Considered Harmful. Lecture Notes in Business Information Processing, Springer.","DOI":"10.1007\/978-3-030-61750-9_4"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"89","DOI":"10.1145\/363744.363749","article-title":"Correspondence Between ALGOL 60 and Church\u2019s Lambda-notation: Part I","volume":"8","author":"Landin","year":"1965","journal-title":"Commun. ACM"},{"key":"ref_20","unstructured":"Sussman, G., and Steele, G. (1975). Scheme: An Interpreter for Extended Lambda Calculus, MIT Artificial Intelligence Laboratory. AI Memo No. 349."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"289","DOI":"10.1109\/TC.1978.1675100","article-title":"Aspects of Applicative Programming for Parallel Processing","volume":"C-27","author":"Friedman","year":"1978","journal-title":"IEEE Trans. Comput."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Rocha, R., and Launchbury, J. (2011). The F# Asynchronous Programming Model. Practical Aspects of Declarative Languages, Springer.","DOI":"10.1007\/978-3-642-18378-2"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Elizarov, R., Belyaev, M., Akhin, M., and Usmanov, I. (2021, January 20\u201322). Kotlin coroutines: Design and implementation. Proceedings of the 2021 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Chicago, IL, USA.","DOI":"10.1145\/3486607.3486751"},{"key":"ref_24","unstructured":"Meijer, E. (2009, January 16\u201324). Democratizing the Cloud with the .NET Reactive Framework Rx. Proceedings of the Internaional Softare Development Conference, Vancouver, BC, Canada. Available online: https:\/\/qconsf.com\/sf2009\/sf2009\/speaker\/Erik+Meijer.html."},{"key":"ref_25","unstructured":"RxJava Contributors (2025, May 29). RX Java. Technical Report. Available online: https:\/\/github.com\/ReactiveX\/RxJava."},{"key":"ref_26","unstructured":"VMWare, and Contributors (2025, May 29). Project Reactor. Technical Report. Available online: https:\/\/projectreactor.io\/."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Davis, A.L. (2019). Akka HTTP and Streams. Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams, Apress.","DOI":"10.1007\/978-1-4842-4176-9"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Ponge, J., Navarro, A., Escoffier, C., and Le Mou\u00ebl, F. (2021, January 18). Analysing the performance and costs of reactive programming libraries in Java. Proceedings of the 8th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems, REBLS 2021, New York, NY, USA.","DOI":"10.1145\/3486605.3486788"},{"key":"ref_29","unstructured":"Breslav, A. (2025, May 29). Kotlin Language Documentation. Technical Report. Available online: https:\/\/kotlinlang.org\/docs\/kotlin-docs.pdf."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Vogel, L., and Springer, T. (2022, January 5\u20138). User Acceptance of Modified Web Page Loading Based on Progressive Streaming. Proceedings of the International Conference on Web Engineering, Bari, Italy.","DOI":"10.1007\/978-3-031-09917-5_27"},{"key":"ref_31","unstructured":"Atwood, J. (2025, May 29). The Lost Art of Progressive HTML Rendering. Technical Report. Available online: https:\/\/blog.codinghorror.com\/the-lost-art-of-progressive-html-rendering\/."},{"key":"ref_32","unstructured":"Farago, J., Williams, H., Walsh, J., Whyte, N., Goel, K., and Fung, P. (2007). Object Search UI and Dragging Object Results. (Applications 11\/353,787), US Patent."},{"key":"ref_33","unstructured":"Schiller, S. (2007). Progressive Loading. (Applications 11\/364,992), US Patent."},{"key":"ref_34","unstructured":"Von Behren, R., Condit, J., and Brewer, E. (2003, January 18\u201321). Why Events Are a Bad Idea (for {High-Concurrency} Servers). Proceedings of the 9th Workshop on Hot Topics in Operating Systems (HotOS IX), Lihue, HI, USA."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Kambona, K., Boix, E.G., and De Meuter, W. (2013, January 1\u20135). An Evaluation of Reactive Programming and Promises for Structuring Collaborative Web Applications. Proceedings of the 7th Workshop on Dynamic Languages and Applications, DYLA \u201913, New York, NY, USA.","DOI":"10.1145\/2489798.2489802"},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1145\/362883.362891","article-title":"Scalable Internet servers: Issues and challenges","volume":"28","author":"Kant","year":"2000","journal-title":"ACM SIGMETRICS Perform. Eval. Rev."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"20.20","DOI":"10.1145\/2168796.2169076","article-title":"Your Mouse is a Database","volume":"10","author":"Meijer","year":"2012","journal-title":"Queue"},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"59","DOI":"10.1016\/j.bdr.2015.01.006","article-title":"Significance and Challenges of Big Data Research","volume":"2","author":"Jin","year":"2015","journal-title":"Big Data Res."},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3379483","article-title":"User-Level Threading: Have Your Cake and Eat It Too","volume":"4","author":"Karsten","year":"2020","journal-title":"Proc. ACM Meas. Anal. Comput. Syst."},{"key":"ref_40","unstructured":"Burke, B. (2013). RESTful Java with JAX-RS 2.0: Designing and Developing Distributed Web Services, O\u2019Reilly Media, Inc."},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"Haynes, C.T., Friedman, D.P., and Wand, M. (1984, January 5\u20138). Continuations and Coroutines. Proceedings of the 1984 ACM Symposium on LISP and Functional Programming, LFP \u201984, Austin, TX, USA.","DOI":"10.1145\/800055.802046"},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Veen, R., and Vlijmincx, D. (2024). Scoped Values. Virtual Threads, Structured Concurrency, and Scoped Values: Explore Java\u2019s New Threading Model, Apress.","DOI":"10.1007\/979-8-8688-0500-4"},{"key":"ref_43","unstructured":"(2009). Model-View-Controller Pattern. Learn Objective-C for Java Developers, Apress."},{"key":"ref_44","unstructured":"B\u00f6secke, M. (2025, May 29). JMH Benchmark of the Most Popular Java Template Engines. Technical Report. Available online: https:\/\/github.com\/mbosecke\/template-benchmark."},{"key":"ref_45","unstructured":"Reijn, J. (2025, May 29). Comparing Template Engines for Spring MVC. Technical Report. Available online: https:\/\/github.com\/jreijn\/spring-comparing-template-engines."},{"key":"ref_46","doi-asserted-by":"crossref","unstructured":"Beroni\u0107, D., Modri\u0107, L., Mihaljevi\u0107, B., and Radovan, A. (2022, January 23\u201327). Comparison of Structured Concurrency Constructs in Java and Kotlin\u2014Virtual Threads and Coroutines. Proceedings of the 2022 45th Jubilee International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia.","DOI":"10.23919\/MIPRO55190.2022.9803765"},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Navarro, A., Ponge, J., Le Mou\u00ebl, F., and Escoffier, C. (2023, January 27\u201330). Considerations for integrating virtual threads in a Java framework: A Quarkus example in a resource-constrained environment. Proceedings of the 17th ACM International Conference on Distributed and Event-Based Systems, Neuchatel, Switzerland.","DOI":"10.1145\/3583678.3596895"},{"key":"ref_48","unstructured":"Fox, T. (2025, May 29). Eclipse Vert.xTM Reactive Applications on the JVM. Technical Report. Available online: https:\/\/vertx.io\/."},{"key":"ref_49","unstructured":"Maurer, N., and Wolfthal, M. (2015). Netty in Action, Manning Publications."},{"key":"ref_50","unstructured":"\u0160imatovi\u0107, M., Markulin, H., Beroni\u0107, D., and Mihaljevi\u0107, B. (2025, January 2\u20136). Evaluating Memory Management and Garbage Collection Algorithms with Virtual Threads in High-Concurrency Java Applications. Proceedings of the 48th ICT and Electronics Convention MIPRO 2025. Rijeka: Croatian Society for Information, Communication and Electronic Technology\u2013MIPRO, Opatija, Croatia."},{"key":"ref_51","doi-asserted-by":"crossref","unstructured":"Deinum, M., and Cosmina, I. (2021). Building Reactive Applications with SpringWebFlux. Pro Spring MVC withWebFlux: Web Development in Spring Framework 5 and Spring Boot 2, Apress.","DOI":"10.1007\/978-1-4842-5666-4"}],"container-title":["Software"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2674-113X\/4\/3\/20\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T18:26:09Z","timestamp":1760034369000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2674-113X\/4\/3\/20"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,8,13]]},"references-count":51,"journal-issue":{"issue":"3","published-online":{"date-parts":[[2025,9]]}},"alternative-id":["software4030020"],"URL":"https:\/\/doi.org\/10.3390\/software4030020","relation":{},"ISSN":["2674-113X"],"issn-type":[{"type":"electronic","value":"2674-113X"}],"subject":[],"published":{"date-parts":[[2025,8,13]]}}}