|
1 | 1 | # dingrogu
|
2 | 2 |
|
3 |
| -The application configures workflows to run on [Rex](https://github.com/project-ncl/rex). A particular workflow can consists of multiple Rex tasks interlinked together. |
| 3 | +The application configures workflows to run on [Rex](https://github.com/project-ncl/rex). A particular workflow can consists of multiple Rex tasks interlinked together. Those Rex tasks will then coordinate with our services via this application's `adapter` endpoints. The latter acts as the bridge between the Rex world (generic task coordinator) and PNC services. |
4 | 4 |
|
5 | 5 | We want to have workflows for:
|
6 | 6 | - repository creation (talking with [Repour](https://github.com/project-ncl/repour))
|
7 | 7 | - milestone release
|
8 | 8 | - build process
|
| 9 | +- deliverables-analysis |
| 10 | + |
| 11 | +## Packaging and Running the application |
| 12 | + |
| 13 | +You can run your application using: |
| 14 | +```shell script |
| 15 | +./mvnw clean install -DskipTests=true |
| 16 | +java -jar application/target/dingrogu-runner.jar |
| 17 | +``` |
| 18 | + |
| 19 | +# House Rules |
| 20 | +- We only use Jackson for JSON serialization |
9 | 21 |
|
10 | 22 | # Architecture
|
11 | 23 | This application consists of 2 parts:
|
12 |
| -- The creation of the workflow to send to Rex |
13 |
| -- An adapter part that translates Rex's `StartRequest` and `StopRequest` DTOs to the specific application (if necessary) |
| 24 | +- The creation of the workflow to send to Rex (`rest-workflow` module) |
| 25 | +- An adapter part that translates Rex's `StartRequest` and `StopRequest` DTOs to the specific application, as well as |
| 26 | +handling of callbacks from the applications back to Rex |
14 | 27 |
|
15 |
| -The adapter part might be necessary to not couple Rex's particular DTO requests with the specific downstream's |
| 28 | +The adapter part is necessary to decouple Rex's particular DTO requests with the specific downstream's |
16 | 29 | application API.
|
17 | 30 |
|
18 | 31 | The project is configured to build a uber-jar by default.
|
19 | 32 |
|
| 33 | +- `api` module holds any DTOs and REST interfaces that could be used to generate both client and server code |
| 34 | +- `common` module holds any code that can be shared with different modules |
| 35 | +- `rest-adapter` and `rest-workflow` modules are the REST server code that implements the REST interface. |
| 36 | +- `application` module combines all the modules together to form the final Quarkus runner jar |
| 37 | + |
20 | 38 | ## Workflow Creation
|
21 | 39 | Rex requires that we specify for each task:
|
22 | 40 | - an endpoint to start the request and its payload
|
23 |
| -- and endpoint to cancel the request and its payload |
| 41 | +- an endpoint to cancel the request and its payload |
24 | 42 | - mdc values
|
25 | 43 |
|
26 | 44 | Rex then sends to the endpoint the `StartRequest` DTO which contains:
|
@@ -51,39 +69,7 @@ graph TD
|
51 | 69 | Rex -->|StartRequest| GroguAdapterService2(Grogu Adapter Endpoint Service 2)
|
52 | 70 | GroguAdapterService2 -->|Service 2 Body| ActualService2(Actual Service 2 API)
|
53 | 71 | ```
|
54 |
| - |
55 |
| -## Running the application in dev mode |
56 |
| - |
57 |
| -You can run your application in dev mode that enables live coding using: |
58 |
| -```shell script |
59 |
| -./mvnw compile quarkus:dev |
60 |
| -``` |
61 |
| - |
62 |
| -> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/. |
63 |
| -
|
64 |
| -## Packaging and running the application |
65 |
| - |
66 |
| -The application can be packaged using: |
67 |
| -```shell script |
68 |
| -./mvnw package |
69 |
| -``` |
70 |
| - |
71 |
| -## Creating a native executable |
72 |
| - |
73 |
| -You can create a native executable using: |
74 |
| -```shell script |
75 |
| -./mvnw package -Pnative |
76 |
| -``` |
77 |
| - |
78 |
| -Or, if you don't have GraalVM installed, you can run the native executable build in a container using: |
79 |
| -```shell script |
80 |
| -./mvnw package -Pnative -Dquarkus.native.container-build=true |
81 |
| -``` |
82 |
| - |
83 |
| -You can then execute your native executable with: `./target/dingrogu-1.0.0-SNAPSHOT-runner` |
84 |
| - |
85 |
| -If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling. |
86 |
| - |
87 |
| -# House Rules |
88 |
| - |
89 |
| -- We only use Jackson for JSON serialization |
| 72 | +## Future Rex features to explore |
| 73 | +- Unique queue per workflow to have QoS and its own queue size |
| 74 | +- Atomic running of group of tasks; if there's a failure, the group of tasks are run again |
| 75 | +- Query Rex for the current state of affairs to get previous run data |
0 commit comments