OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.16k stars 599 forks source link

JakartaEE: Transformer: Design: Dynamic Application Transformation #12091

Open njr-11 opened 4 years ago

njr-11 commented 4 years ago

Description

Transforming application classes and XML and other metadata. Either on-demand, or at server or application startup. Requires a transformation mechanism. Also requires a mechanism to detect and direct application transformation. Possibly requires caching mechanisms. A primary impact is to application classloaders, which would use the existing transformer tool to rewrite bytecodes and metadata. A second primary impact is to access to metadata through the Liberty artifact file system, which would need to be similarly intercepted and transformed. JakartaEE transformations are the primary use case (https://github.com/eclipse/transformer). JAX-RPC to JAX-WS transformation is a possible use case (https://www.ibm.com/docs/en/was-liberty/base?topic=liberty-migrating-jax-rpc-applications).


Documents

When available, add links to required feature documents. Use "N/A" to mark particular documents which are not required by the feature.

General Instructions

The process steps occur roughly in the order as presented. Process steps occasionally overlap. If unsure

Each process step has a number of tasks which must be completed or must be marked as not applicable ("N/A").

Unless otherwise indicated, the tasks are the responsibility of the Feature Owner or a Delegate of the Feature Owner.

If you need assistance, check out the Feature and UFO (WAD) Approval Process wiki, or reach out to the (OpenLiberty/release-architect).

Important: Labels are used to trigger particular steps and must be added as indicated.


Prioritization (Complete Before Development Starts)

The (OpenLiberty/chief-architect) and area leads are responsible for prioritizing the features and determining which features are being actively worked on.

Prioritization

Design preliminaries determine whether a formal design, which will be provided by an Upcoming Feature Overview (UFO) document, must be created and reviewed. A formal design is required if the feature requires any of the following: UI, Serviceability, SVT, Performance testing, or non-trivial documentation/ID.

Design Preliminaries

Design

No Design

FAT Documentation

A feature must be prioritized and socialized (or No Design Approved) before any implementation work may begin and is the minimum before any beta code may be delivered. All new Liberty content must be inaccessible in our GA releases until it is Feature Complete by either marking it kind=noship or beta fencing it.
Code may not GA until this feature has obtained the "Design Approved" or "No Design Approved" label, along with all other tasks outlines in GA section.

Feature Development Begins

Legal and Translation

In order to avoid last minute blockers and significant disruptions to the feature, the legal items need to be done as early in the feature process as possible, either in design or as early into the development as possible. Similarly, translation is to be done concurrently with development. Both MUST be completed before GA is requested.

Legal (Complete before Feature Complete Date)

Translation (Complete 1 week before Feature Complete Date)

A feature is ready to GA after it is Feature Complete and has obtained all necessary Focal Point Approvals.

Feature Complete

Focal Point Approvals (Complete by Feature Complete Date)

These occur only after GA of this feature is requested (by adding a target:ga label). GA of this feature may not occur until all approvals are obtained.

All Features

Design Approved Features

Post GA

Design considerations

I'm updating this story to cover the broader question of how we should be handling application transformation. Detecting the feature set of an application and automatically transforming the application is one of several scenarios of interest.

Design questions included in the design space:

What is our target scenario:

What application elements should be transformed?

What do we mean by "dynamic"?


User story: "As an existing user of Java EE, I expect to transform my applications to Jakarta without including special configuration for transformation of deployment descriptors."

Deployment descriptors (web.xml, ejb-jar.xml, application.xml), as well as the types of resources that can be included within the resource references and other entries within them, are well-defined within the Java EE/Jakarta specifications and therefore users will expect these to transform seamlessly out of the box without any special additional configuration or settings. The transformer ought to do this automatically.

Currently, to accomplish this, (as shown under #12080) I had to ask people who worked on the tool, who were able to direct me to modify and create special properties files for the transformer before it would process the xml files and make conversions within them: dev/wlp-jakartaee-transform/rules/jakarta-xml-master.properties dev/wlp-jakartaee-transform/rules/jakarta-web.properties

I cannot see any good reason why end users ought to ever have to even think about this sort of detail or take steps like this. It should just happen automatically based on built-in knowledge of what is spelled out by the Jakarta/Java EE specifications around deployment descriptors and equivalent packages.

njr-11 commented 4 years ago

Copying @tkburroughs for awareness