How fragaly/performance-researches works
Project Type and Purpose
• This repository is an open-source performance research framework. Its goal is to compare the runtime, resource usage, and throughput of several JVM microframeworks (Spring Boot Web, Spring Boot Reactive, Quarkus Reactive, Micronaut Reactive) in both JVM and native images. It orchestrates data generation, database provisioning, microservice deployment, load testing, and metrics collection.
File Structure Analysis
• Top-level “modules” for each microframework variant (e.g. spring-boot-web, spring-boot-reactive, quarkus-reactive, micronaut-reactive) each include:
• Source code (src/main/java/...) implementing the same transport booking API.
• A Docker Compose to spin up the service + Postgres image.
• A datagen module generates and populates the database with synthetic data.
• A gatling module contains load-test scenarios against the API.
• env/database contains Dockerfiles, init scripts, and Prometheus/Grafana provisioning.
• CI workflows under .github/workflows build and test each variant in multiple configurations (JAR, native, docker).
Key Architectural Insights from README
• The system uses a single Postgres database container seeded by datagen.
• Each microframework module runs as an independent container, exposing identical RESTful endpoints defined by an OpenAPI spec.
• Load is injected via Gatling, and metrics (service + Postgres) are scraped by Prometheus and visualized in Grafana.
• All components run in one Docker network to eliminate network variability.
Core Components
a. Datagen Service
• Java Spring Boot application (runs once) → populates Postgres dataset (Users, Transfers, etc.).
b. Postgres Database Container
• Holds the transport booking schema and seeded data. Exposes port 5432 internally.
c. Microframework Service Instances (choose one or show them in parallel)
• Spring Boot Web / Reactive
• Quarkus Reactive
• Micronaut Reactive
• Each container: HTTP REST API (the same set of endpoints) → connects to Postgres via JDBC/R2DBC.
d. Gatling Load Generator
• Runs load scenarios (A2BSimulation) against the service’s public HTTP port. Generates RPS and collects response times.
e. Monitoring Stack
• Prometheus scrapes metrics endpoints from:
• Each microservice (HTTP metrics)
• Postgres exporter
• Grafana visualizes performance dashboards based on Prometheus data.
f. CI/CD Pipelines
• GitHub Actions workflows build, test, and publish artifacts for each framework variant.
Relationships and Data Flows
• Datagen → (JDBC) → Postgres
• Microservices → (JDBC/R2DBC) → Postgres
• Gatling → (HTTP) → Microservice API
• Microservices & Postgres → (metrics endpoints) → Prometheus → Grafana
• Source code → (Gradle/Native build) → Docker images → Docker Compose deployment
Architectural Patterns and Principles
• Modular microservice per framework variant, each with
• Controller/Handler layer exposing REST endpoints
• Repository layer interacting with the same DB schema
• Containerized isolation: each service + DB + monitoring run in own Docker containers on a private network
• Infrastructure-as-code: Docker Compose files define services, networks, volumes.
• CI-driven reproducibility: GitHub workflows ensure consistent build/test across all variants.