{"id":21654425,"url":"https://github.com/hvalfangst/spring-boot-exposed","last_synced_at":"2026-04-10T01:37:13.993Z","repository":{"id":205812626,"uuid":"714442520","full_name":"hvalfangst/spring-boot-exposed","owner":"hvalfangst","description":"Spring Boot with JDBC \u0026 Exposed","archived":false,"fork":false,"pushed_at":"2023-11-12T20:57:32.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T06:25:09.313Z","etag":null,"topics":["exposed","kotlin","spring-boot","tomcat"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hvalfangst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-04T21:54:52.000Z","updated_at":"2024-10-14T21:40:54.000Z","dependencies_parsed_at":"2024-11-25T08:43:35.745Z","dependency_job_id":null,"html_url":"https://github.com/hvalfangst/spring-boot-exposed","commit_stats":null,"previous_names":["hvalfangst/kotlin-spring-boot-with-exposed","hvalfangst/spring-boot-exposed"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-boot-exposed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-boot-exposed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-boot-exposed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-boot-exposed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hvalfangst","download_url":"https://codeload.github.com/hvalfangst/spring-boot-exposed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554119,"owners_count":20471173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exposed","kotlin","spring-boot","tomcat"],"created_at":"2024-11-25T08:27:50.287Z","updated_at":"2025-12-31T00:08:36.496Z","avatar_url":"https://github.com/hvalfangst.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotlin Spring Boot API with Exposed ORM\n\n\n## Requirements\n\n* x86-64\n* Linux/Unix\n* [Docker](https://www.docker.com/products/docker-desktop/)\n* [JDK 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)\n* [Maven](https://maven.apache.org/)\n\n\n## Startup\n\nThe script \"up\" creates our database container and starts up our application:\n```\n1. docker-compose -f docker/cars/docker-compose.yml up -d\n2. mvn spring-boot:run\n```\n\nThe associated `docker-compose` also contains initialization scripts for creating our database and inserting test rows.\n\n\n## Shutdown\n\nThe script \"down\" removes our database container:\n```\n1.docker-compose -f docker/cars/docker-compose.yml down\n```\n\n## Load Testing using Bombardier\nIn this project we utilize [Bombardier](https://github.com/codesenberg/bombardier) to conduct load-testing.  \n\nThe subject of our tests is the `/car-details` endpoint, which is responsible for retrieving various vehicle-related data from different repositories and responding with an aggregate object.\n\n### Test 1: 10 Concurrent Connections, 1000 Requests (Baseline)\n```plaintext\nCommand: bombardier -m GET localhost:8080/car-details/1 -c 10 -n 1000\nStatistics:\n  Reqs/sec: 203.67\n  Latency: 50.95ms (Avg)\n  HTTP codes: 2xx - 1000\n  Throughput: 177.46KB/s\n  ```\n\n### Test 2: 100 Concurrent Connections, 1000 Requests\n```plaintext\nCommand: bombardier -m GET localhost:8080/car-details/1 -c 100 -n 1000\nStatistics:\n  Reqs/sec: 207.97 (↑1.44% from Test 1)\n  Latency: 491.09ms (↑863.91% from Test 1)\n  HTTP codes: 2xx - 1000\n  Throughput: 181.64KB/s (↑2.63% from Test 1)\n```\n\n### Test 3: 1000 Concurrent Connections, 2000 Requests\n```plaintext\nCommand: bombardier -m GET localhost:8080/car-details/1 -c 1000 -n 2000\nStatistics:\n  Reqs/sec: 98.17 (↓51.82% from Test 1)\n  Latency: 8.72s (↑17,040.39% from Test 1)\n  HTTP codes: 2xx - 362, Errors: Timeout - 1638\n  Throughput: 43.78KB/s (↓75.33% from Test 1)\n```\n\n## Test Result Analysis\n\n### Baseline (C10, N1000)\nThe baseline test (Test 1), which serves as our reference point, simulates a moderate load with 10 concurrent connections and 1000 requests. In this scenario:\n\n* The application achieved a request rate of 203.67 requests per second.\n* The average latency was measured at 50.95ms.\n* All 1000 requests resulted in successful HTTP 2xx responses.\n\n\n### Test 2 (C100, N1000)\nIn Test 2, where 100 concurrent connections and 1000 requests were applied:\n\n* The request rate and throughput stays pretty much the same\n* The average latency experienced a significant rise of 863.91%, indicating that `disaster is imminent`\n\n### Test 3 (C1000, N2000)\nIn Test 3, with 1000 concurrent connections and 2000 requests:\n\n* The request rate experienced a notable decrease of 51.82% compared to the baseline (Test 1), revealing potential performance limitations under heavy concurrent load.\n* The average latency surged dramatically by `17,040.39%`, showcasing an exponential increase in response times.\n* Throughput declined by 75.33% compared to the baseline, indicating a considerable reduction in data transfer capacity.\n\n\n## Conclusion\nThe findings suggest that this type of application is best suited for environments with low concurrent load due to the sheer amount of database calls to different repositories.\nThis could very much be due to the blocking nature of [JDBC](https://spring.io/blog/2018/12/07/reactive-programming-and-relational-databases). \n\nOne can alleviate these performance issues by incorporating caching with [Redis](https://redis.io/) and load balancing with [NGINX](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/),\nbut if performance is in fact important one should consider non-blocking alternatives such as [WebFlux](https://docs.spring.io/spring-framework/reference/web/webflux.html) or [Vert.x](https://vertx.io/); \nwith non-blocking APIs such as [R2DBC](https://r2dbc.io/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fspring-boot-exposed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhvalfangst%2Fspring-boot-exposed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fspring-boot-exposed/lists"}