The CN4J profile as the common EE and MP profile - a proposal

The Java EE platform was moved a while ago to become the Jakarta EE platform. At about the same time, a group of Java EE vendors split off and started MicroProfile; a platform that initially only contained a number of Java EE APIs, but was later on extended with APIs that were originally planned for Java EE 8 (such as Config, Health, and JWT).

With MicroProfile and Jakarta EE now both at Eclipse, and both including approximately all of the same vendors again, there has been an increasing demand for somehow joining the efforts. We asked about this in our recent survey, where most repsondends would like to see them aligned.

This begs the question of how to do this exactly. MicroProfile is already using Jakarta EE APIs, and there's a strong desire to use MicroProfile Config in Jakarta EE. This would result in a circular dependency though, which is, perhaps, not ideal. One option in software engineering to break circular dependencies is to factor out the common dependencies into a new, shared, module.

Factoring out the Jakarta APIs that MicroProfile uses, and the MicroProfile API that Jakarta wants to use, would paint a picture such as this:

CN4J Profile
At the top we see the CN4J profile, where CN4J stands for Cloud Native for Java. This is the name of the alliance created to align MicroProfile. All the APIs in this profile would take into consideration that they are used by both MicroProfile and Jakarta EE, and hence would evolve accordingly.

To the left we see the current MicroProfile APIs that are part of the MicroProfile platform, and are all exclusive to MicroProfile. Similarly to the right we see a selection of the Jakarta EE Web Profile APIs (some dependencies of several APIs, such as Authentication and Interceptors are left out).

In the future some additional APIs could move to the CN4J profile, but obviously this should not be too many. At the moment Jakarta Security is a candidate (in practice, @RolesAllowed/JWT is not rarely based on Jakarta Security).

Do note that the above is a personal proposal, and while discussed, is in no way endorsed by either the MicroProfile or Jakarta EE working groups, or the CN4J alliance. It's intended as an idea to base further discussion on.

Arjan Tijms


Popular posts from this blog

Jakarta EE Survey 2022

Implementing container authentication in Java EE with JASPIC

Counting the rows returned from a JPA query