This project is a comparison of Java frameworks. All applications implement the same functionality and expose the same REST api
- Build
./gradlew clean build
- Spin Up Postgres & Wiremock:
docker-compose up -d
- Start one of the Apps:
./run-dropwizard.sh./run-spring.sh./run-micronaut.sh./run-quarkus.sh
- Run Gatling:
./gradlew :loadtest:gatlingRun --simulation gatling.simulation.AppSimulation
Check wiremock performance
- Spin Up Wiremock:
docker-compose up -d wiremock
- Run Gatling:
./gradlew :loadtest:gatlingRun --simulation gatling.simulation.WiremockSimulation
GET /accounts - Get all accounts
Request Body:
N/A
Response Body:
[
{
"id": 1,
"email": "john@mail.com",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "2000-03-17",
"currency": "USD",
"moneyAmount": 78
}
]GET /accounts/{id} - Get account by ID
Request Body:
N/A
Response Body:
{
"id": 1,
"email": "john@mail.com",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "2000-03-17",
"currency": "USD",
"moneyAmount": 78
}POST /accounts - Create new account
Request Body:
{
"email": "john@mail.com",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "2000-03-17",
"currency": "USD",
"moneyAmount": 78
}Response Body:
{
"id": 1,
"email": "john@mail.com",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "2000-03-17",
"currency": "USD",
"moneyAmount": 78
}POST /accounts/transfer - Transfer money from one account to another
Request Header: (is being used to fail operation and check that transaction works)
Dirty-Trick-Header: FAIL_TRANSFER
Request Body:
{
"senderId": 1,
"recipientId": 2,
"moneyAmount": 100
}Response Body:
N/A
Diagram:
sequenceDiagram
actor User as User
participant App as Application
participant DB as Database
participant Api as Bank Api
User ->> App: POST /transfer
activate App
App ->> DB: Find accounts
deactivate App
activate DB
DB -->> App: Accounts
deactivate DB
activate App
App ->> Api: GET /exchange
deactivate App
activate Api
Api -->> App: Exchange rate
deactivate Api
activate App
App ->> App: Update balance of accounts
App ->> DB: Save accounts
deactivate App
activate DB
DB -->> App: Done
deactivate DB
activate App
App -->> User: Done
deactivate App