Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
df1064e
Init the `result` mutable list and add elements with `mapTo` in the `…
ShreckYe Dec 12, 2025
e69dcc7
Bump all dependencies and toolchains to the latest
ShreckYe Dec 13, 2025
59ed7f1
Migrate to Exposed v1 APIs
ShreckYe Dec 13, 2025
fc78803
Replace the deprecated `newSuspendedTransaction` call with `suspendTr…
ShreckYe Dec 14, 2025
0506ac4
Bump the Java versions in the dockerfiles too
ShreckYe Dec 14, 2025
2cc8974
Split the code into multiple files and reorganize the code for better…
ShreckYe Dec 16, 2025
ce4b1f8
Initially refactor to support different connection types JDBC and R2D…
ShreckYe Dec 17, 2025
efa1746
Copy the kotlinx-serialization `Json` configuration from the `ktor` p…
ShreckYe Dec 17, 2025
6a0a55e
Update the config and Dockerfiles correspondingly
ShreckYe Dec 17, 2025
6ff8b74
Merge branch 'ktor-exposed-revamp-dec-2025-copy-json-config' into kto…
ShreckYe Dec 17, 2025
88ede95
Support R2DBC
ShreckYe Dec 17, 2025
5db3a96
Revert to use ParallelGC in all Ktor benchmarks
ShreckYe Dec 18, 2025
34532d1
Bump the Kotlin version to 2.3.0 in the `ktor-exposed` portion
ShreckYe Dec 18, 2025
4b46ef6
Fix a format issue
ShreckYe Dec 23, 2025
9e9c373
Rename the `Database` type parameter to `TDatabase` as Gemini Code As…
ShreckYe Dec 24, 2025
b9b07a7
Fix inconsistent ports 8080 and 9090 as suggested by Copilot
ShreckYe Dec 24, 2025
6456fc1
Fix more inconsistent ports in the `ktor-asyncdb` portion too
ShreckYe Dec 24, 2025
2283b19
Add comments about "Coroutine concurrent `select`s lead to connection…
ShreckYe Dec 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions frameworks/Kotlin/ktor/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"notes": "http://ktor.io/",
"versus": "netty"
},
"exposed-dsl": {
"exposed-jdbc-dsl": {
"db_url": "/db",
"query_url": "/queries?queries=",
"update_url": "/updates?queries=",
Expand All @@ -157,11 +157,11 @@
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "ktor-netty-exposed-dsl",
"display_name": "ktor-netty-exposed-jdbc-dsl",
"notes": "",
"versus": "ktor"
},
"exposed-dao": {
"exposed-jdbc-dao": {
"db_url": "/db",
"fortune_url": "/fortunes",
"port": 9090,
Expand All @@ -176,7 +176,28 @@
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "ktor-netty-exposed-dao",
"display_name": "ktor-netty-exposed-jdbc-dao",
"notes": "",
"versus": "ktor"
},
"exposed-r2dbc-dsl": {
"db_url": "/db",
"query_url": "/queries?queries=",
"update_url": "/updates?queries=",
"fortune_url": "/fortunes",
"port": 9090,
"approach": "Realistic",
"classification": "Micro",
"database": "postgres",
"framework": "ktor",
"language": "Kotlin",
"flavor": "None",
"orm": "Full",
"platform": "Netty",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "ktor-netty-exposed-r2dbc-dsl",
"notes": "",
"versus": "ktor"
}
Expand Down
12 changes: 6 additions & 6 deletions frameworks/Kotlin/ktor/ktor-asyncdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ This sets up testing using [Ktor](https://ktor.io/), with a couple of async Post
## Test URLs
### JSON

http://localhost:8080/json
http://localhost:9090/json

### PLAINTEXT

http://localhost:8080/plaintext
http://localhost:9090/plaintext

### DB

http://localhost:8080/db
http://localhost:9090/db

### QUERY

http://localhost:8080/query?queries=
http://localhost:9090/query?queries=

### UPDATE

http://localhost:8080/update?queries=
http://localhost:9090/update?queries=

### FORTUNES

http://localhost:8080/fortunes
http://localhost:9090/fortunes
10 changes: 0 additions & 10 deletions frameworks/Kotlin/ktor/ktor-exposed-dsl.dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM gradle:jdk21
FROM gradle:jdk25
Comment thread
ShreckYe marked this conversation as resolved.

WORKDIR /ktor-exposed
COPY ktor-exposed/settings.gradle.kts settings.gradle.kts
COPY ktor-exposed/app app
RUN gradle --no-daemon shadowJar

EXPOSE 8080
EXPOSE 9090

CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app/build/libs/app-all.jar", "Dao"]
CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app/build/libs/app-all.jar", "Jdbc", "Dao"]
10 changes: 10 additions & 0 deletions frameworks/Kotlin/ktor/ktor-exposed-jdbc-dsl.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM gradle:jdk25

WORKDIR /ktor-exposed
COPY ktor-exposed/settings.gradle.kts settings.gradle.kts
COPY ktor-exposed/app app
RUN gradle --no-daemon shadowJar

EXPOSE 9090

CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app/build/libs/app-all.jar", "Jdbc", "Dsl"]
10 changes: 10 additions & 0 deletions frameworks/Kotlin/ktor/ktor-exposed-r2dbc-dsl.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM gradle:jdk25

WORKDIR /ktor-exposed
COPY ktor-exposed/settings.gradle.kts settings.gradle.kts
COPY ktor-exposed/app app
RUN gradle --no-daemon shadowJar

EXPOSE 9090

CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app/build/libs/app-all.jar", "R2dbc", "Dsl"]
8 changes: 4 additions & 4 deletions frameworks/Kotlin/ktor/ktor-exposed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ The tests were run with:
## Test URLs
### DB

http://localhost:8080/db
http://localhost:9090/db

### QUERY

http://localhost:8080/query?queries=
http://localhost:9090/query?queries=

### UPDATE

http://localhost:8080/update?queries=
http://localhost:9090/update?queries=

### FORTUNES

http://localhost:8080/fortunes
http://localhost:9090/fortunes
31 changes: 14 additions & 17 deletions frameworks/Kotlin/ktor/ktor-exposed/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
application
kotlin("jvm") version "2.1.21"
kotlin("plugin.serialization") version "2.1.21"
id("com.gradleup.shadow") version "8.3.9"
kotlin("jvm") version "2.3.0"
kotlin("plugin.serialization") version "2.3.0"
id("com.gradleup.shadow") version "9.3.0"
}

repositories {
mavenCentral()
}

val ktorVersion = "3.3.3"
val kotlinxSerializationVersion = "1.8.1"
val exposedVersion = "0.61.0"
val kotlinxSerializationVersion = "1.9.0"
val exposedVersion = "1.0.0-rc-4"

dependencies {
implementation("io.ktor:ktor-server-core:$ktorVersion")
Expand All @@ -27,20 +27,17 @@ dependencies {
implementation("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-r2dbc:${exposedVersion}")

implementation("org.postgresql:postgresql:42.7.5")
implementation("com.zaxxer:HikariCP:5.1.0")
runtimeOnly("org.slf4j:slf4j-simple:1.7.36")
}
implementation("org.postgresql:postgresql:42.7.8")
implementation("com.zaxxer:HikariCP:7.0.2")

application.mainClass.set("AppKt")
implementation("org.postgresql:r2dbc-postgresql:1.1.1.RELEASE")
implementation("io.r2dbc:r2dbc-pool:1.0.2.RELEASE")

kotlin {
jvmToolchain(21)
runtimeOnly("org.slf4j:slf4j-simple:2.0.7")
}

tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}
application.mainClass.set("AppKt")

kotlin.jvmToolchain(25)
Loading
Loading