Rex (rex meaning "king" in Latin, the one that imposes order) is a microservice which serves as HTTP scheduler.
Rex requires a graph of dependent tasks that need to be scheduled and ran in particular order.
Each task has a HTTP request definition to start and cancel. These definitions are later used by Rex to start and
cancel tasks remotely. Rex augments these requests with a callback for the remote service to report
successful/unsuccessful completion of remote tasks. Additionally, there is an option to define a notification request
for a task which will make Rex publish notifications as the task transitions between states.
- Apache Maven 3.8.1+
- OpenJDK 11
- Infinispan Server 11.0.3.Final+ (tested)
- With script
- Run a bash script in
scripts/run-ispn.sh - The script
- will download correct version of ISPN
- add a simple user "user" with password 1234
- run the ISPN server
- On repeated use, the server is started always fresh (no cache configurations)
- Manually (out-of-date)
wget https://downloads.jboss.org/infinispan/9.4.16.Final/infinispan-server-11.0.3.Final.zipunzip infinispan-server-11.0.3.Final.zipinfinispan-server-11.0.3.Final/bin/standalone.sh -c clustered.xml(to make it available on LAN/WAN, supply the host/ip-address within additional option -b="ip-address", otherwise it defaults to "localhost")- wait until started
- open new terminal
infinispan-server-11.0.3.Final/bin/ispn-cli.sh --file="path/to/scheduler/server-config.cli"- wait for the server to reload
- To run integration-tests (currently the only tests) you have to have Infinispan server running locally (
scripts/run-ispn.shis all that is needed)- (for the future
testcontainersare considered)
- (for the future
mvn clean testto run tests
mvn clean install -DskipTestsjava [-options] -jar core/target/quarkus-app/quarkus-run.jar- additional options
- -Dquarkus.infinispan-client.server-list=:11222 (REQUIRED)
- Host/ip-address of InfinispanHot-Rod server.
- ALTERNATIVE:
export ISPN_NODE=<ispn-ip-address>:11222
- -Dscheduler.baseUrl=: (REQUIRED)
- URL address of thescheduler which is used for callbacks sent to remote entities.
- ALTERNATIVE:
export BASE_URL=<scheduler-url>
- -Dquarkus.http.port=:
- Port where the application is deployed on. Default value is 80.
- -Dquarkus.infinispan-client.auth-username=
- username for authentication to ISPN server
- ALTERNATIVE:
export ISPN_USER=<USER>
- -Dquarkus.infinispan-client.auth-password=
- password for authentication to ISPN server
- ALTERNATIVE:
export ISPN_PASSWORD=<USER>
- -Dquarkus.infinispan-client.server-list=:11222 (REQUIRED)
- additional options
/q/swagger-uiis an OpenAPI endpoint
- WARNING: scheduler will compile, but it was not tested properly
mvn clean install -Pnative- the compilation will take couple of minutes
- To run the native app run
core/target/core-<version>-runner <options>