What is the Core Profile?
The Jakarta EE specifications have already two profiles, the Full profile, and the Web profile. The Web Profile contains a set of specifications that are geared toward the typical Web Applications. It groups the typical Web Application specifications like Servlet, REST, JSON, JPA, Faces, Security, etc …
The Full profile contains all the Java Enterprise specifications and adds to the above list specifications like WebServices, Messaging, the full EJB specification, connectors, etc …
But the trend in the last years is, mainly due to the move to the cloud, to have smaller runtimes that only need a limited set of specifications.
The MicroProfile specifications are built on top of a limited set of Jakarta specifications, JAX-RS, CDI, JSON-P, and JSON-B.
MicroProfile, although many specifications are useful in all architectural cases, has a focus on microservices and smaller runtime. This has led to the idea to have a specific profile within Jakarta EE that groups a, specific adapted set of specifications in a Core Profile.
The goal of the profile is defined as (see here https://jakarta.ee/specifications/coreprofile/10/)
To provide a profile that contains a set of Jakarta EE Specifications targeting smaller runtimes suitable for microservices and ahead-of-time compilation.
Which specifications?
The idea, since the Core profile is not yet available, is to combine the following specifications
- Jakarta Servlet
- Jakarta REST (JAX-RS)
- Jakarta CDI lite
- Jakarta JSON-P
- Jakarta JSON-B
- Jakarta Configuration
The CDI lite specification focuses around using build-time Compatible Extensions so that the runtime can be used in Ahead-of-time compilation scenarios like GraalVM. When there are no runtime discovery features and everything is known at compile-time, it makes the native compilation much easier.
The Jakarta Configuration specification will be based on the current MicroProfile Configuration specification and is hopefully, after several attempts to standardise this within Java Enterprise, finally available.
What is Atbash Runtime?
The Core Profile is not yet available and will not be available in May 2022, the expected release date of Jakarta EE 10. Mainly because the Jakarta Configuration specification is not ready yet, and the work related to Jakarta EE 10 took more time so there was not enough time available to perform some work around this new Profile.
The idea of Jakarta specifications is also that it is based on some experience and not only on some theoretical assumptions. That was the basis of my idea to create a runtime that contains the specifications of the Core Profile.
The work started some 6 months ago in my spare time and the goal was to create a runtime that combines the mentioned specifications. At that time, only Jakarta EE 9.1 was available. So the current version of Atbash Runtime, version 0.3, is based on
- Jakarta Servlet 5.0
- Jakarta CDI 3.0
- Jakarta REST 3.0
- Jakarta JSON-P 2.0
- Jakarta JSON-B 2.0
- MicroProfile Config 3.0
And it combines the following frameworks
- Jetty 11.0.8
- Jersey 3.0.4
- Weld 4.0.3
- Jackson Databind 2.13.1
- Custom implementation of MicroProfile Config based on SmallRye Config.
How can I try it out?
First of all, you can download the zip file to install the runtime from this download URL. It is only 13.3 Mb in size.
Unzip this into a directory of your choice. It will create several JAR files in a directory structure.
Start your application with
java -jar atbash-runtime.jar path-to/application.war
And the application is available on port 8080 (default, can be changed by command line parameter). The runtime is built with JDK 11 and tested on JDK 11, 17, and 18.
Besides this instance mode, there is also a domain mode so that you can remotely access the runtime to, for example, deploy applications on a running process.
It has a modular structure that will be explored more in future versions and has typical extras like an embedded mode, Arquillian adaptor, Docker image, and integration testing framework based on TestContainers.
You can read more about them in the user guide.
What is next?
The following ideas are on my table to experiment more with this runtime and the idea of a Core Profile Runtime
- Upgrade to the Jakarta EE 10 versions of the specifications now that they become available.
- Add security like the MicroProfile JWT specification.
- Add some data access including the fast Java-native object graph persistence provided by MicroStream.
And of course, your ideas and feedback are valuable for the realisation of the Core profile with Jakarta EE.
Enjoy.