In what could be a significant step forward in expanding Java's utility and reach, a proposal named Project Babylon has been introduced in OpenJDK to extend Java's integration to unconventional programming models such as GPUs, machine learning models, SQL, and differential programming.
This bold proposition was brought into the lime-light by Paul Sandoz, an architect at Oracle, who introduced it to the openjdk.org mailing list on September 6. Backing up this initiative, Project Babylon aims to improve reflective programming in Java, also known as code reflection. The goal is to standardize access, analyze, and transform Java code, which has been a known pain point. Once realized, the enhancement would allow the implementation of any foreign programming model as a Java library.
Notably, Project Babylon targets to make code reflection suitable by developing a GPU programming model for Java. This model would harness code reflection's advantages and be executed as a Java library. To avoid any potential bias, the project would also explore other programming models like SQL and differential programming.
Explaining the working of Babylon, Sandoz illustrated an instance where a developer wishes to write a GPU kernel in Java and then operate it on a GPU. The developer's code needs to be analyzed and transformed into a viable GPU kernel. While a Java library could manage this, it requires access to the Java code in symbolic form. The present system limits such access to non-standard APIs or conventions at various stages of the program's lifecycle, like compile time or run time. Besides, the available symbolic forms (bytecodes or abstract syntax trees) often don't support proper analysis and transformation.
The proposal envisions Project Babylon's execution over time, packaged into a series of JDK Enhancement Proposals (JEP) extending over multiple feature releases. As a starting point, the code reflection would be cloned from the mainline release of JDK 22, set to launch in March 2024. Henceforth, it will adhere to the mainline releases.
In the context of the GPU programming model, the squad behind Babylon would create an isolated repository reliant on the code reflection attributes as they get developed. Presently, there is no plan to incorporate the GPU programming model into the JDK. However, the ongoing work could identify potential JDK features and enhancements that could be dealt with in the future.
While this initiative paves the way for extending Java's functionality, platforms like AppMaster are already provident in aiding developers with simplified backend, web and mobile applications. These no-code platforms expedite the development process while the likes of Project Babylon are seeking ways to enhance compatibility and functionality.