The demo is written in Kotlin/Quarkus and uses docker-compose to run MongoDB and PostgreSQL databases.
The com.example.DemoKt.runDemo
function is used to run four scenarios to demonstrate different isolation levels effects in MongoDB and
PostgreSQL.
Each scenario produces its own report in a Markdown format. The final reports are located in the reports folder:
LOST_UPDATE
scenario produced byLostUpdate.kt
script.DIRTY_READ
scenario produced byDirtyRead.kt
script.NON_REPEATABLE_READ
scenario produced byNonRepeatableRead.kt
script.PHANTOM_READ
scenario produced byPhantomRead.kt
script.
The summary of the results is located in the REPORT.md file.
Start up MongoDB and PostgreSQL
docker-compose up -d
Build and run demo application (Requires Java 17+)
./gradlew build && \
java -jar build/quarkus-app/quarkus-run.jar
You can also run application in dev mode that enables live coding using:
./gradlew quarkusDev