the same application, many times, because, well...
The application exposes two HTTP endpoints:
/fortunes
returns a list of{id=..., fortune="..."}
objects/fortunes/random
returns a random{id=..., fortune="..."}
The fortunes are stored in a PostGreSQL or MariaDB databases (initialized on startup).
fortune-blocking-postgresql
- use RESTEasy Reactive, with a blocking API, JDBC (postgresql) and Agroalfortune-blocking-mariadb
- use RESTEasy Reactive, with a blocking API, JDBC (mariadb) and Agroalfortune-reactive-postgresql
- use RESTEasy Reactive, with a mutiny API, and the Vert.x PostgreSQL clientfortune-reactive-mariadb
- use RESTEasy Reactive, with a mutiny API, and the Vert.x MySQL/MariaDB clientfortune-virtual-thread-jdbc-postgresql
-fortune-blocking-postgresql
with@RunOnVirtualThread
- will suffer from pinningfortune-virtual-thread-jdbc-mariadb
-fortune-blocking-mariadb
with@RunOnVirtualThread
fortune-virtual-thread-postgresql
- use RESTEasy Reactive, with a blocking API (using@RunOnVirtualThread
), and the Vert.x PostgreSQL client - will suffer from the Netty/Loom dancefortune-virtual-thread-mariadb
- use RESTEasy Reactive, with a blocking API (using@RunOnVirtualThread
), and the Vert.x MySQL/MariaDB client - will suffer from the Netty/Loom dancefortune-kotlin-postgresql
- use RESTEasy Reactive with Kotlin co-routines, and the Vert.x PostgreSQL clientfortune-kotlin-mariadb
- use RESTEasy Reactive with Kotlin co-routines, and the Vert.x MySQL/MariaDB clientfortune-nima-jdbc-postgresql
- use Helidon 4 (nima) with HikariCP and the PostgreSQL JDBC driverfortune-nima-jdbc-mariadb
- use Helidon 4 (nima) with HikariCP and the MariaDB JDBC driverfortune-virtual-thread-vertx
- use Vertx with virtual threads, virtual threads are mounted on event loop threads when configured so
> mvn clean verify
# Enable socket
> systemctl --user enable podman.socket --now
# Export env var expected by Testcontainers
> export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
> export TESTCONTAINERS_RYUK_DISABLED=true
A qDup is provided to run the benchmark with minimal setup required. Just need to download qDup distribution and run the script. Make sure you have SSH access to HOST.
# Download qDup uber jar
> wget https://repo1.maven.org/maven2/io/hyperfoil/tools/qDup/0.6.17/qDup-0.6.17-uber.jar
# Run the qDup script
> java -jar qDup-0.6.17-uber.jar -S USER=me -S HOST=somehost qDup.yaml
To run it on local host, without cloning the repository, use the following command:
# Run qDup in localhost
> java -jar qDup-0.6.17-uber.jar -S USER=$(whoami) https://raw.githubusercontent.com/cescoffier/fortune-benchmark/main/qDup.yaml
There a number of options available. These are documented in the script.