Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFLY-19872] Full Support for MicroProfile LRA #651

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 172 additions & 0 deletions transactions/WFLY-19872-full-support-microprofile-lra.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
---
// Add any category for this proposal as a yaml list, e.g.
// - core
// - management
// if missing, add it to _data/wildfly-categories and use its id
categories:
- transactions
- microprofile
- lra
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this last one; it's not a category in https://github.com/wildfly/wildfly-proposals/blob/main/_data/wildfly-categories.yaml and IMO is too fine-grained to become one.


// Specify the stability level of the feature.
// Values can be one of: experimental preview community default
stability-level: default
// Specify the Feature Development tracker issue for the feature.
// This must be an issue tracked in https://github.com/orgs/wildfly/projects/7/views/1.
// To create a Feature Development tracker issue, go to https://github.com/wildfly/wildfly-proposals/issues/new/choose
// and select 'Feature Development'
issue: https://github.com/wildfly/wildfly-proposals/issues/650
// Provide the github ids of the members of the feature team, organized by role.
// Provide a single id for the 'assignee' role. Use a yaml list for the 'sme' and
// 'outside-perspective' roles, even if there is only one person in a role.
feature-team:
developer: marcosgopen
sme:
-
outside-perspective:
-
// If this issue tracks the promotion to a higher stability level of a previously
// completed feature, provide the URL of the https://github.com/wildfly/wildfly-proposals/issues
// issue that was used to track the previous feature.
promotes: https://issues.redhat.com/browse/WFLY-14869
// This should be blank during initial development of a feature. It may be used
// after the feature is completed if a subsequent issue is field to track promotion
// of this feature to a higher stability level
promoted-by:
---

= Full support for MicroProfile LRA
:author: Marco Sappe Griot
:email: [email protected]
:toc: left
:icons: font
:idprefix:
:idseparator: -
:keywords: transaction, saga, lra, microprofile

== Overview

The goal of this RFE is providing the Galleon layers for WildFly feature pack which integrate the
https://github.com/jbosstm/narayana/tree/main/rts/lra[Narayana implementation] of the
https://github.com/eclipse/microprofile-lra[MicroProfile LRA specification].

The MicroProfile LRA is a transaction processing pattern well suited for microservice development based on the saga
pattern. The motivation of such processing is summarized in the
https://github.com/eclipse/microprofile-lra/blob/1.0/README.adoc#motivation[MicroProfile Spec readme].

=== User Stories

Users can implement Saga Pattern for their enterprise applications with Microprofile LRA


== Issue Metadata

=== Related Issues

* https://issues.redhat.com/browse/WFLY-19872
* https://issues.redhat.com/browse/EAP7-2221


=== Affected Projects or Components

* Transactions
* WildFly

=== Other Interested Projects

* MicroProfile
* Galleon
* WildFly Operator

=== Relevant Installation Types

* [x] Traditional standalone server (unzipped or provisioned by Galleon)
* [x] Managed domain
* [x] OpenShift s2i
* [x] Bootable jar

== Requirements

=== Hard Requirements

The feature will integrate the LRA specification into the WildFly feature pack as two new extensions (one for LRA coordinator and one for LRA participant) together with two new subsystems and Galleon layers accordingly.
The Galleon layers will be available for provisioning.
The provisioned layers will provide all functionality defined in LRA specification for users in WildFly.

The integrations will consist of two separate subsystems - microprofile-lra-coordinator and microprofile-lra-participant) and two separate extensions - org.wildfly.extension.microprofile.lra-coordinator and org.wildfly.extension.microprofile.lra-participant.

The first layer provides a capability of the LRA participant - bundling the Narayana client library capable
to parse the annotations from LRA specification and work with JAX-RS and non-JAX-RS bindings.

The second layer provides the capability of the LRA coordinator - a server which provides HTTP endpoints where
applications may register as participants which the coordinator then calls back (via HTTP calls) when LRA finishes.

The feature pack implementation will be placed amongst other MicroProfile WildFly subsystems under
https://github.com/wildfly/wildfly/tree/main/microprofile[the WildFly GitHub repository].

Both subsystems are optional to allow for exclusion during provisioning.

The LRA layers will be dependent on the `transactions` subsystem. The LRA uses the same object store types
as the JTA/JTS transaction uses, it requires the recovery manager thread to be running and requires transaction
specifics like unique node-identifier per running application server (WildFly).

As said before the LRA coordinator is based on the Narayana core (`transactions` subsystem within WildFly). The LRA records and JTA records share the same storage and recovery processing.

LRA code needs to be broken out of jbosstm/narayana or at least the jbosstm/narayana project needs to be able to release narayana-lra independently of the rest of the build to ensure that there is not a coupling between base EAP and XP


=== Nice-to-Have Requirements

Create a quickstart on LRA on how to use LRA with WildFly for https://github.com/wildfly/quickstart.

LRA records could be listed under `/subsystem=transactions/log-store=log-store/lras=...`
and the operations (e.g. a need for probing) will be consistent to what was developed for JTA transaction types
under `/subsystem=transactions/log-store=log-store/transactions=...`. This is optional, because the LRA Coordinator REST interface already provides this information.

=== Non-Requirements

NONE

=== Future Work

== Backwards Compatibility

=== Default Configuration

=== Importing Existing Configuration

=== Deployments

=== Interoperability

== Implementation Plan

== Admin Clients

== Security Considerations

[[test_plan]]
== Test Plan

1. Testing LRA functionality within WildFly including TCK and subsystem setup.
+
The LRA functionality tests are part of the Narayana LRA codebase (https://github.com/jbosstm/narayana/tree/master/rts/lra/test/. Namely basic and crash tests in addition to TCK.
+
2. The WildFly will be running with LRA TCK module.
+
https://github.com/wildfly/wildfly/tree/main/testsuite/integration/microprofile-tck
+
3. Basic integration tests which tests the Galleon layer provisioning.
+
https://github.com/wildfly/wildfly/tree/main/testsuite/integration/microprofile
+
4. Integration tests on Openshift.


== Community Documentation

Description of the LRA configuration to be added in the documentation as part of the implementation PR.

== Release Note Content

WildFly introduces two new Galleon layers `microprofile-lra-participant` and `microprofile-lra-coordinator` for provisioning which provide the MicroProfile LRA specification integration into WildFly.
Loading