- 61 views
- 72 downloads
Automatic Migration of Java Platform Threads to Virtual Threads
-
- Author / Creator
- Hewage, Nipuni T.
-
Language features are inevitable in any programming language. Language maintainers introduce new language features and enhancements to existing features with their releases. For example, Virtual threads emerged as a preview feature with the Java 19 release under project Loom. Developers may need to migrate traditional thread usages with virtual threads. However, migrating to new language features is not easy. It consumes time and resources because it may require a steep learning curve to understand the required migration process. Developers may also be concerned about the after-effects of the migration, mostly on the performance of the application.
Several studies have focused on mining refactoring patterns and automatic migrations in different scenarios such as in the modification of libraries, and frameworks. We found out that those studies do not align with the requirements of Loom migration because we do not have sufficient historical usage in open-source repositories and proper documentation along with source code. In this thesis, we present Loomizer, a transformation tool that is capable of migrating traditional thread usages in a Java application to virtual threads. Loomizer is based on Rascal. We apply Loomizer on various application servers such as Open Liberty, Tomcat, Wildfly, and Undertow.
We demonstrate an empirical evaluation focusing on the performance changes, specifically throughput, on those application servers after migration. We find that the throughput improvement with virtual threads is not always noticeable. In the presence of entirely blocking operations in the application deployed on the servers, we observe throughput improvement and deterioration with different delays in the blocking operations compared to the servers before migration. Additionally, the presence of CPU-consuming operations and blocking operations in the application limits the throughput improvement with virtual threads in all the application servers except in Open Liberty. We discover that throughput improvement with virtual threads also depends on the application server, the type of the application (whether IO-bound or CPUbound), the expected workload, and the delay in the blocking operations in the application. -
- Subjects / Keywords
-
- Graduation date
- Fall 2024
-
- Type of Item
- Thesis
-
- Degree
- Master of Science
-
- License
- This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law.