Bladeren bron

[ Kotlin / Hexagon ] Update benchmark to Hexagon v3 GA (#8364)

* Fix error with URLs in JEE servers

* Clean up

* Avoid classpath URLs

* Fix template loading error

* Fix template loading error

* Chores

* Fix template loading error

* Delete MongoDB DB support

Storage support in Hexagon will be moved outside the Toolkit, and so, it will be left outside the benchmark.

* Fix runtime problem

* Update Hexagon version

* Make Jackson Blackbird module optional

* Add variation with Blackbird module enabled

* Upgrade Hexagon version

* Enable blackbird Jackson module by default

* Update dependencies

* Use Hexagon version 2.0.0-B1 (and a little cleanup)

* Use Hexagon version 2.0.0-B1 (and a little cleanup)

* Use Tomcat instead Resin to test JEE integration

* Remove unused environment variable

* Clean Tomcat dockerfile

* Minor improvements

* Minor improvements

* Update to release version

* Update to the latest Hexagon release

* Add Netty adapter test

* Remove Gradle Wrapper

* Update version

* Update version

* Minimize template

* Skip Hexagon checks in the container

* Add Netty Epoll benchmark

* Database and template improvements

* Update Hexagon version

* Update Hexagon version

* Update DB settings

* Use a single store and template engine to simplify benchmark

* Bump mysql-connector-java in /frameworks/Java/wicket

Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 8.0.27 to 8.0.28.
- [Release notes](https://github.com/mysql/mysql-connector-j/releases)
- [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES)
- [Commits](https://github.com/mysql/mysql-connector-j/compare/8.0.27...8.0.28)

---
updated-dependencies:
- dependency-name: mysql:mysql-connector-java
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump mongodb-driver-sync from 4.2.0 to 4.2.1 in /frameworks/Java/javalin

Bumps [mongodb-driver-sync](https://github.com/mongodb/mongo-java-driver) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r4.2.0...r4.2.1)

---
updated-dependencies:
- dependency-name: org.mongodb:mongodb-driver-sync
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.2.0 to 5.4.0 in /frameworks/Python/starlette

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.2.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.2.0 to 5.4.0 in /frameworks/Python/django

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.2.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.2.0 to 5.4.0 in /frameworks/Python/routerling

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.2.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.2.0 to 5.4.0 in /frameworks/Python/japronto

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.2.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.2.0 to 5.4.0 in /frameworks/Python/fastapi

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.2.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.2.0 to 5.4.0 in /frameworks/Python/uvicorn

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.2.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.2.0 to 5.4.0 in /frameworks/Python/flask

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.2.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ujson from 5.1 to 5.4.0 in /frameworks/Python/aiohttp

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.1 to 5.4.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/5.1.0...5.4.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump rails-html-sanitizer from 1.4.2 to 1.4.3 in /frameworks/Ruby/rails

Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/rails/rails-html-sanitizer/releases)
- [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.4.2...v1.4.3)

---
updated-dependencies:
- dependency-name: rails-html-sanitizer
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump jetty-server in /frameworks/Java/jetty

Bumps [jetty-server](https://github.com/eclipse/jetty.project) from 9.4.41.v20210516 to 10.0.10.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.41.v20210516...jetty-10.0.10)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump undertow-core in /frameworks/Java/undertow

Bumps [undertow-core](https://github.com/undertow-io/undertow) from 2.2.11.Final to 2.2.15.Final.
- [Release notes](https://github.com/undertow-io/undertow/releases)
- [Commits](https://github.com/undertow-io/undertow/compare/2.2.11.Final...2.2.15.Final)

---
updated-dependencies:
- dependency-name: io.undertow:undertow-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update versions

* Update README.md

* Bump sanic from 22.3.1 to 22.6.1 in /frameworks/Python/sanic

Bumps [sanic](https://github.com/sanic-org/sanic) from 22.3.1 to 22.6.1.
- [Release notes](https://github.com/sanic-org/sanic/releases)
- [Changelog](https://github.com/sanic-org/sanic/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/sanic-org/sanic/compare/v22.3.1...v22.6.1)

---
updated-dependencies:
- dependency-name: sanic
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/light-java

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/rapidoid

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/jooby

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/servlet

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/spring-webflux

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/smart-socket

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/act

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Kotlin/kooby

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/dropwizard

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.3.3 to 42.4.1 in /frameworks/Java/hserver

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.4.0 to 42.4.1 in /frameworks/Java/undertow

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.4.0 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.4.0...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump postgresql from 42.2.23 to 42.4.1 in /frameworks/Kotlin/ktor/ktor

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.2.23 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.2.23...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update dependencies

* Bump undertow-core in /frameworks/Java/light-java

Bumps [undertow-core](https://github.com/undertow-io/undertow) from 2.2.15.Final to 2.2.19.Final.
- [Release notes](https://github.com/undertow-io/undertow/releases)
- [Commits](https://github.com/undertow-io/undertow/compare/2.2.15.Final...2.2.19.Final)

---
updated-dependencies:
- dependency-name: io.undertow:undertow-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump undertow-core in /frameworks/Java/undertow

Bumps [undertow-core](https://github.com/undertow-io/undertow) from 2.2.18.Final to 2.2.19.Final.
- [Release notes](https://github.com/undertow-io/undertow/releases)
- [Commits](https://github.com/undertow-io/undertow/compare/2.2.18.Final...2.2.19.Final)

---
updated-dependencies:
- dependency-name: io.undertow:undertow-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Delete Gradle Wrapper

* Use different JSON serializer

* Restore non Hexagon files

* Update Hexagon version

* Run pipeline

* Run pipeline

* Bump axum-core from 0.2.7 to 0.2.8 in /frameworks/Rust/axum

Bumps [axum-core](https://github.com/tokio-rs/axum) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/tokio-rs/axum/releases)
- [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/axum/compare/axum-core-v0.2.7...axum-core-v0.2.8)

---
updated-dependencies:
- dependency-name: axum-core
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Revert "Bump axum-core from 0.2.7 to 0.2.8 in /frameworks/Rust/axum"

This reverts commit 4422de8915e70cdca67a07c2e0fdb0610757924b.

* Version updates, code refactor and new benchmark cases

* Version updates

* Version updates

* Version updates

* [Hexagon] Refactor and updates:

* Update Hexagon version
* Use Rocker template
* Modularize the different scenarios

* Fix connection problems

* Update Hexagon

* Update Gradle

* Update dependencies

* Update Hexagon version

* Update Gradle Wrapper

* Add async and native support

* Add async and native support

* Add async and native support

* Replace Vert.x adapter by Netty Epoll Async adapter

* Replace Vert.x adapter by Netty Epoll Async adapter

* Replace Vert.x adapter by Netty Epoll Async adapter

* Replace Vert.x adapter by Netty Epoll Async adapter

* Replace Vert.x adapter by Netty Epoll Async adapter

* Add Jasync store

* Add Jasync store

* Update

* Update

* Update

* Update Gradle

* Benchmark Netty Epoll only

* Add Nima adapter

* Update container builds

* Fix missing endpoints

* Fix Nima benchmarks

* Update dependencies

* Update dependencies

* Update dependencies

* Fix build

* Fix controller

* Fix native tests

* Fix native tests

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Juanjo Aguililla 2 jaren geleden
bovenliggende
commit
d36432feca
29 gewijzigde bestanden met toevoegingen van 106 en 491 verwijderingen
  1. 31 8
      frameworks/Kotlin/hexagon/benchmark_config.json
  2. 3 3
      frameworks/Kotlin/hexagon/build.gradle
  3. 19 1
      frameworks/Kotlin/hexagon/config.toml
  4. 2 2
      frameworks/Kotlin/hexagon/core/src/main/kotlin/Controller.kt
  5. 1 0
      frameworks/Kotlin/hexagon/core/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties
  6. 0 32
      frameworks/Kotlin/hexagon/core_async/build.gradle
  7. 0 28
      frameworks/Kotlin/hexagon/core_async/src/main/kotlin/Benchmark.kt
  8. 0 133
      frameworks/Kotlin/hexagon/core_async/src/main/kotlin/Controller.kt
  9. 0 34
      frameworks/Kotlin/hexagon/core_async/src/main/kotlin/store/BenchmarkStore.kt
  10. 0 7
      frameworks/Kotlin/hexagon/core_async/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties
  11. 0 23
      frameworks/Kotlin/hexagon/core_async/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/reflect-config.json
  12. 0 24
      frameworks/Kotlin/hexagon/core_async/src/main/resources/fortunes.rocker.html
  13. 21 0
      frameworks/Kotlin/hexagon/hexagon-jetty-native.dockerfile
  14. 1 1
      frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile
  15. 1 1
      frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile
  16. 0 23
      frameworks/Kotlin/hexagon/hexagon-nettyepoll-async-pgclient.dockerfile
  17. 1 1
      frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile
  18. 1 1
      frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile
  19. 21 0
      frameworks/Kotlin/hexagon/hexagon-nima-native.dockerfile
  20. 1 1
      frameworks/Kotlin/hexagon/hexagon-nima-pgclient.dockerfile
  21. 1 1
      frameworks/Kotlin/hexagon/hexagon-nima.dockerfile
  22. 1 1
      frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile
  23. 1 1
      frameworks/Kotlin/hexagon/hexagon.dockerfile
  24. 0 8
      frameworks/Kotlin/hexagon/hexagon_nettyepoll_async_pgclient/build.gradle
  25. 0 33
      frameworks/Kotlin/hexagon/hexagon_nettyepoll_async_pgclient/src/main/kotlin/Benchmark.kt
  26. 0 1
      frameworks/Kotlin/hexagon/hexagon_nettyepoll_postgresql/build.gradle
  27. 0 3
      frameworks/Kotlin/hexagon/settings.gradle
  28. 0 6
      frameworks/Kotlin/hexagon/store_pgclient_async/build.gradle
  29. 0 114
      frameworks/Kotlin/hexagon/store_pgclient_async/src/main/kotlin/BenchmarkPgClientStore.kt

+ 31 - 8
frameworks/Kotlin/hexagon/benchmark_config.json

@@ -25,6 +25,29 @@
                 "notes": "http://hexagonkt.com",
                 "versus": "servlet"
             },
+            "jetty-native": {
+                "json_url": "/json",
+                "db_url": "/db",
+                "query_url": "/query?queries=",
+                "fortune_url": "/fortunes",
+                "update_url": "/update?queries=",
+                "cached_query_url": "/cached-queries?count=",
+                "plaintext_url": "/plaintext",
+                "port": 9090,
+                "approach": "Realistic",
+                "classification": "Micro",
+                "database": "postgres",
+                "framework": "Hexagon",
+                "language": "Kotlin",
+                "orm": "Raw",
+                "platform": "Servlet",
+                "webserver": "None",
+                "os": "Linux",
+                "database_os": "Linux",
+                "display_name": "Hexagon Jetty Native PostgreSQL",
+                "notes": "http://hexagonkt.com",
+                "versus": "servlet"
+            },
             "jettyloom": {
                 "json_url": "/json",
                 "db_url": "/db",
@@ -94,7 +117,7 @@
                 "notes": "http://hexagonkt.com",
                 "versus": "netty"
             },
-            "nettyepoll-async-pgclient": {
+            "nettyepoll-pgclient": {
                 "json_url": "/json",
                 "db_url": "/db",
                 "query_url": "/query?queries=",
@@ -113,11 +136,11 @@
                 "webserver": "None",
                 "os": "Linux",
                 "database_os": "Linux",
-                "display_name": "Hexagon Netty Epoll Async PgClient",
+                "display_name": "Hexagon Netty Epoll PgClient",
                 "notes": "http://hexagonkt.com",
                 "versus": "netty"
             },
-            "nettyepoll-pgclient": {
+            "nima": {
                 "json_url": "/json",
                 "db_url": "/db",
                 "query_url": "/query?queries=",
@@ -132,15 +155,15 @@
                 "framework": "Hexagon",
                 "language": "Kotlin",
                 "orm": "Raw",
-                "platform": "Netty",
+                "platform": "Helidon",
                 "webserver": "None",
                 "os": "Linux",
                 "database_os": "Linux",
-                "display_name": "Hexagon Netty Epoll PgClient",
+                "display_name": "Hexagon Nima PostgreSQL",
                 "notes": "http://hexagonkt.com",
-                "versus": "netty"
+                "versus": "helidon-nima"
             },
-            "nima": {
+            "nima-native": {
                 "json_url": "/json",
                 "db_url": "/db",
                 "query_url": "/query?queries=",
@@ -159,7 +182,7 @@
                 "webserver": "None",
                 "os": "Linux",
                 "database_os": "Linux",
-                "display_name": "Hexagon Nima PostgreSQL",
+                "display_name": "Hexagon Nima Native PostgreSQL",
                 "notes": "http://hexagonkt.com",
                 "versus": "helidon-nima"
             },

+ 3 - 3
frameworks/Kotlin/hexagon/build.gradle

@@ -1,7 +1,7 @@
 
 plugins {
     id "org.jetbrains.kotlin.jvm" version "1.9.0" apply false
-    id "org.graalvm.buildtools.native" version "0.9.23" apply false
+    id "org.graalvm.buildtools.native" version "0.9.24" apply false
 }
 
 version = "1.0.0"
@@ -9,8 +9,8 @@ description = "TFB benchmark"
 group = "com.hexagonkt"
 
 ext {
-    hexagonVersion = "3.0.0-B9"
-    jettyVersion = "11.0.15"
+    hexagonVersion = "3.0.1"
+    jettyVersion = "12.0.0"
     nettyVersion = "4.1.96.Final"
 
     hikariVersion = "5.0.1"

+ 19 - 1
frameworks/Kotlin/hexagon/config.toml

@@ -73,7 +73,7 @@ platform = "Netty"
 webserver = "None"
 versus = "netty"
 
-[nettyepoll-async-pgclient]
+[nettyepoll-native]
 urls.plaintext = "/plaintext"
 urls.json = "/json"
 urls.db = "/db"
@@ -127,6 +127,24 @@ platform = "Helidon"
 webserver = "None"
 versus = "helidon-nima"
 
+[nima-native]
+urls.plaintext = "/plaintext"
+urls.json = "/json"
+urls.db = "/db"
+urls.query = "/query?queries="
+urls.update = "/update?queries="
+urls.fortune = "/fortunes"
+urls.cached_query = "/cached-queries?count="
+approach = "Realistic"
+classification = "Micro"
+database = "postgres"
+database_os = "Linux"
+os = "Linux"
+orm = "Raw"
+platform = "Helidon"
+webserver = "None"
+versus = "helidon-nima"
+
 [nima-pgclient]
 urls.plaintext = "/plaintext"
 urls.json = "/json"

+ 2 - 2
frameworks/Kotlin/hexagon/core/src/main/kotlin/Controller.kt

@@ -39,8 +39,8 @@ class Controller(
 
     val path: PathHandler by lazy {
         path {
-            on("*") { send(headers = headers) }
-            on("*", DateCallback())
+            before("*") { send(headers = headers) }
+            before("*", DateCallback())
 
             get("/plaintext") { ok(textMessage, contentType = plain) }
             get("/json") { ok(Message(textMessage).toJson(), contentType = json) }

+ 1 - 0
frameworks/Kotlin/hexagon/core/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties

@@ -2,6 +2,7 @@ Args= \
   -H:IncludeResources=.*\\.(html|class) \
   --enable-preview \
   --static \
+  --libc=musl \
   --initialize-at-build-time=org.slf4j.jul.JDK14LoggerAdapter \
   --initialize-at-build-time=org.slf4j.jul.JDK14LoggerAdapter$1 \
   --initialize-at-build-time=org.slf4j.LoggerFactory

+ 0 - 32
frameworks/Kotlin/hexagon/core_async/build.gradle

@@ -1,32 +0,0 @@
-
-plugins {
-    id("nu.studer.rocker") version("3.0.4")
-}
-
-dependencies {
-    api(project(":model"))
-    api("com.hexagonkt:http_server_async:$hexagonVersion")
-    api("com.hexagonkt:templates_rocker:$hexagonVersion")
-    api("com.hexagonkt:logging_slf4j_jul:$hexagonVersion")
-    api("com.hexagonkt:serialization_jackson_json:$hexagonVersion")
-    api("org.cache2k:cache2k-core:$cache2kVersion")
-}
-
-tasks.register("minimizeTemplate") {
-    doLast {
-        File template = file("$buildDir/resources/main/fortunes.rocker.html")
-        List<String> lines = template.readLines().collect { it.trim() }
-        template.write(lines.join(""))
-    }
-}
-
-jar.dependsOn("minimizeTemplate")
-
-rocker {
-    configurations {
-        create("main") {
-            templateDir.set(file("src/main/resources"))
-            optimize.set(true)
-        }
-    }
-}

+ 0 - 28
frameworks/Kotlin/hexagon/core_async/src/main/kotlin/Benchmark.kt

@@ -1,28 +0,0 @@
-package com.hexagonkt.async
-
-import com.hexagonkt.Settings
-import com.hexagonkt.http.server.async.HttpServer
-import com.hexagonkt.http.server.async.HttpServerPort
-import com.hexagonkt.http.server.async.HttpServerSettings
-import com.hexagonkt.async.store.BenchmarkStore
-import com.hexagonkt.templates.TemplatePort
-import java.net.InetAddress
-import java.net.URL
-
-class Benchmark(
-    private val engine: HttpServerPort,
-    private val store: BenchmarkStore,
-    private val template: TemplatePort,
-    private val templateUrl: URL,
-    private val settings: Settings = Settings(),
-) {
-    val server: HttpServer by lazy {
-        val controller = Controller(settings, store, template, templateUrl)
-        val serverSettings = HttpServerSettings(
-            bindAddress = InetAddress.getByName(settings.bindAddress),
-            bindPort = settings.bindPort,
-        )
-
-        HttpServer(engine, controller.path, serverSettings)
-    }
-}

+ 0 - 133
frameworks/Kotlin/hexagon/core_async/src/main/kotlin/Controller.kt

@@ -1,133 +0,0 @@
-package com.hexagonkt.async
-
-import com.hexagonkt.Settings
-import com.hexagonkt.core.fieldsMapOf
-import com.hexagonkt.core.media.APPLICATION_JSON
-import com.hexagonkt.core.media.TEXT_HTML
-import com.hexagonkt.core.media.TEXT_PLAIN
-import com.hexagonkt.handlers.async.done
-import com.hexagonkt.http.model.ContentType
-import com.hexagonkt.http.model.Header
-import com.hexagonkt.http.model.Headers
-import com.hexagonkt.http.server.async.callbacks.DateCallback
-import com.hexagonkt.http.handlers.async.HttpContext
-import com.hexagonkt.http.handlers.async.PathHandler
-import com.hexagonkt.http.handlers.async.path
-import com.hexagonkt.model.*
-import com.hexagonkt.serialization.jackson.json.Json
-import com.hexagonkt.serialization.serialize
-import com.hexagonkt.async.store.BenchmarkStore
-import com.hexagonkt.templates.TemplatePort
-import java.net.URL
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.ThreadLocalRandom
-import kotlin.text.Charsets.UTF_8
-
-class Controller(
-    settings: Settings,
-    store: BenchmarkStore,
-    templateEngine: TemplatePort,
-    templateUrl: URL,
-) {
-    private val queriesParam: String = settings.queriesParam
-    private val cachedQueriesParam: String = settings.cachedQueriesParam
-    private val worldRows: Int = settings.worldRows
-    private val textMessage: String = settings.textMessage
-
-    private val plain: ContentType = ContentType(TEXT_PLAIN)
-    private val json: ContentType = ContentType(APPLICATION_JSON)
-    private val html: ContentType = ContentType(TEXT_HTML, charset = UTF_8)
-
-    private val headers = Headers(Header("server", "Hexagon"))
-
-    val path: PathHandler by lazy {
-        path {
-            on("*") { send(headers = headers).done() }
-            on("*", DateCallback())
-
-            get("/plaintext") { ok(textMessage, contentType = plain).done() }
-            get("/json") { ok(Message(textMessage).toJson(), contentType = json).done() }
-            get("/fortunes") { listFortunes(store, templateUrl, templateEngine) }
-            get("/db") { dbQuery(store) }
-            get("/query") { getWorlds(store) }
-            get("/cached-queries") { getCachedWorlds(store) }
-            get("/update") { updateWorlds(store) }
-        }
-    }
-
-    private fun Message.toJson(): String =
-        toMap().serialize(Json.raw)
-
-    private fun HttpContext.listFortunes(
-        store: BenchmarkStore, templateUrl: URL, templateAdapter: TemplatePort
-    ): CompletableFuture<HttpContext> =
-        store
-            .findAllFortunes()
-            .thenApply { it + Fortune(0, "Additional fortune added at request time.")  }
-            .thenApply { fortunes -> fortunes.sortedBy { it.message } }
-            .thenApply { sortedFortunes -> mapOf("fortunes" to sortedFortunes) }
-            .thenApply { context -> templateAdapter.render(templateUrl, context) }
-            .thenApply { body -> ok(body, contentType = html) }
-
-    private fun HttpContext.dbQuery(store: BenchmarkStore): CompletableFuture<HttpContext> {
-        val ids = listOf(randomWorld())
-        return store.findWorlds(ids)
-            .thenApply { worlds -> worlds.first().toMap()}
-            .thenApply { world -> sendJson(world) }
-    }
-
-    private fun HttpContext.getWorlds(store: BenchmarkStore): CompletableFuture<HttpContext> {
-        val worldsCount = getWorldsCount(queriesParam)
-        val ids = (1..worldsCount).map { randomWorld() }
-        return store.findWorlds(ids)
-            .thenApply { worlds -> worlds.map { it.toMap() } }
-            .thenApply { worlds -> sendJson(worlds) }
-    }
-
-    private fun HttpContext.getCachedWorlds(store: BenchmarkStore): CompletableFuture<HttpContext> {
-        val worldsCount = getWorldsCount(cachedQueriesParam)
-        val ids = (1..worldsCount).map { randomWorld() }
-        val worlds = store.findCachedWorlds(ids).map { it.toMap() }
-
-        return sendJson(worlds).done()
-    }
-
-    private fun HttpContext.updateWorlds(store: BenchmarkStore): CompletableFuture<HttpContext> {
-        val worldsCount = getWorldsCount(queriesParam)
-        val worlds = (1..worldsCount).map { World(randomWorld(), randomWorld()) }
-
-        return store.replaceWorlds(worlds)
-            .thenApply { sendJson(worlds.map { it.toMap() }) }
-    }
-
-    private fun HttpContext.sendJson(body: Any): HttpContext =
-        ok(body.serialize(Json.raw), contentType = json)
-
-    private fun HttpContext.getWorldsCount(parameter: String): Int =
-        request.queryParameters[parameter]?.string()?.toIntOrNull().let {
-            when {
-                it == null -> 1
-                it < 1 -> 1
-                it > 500 -> 500
-                else -> it
-            }
-        }
-
-    private fun randomWorld(): Int =
-        ThreadLocalRandom.current().nextInt(worldRows) + 1
-
-    private fun Message.toMap(): Map<String, *> =
-        fieldsMapOf(Message::message to message)
-
-    private fun World.toMap(): Map<String, *> =
-        fieldsMapOf(
-            World::id to id,
-            World::randomNumber to randomNumber,
-        )
-
-    private fun CachedWorld.toMap(): Map<String, *> =
-        fieldsMapOf(
-            CachedWorld::id to id,
-            CachedWorld::randomNumber to randomNumber,
-        )
-}

+ 0 - 34
frameworks/Kotlin/hexagon/core_async/src/main/kotlin/store/BenchmarkStore.kt

@@ -1,34 +0,0 @@
-package com.hexagonkt.async.store
-
-import com.hexagonkt.model.CachedWorld
-import com.hexagonkt.model.Fortune
-import com.hexagonkt.Settings
-import com.hexagonkt.model.World
-import org.cache2k.Cache
-import org.cache2k.Cache2kBuilder
-import java.util.concurrent.CompletableFuture
-
-abstract class BenchmarkStore(settings: Settings) {
-
-    abstract fun findAllFortunes(): CompletableFuture<List<Fortune>>
-    abstract fun findWorlds(ids: List<Int>): CompletableFuture<List<World>>
-    abstract fun replaceWorlds(worlds: List<World>): CompletableFuture<*>
-    abstract fun initWorldsCache(cache: Cache<Int, CachedWorld>)
-    abstract fun loadCachedWorld(id: Int): CachedWorld
-    abstract fun close()
-
-    private val worldsCache: Cache<Int, CachedWorld> by lazy {
-        object : Cache2kBuilder<Int, CachedWorld>() {}
-            .eternal(true)
-            .disableMonitoring(true)
-            .disableStatistics(true)
-            .entryCapacity(settings.worldRows.toLong())
-            .loader { id -> loadCachedWorld(id) }
-            .build()
-            .apply { initWorldsCache(this) }
-    }
-
-    fun findCachedWorlds(ids: List<Int>): List<CachedWorld> {
-        return ids.mapNotNull { worldsCache.get(it) }
-    }
-}

+ 0 - 7
frameworks/Kotlin/hexagon/core_async/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties

@@ -1,7 +0,0 @@
-Args= \
-  -H:IncludeResources=.*\\.(html|class) \
-  --enable-preview \
-  --static \
-  --initialize-at-build-time=org.slf4j.jul.JDK14LoggerAdapter \
-  --initialize-at-build-time=org.slf4j.jul.JDK14LoggerAdapter$1 \
-  --initialize-at-build-time=org.slf4j.LoggerFactory

+ 0 - 23
frameworks/Kotlin/hexagon/core_async/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/reflect-config.json

@@ -1,23 +0,0 @@
-[
-  {
-    "name": "fortunes",
-    "allPublicMethods": true,
-    "allDeclaredFields": true,
-    "allDeclaredMethods": true,
-    "allDeclaredConstructors": true
-  },
-  {
-    "name": "fortunes$Template",
-    "allPublicMethods": true,
-    "allDeclaredFields": true,
-    "allDeclaredMethods": true,
-    "allDeclaredConstructors": true
-  },
-  {
-    "name": "fortunes$PlainText",
-    "allPublicMethods": true,
-    "allDeclaredFields": true,
-    "allDeclaredMethods": true,
-    "allDeclaredConstructors": true
-  }
-]

+ 0 - 24
frameworks/Kotlin/hexagon/core_async/src/main/resources/fortunes.rocker.html

@@ -1,24 +0,0 @@
-@import java.util.*
-@import com.hexagonkt.model.Fortune
-@args(Map<String, Object> context)
-<!DOCTYPE html>
-
-<html>
-<head>
-  <title>Fortunes</title>
-</head>
-<body>
-<table>
-  <tr>
-    <th>id</th>
-    <th>message</th>
-  </tr>
-  @for ((fortune) : (Collection<Fortune>)context.get("fortunes")) {
-  <tr>
-    <td>@fortune.getId()</td>
-    <td>@fortune.getMessage()</td>
-  </tr>
-  }
-</table>
-</body>
-</html>

+ 21 - 0
frameworks/Kotlin/hexagon/hexagon-jetty-native.dockerfile

@@ -0,0 +1,21 @@
+#
+# BUILD
+#
+FROM ghcr.io/graalvm/native-image-community:17-muslib-ol9 as build
+USER root
+WORKDIR /hexagon
+
+ADD . .
+RUN microdnf -y install findutils
+RUN ./gradlew --quiet classes
+RUN ./gradlew --quiet -x test hexagon_jetty_postgresql:nativeCompile
+
+#
+# RUNTIME
+#
+FROM scratch
+ARG PROJECT=hexagon_jetty_postgresql
+
+COPY --from=build /hexagon/$PROJECT/build/native/nativeCompile/$PROJECT /
+
+ENTRYPOINT [ "/hexagon_jetty_postgresql" ]

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 0 - 23
frameworks/Kotlin/hexagon/hexagon-nettyepoll-async-pgclient.dockerfile

@@ -1,23 +0,0 @@
-#
-# BUILD
-#
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
-USER root
-WORKDIR /hexagon
-
-ADD . .
-RUN gradle --quiet classes
-RUN gradle --quiet -x test installDist
-
-#
-# RUNTIME
-#
-FROM docker.io/eclipse-temurin:17-jre-alpine
-ARG PROJECT=hexagon_nettyepoll_async_pgclient
-
-ENV POSTGRESQL_DB_HOST tfb-database
-ENV JDK_JAVA_OPTIONS -XX:+AlwaysPreTouch -XX:+UseParallelGC -XX:+UseNUMA
-
-COPY --from=build /hexagon/$PROJECT/build/install/$PROJECT /opt/$PROJECT
-
-ENTRYPOINT [ "/opt/hexagon_nettyepoll_async_pgclient/bin/hexagon_nettyepoll_async_pgclient" ]

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 21 - 0
frameworks/Kotlin/hexagon/hexagon-nima-native.dockerfile

@@ -0,0 +1,21 @@
+#
+# BUILD
+#
+FROM ghcr.io/graalvm/native-image-community:20-muslib-ol9 as build
+USER root
+WORKDIR /hexagon
+
+ADD . .
+RUN microdnf -y install findutils
+RUN ./gradlew --quiet classes
+RUN ./gradlew --quiet -x test hexagon_nima_postgresql:nativeCompile
+
+#
+# RUNTIME
+#
+FROM scratch
+ARG PROJECT=hexagon_nima_postgresql
+
+COPY --from=build /hexagon/$PROJECT/build/native/nativeCompile/$PROJECT /
+
+ENTRYPOINT [ "/hexagon_nima_postgresql" ]

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-nima-pgclient.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-nima.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM docker.io/gradle:8.2-jdk17-alpine AS build
+FROM docker.io/gradle:8.2.1-jdk17-alpine AS build
 USER root
 WORKDIR /hexagon
 

+ 0 - 8
frameworks/Kotlin/hexagon/hexagon_nettyepoll_async_pgclient/build.gradle

@@ -1,8 +0,0 @@
-
-apply(from: "$gradleScripts/application.gradle")
-
-dependencies {
-    api(project(":store_pgclient_async"))
-    api("com.hexagonkt:http_server_netty_epoll_async:$hexagonVersion")
-    api("io.netty:netty-transport-native-epoll:$nettyVersion:linux-x86_64")
-}

+ 0 - 33
frameworks/Kotlin/hexagon/hexagon_nettyepoll_async_pgclient/src/main/kotlin/Benchmark.kt

@@ -1,33 +0,0 @@
-package com.hexagonkt
-
-import com.hexagonkt.async.Benchmark
-import com.hexagonkt.async.store.BenchmarkPgClientStore
-import com.hexagonkt.http.server.netty.epoll.async.NettyEpollServerAdapter
-import com.hexagonkt.templates.rocker.RockerAdapter
-import io.netty.util.ResourceLeakDetector
-import io.netty.util.ResourceLeakDetector.Level.DISABLED
-import java.net.URL
-
-fun main() {
-    ResourceLeakDetector.setLevel(DISABLED)
-
-    System.setProperty("vertx.disableMetrics", "true")
-    System.setProperty("vertx.disableH2c", "true")
-    System.setProperty("vertx.disableWebsockets", "true")
-    System.setProperty("vertx.flashPolicyHandler", "false")
-    System.setProperty("vertx.threadChecks", "false")
-    System.setProperty("vertx.disableContextTimings", "true")
-    System.setProperty("vertx.disableTCCL", "true")
-    System.setProperty("vertx.disableHttpHeadersValidation", "true")
-    System.setProperty("io.netty.buffer.checkBounds", "false")
-    System.setProperty("io.netty.buffer.checkAccessible", "false")
-
-    val settings = Settings()
-    val store = BenchmarkPgClientStore("postgresql")
-    val templateEngine = RockerAdapter()
-    val templateUrl = URL("classpath:fortunes.rocker.html")
-    val engine = NettyEpollServerAdapter(bossGroupThreads = 48)
-
-    val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings)
-    benchmark.server.start()
-}

+ 0 - 1
frameworks/Kotlin/hexagon/hexagon_nettyepoll_postgresql/build.gradle

@@ -1,5 +1,4 @@
 
-apply(from: "$gradleScripts/native.gradle")
 apply(from: "$gradleScripts/application.gradle")
 
 dependencies {

+ 0 - 3
frameworks/Kotlin/hexagon/settings.gradle

@@ -2,9 +2,7 @@
 include(
     "model",
     "core",
-    "core_async",
     "store_pgclient",
-    "store_pgclient_async",
     "store_sql",
 
     "hexagon_jetty_pgclient",
@@ -12,7 +10,6 @@ include(
     "hexagon_nima_pgclient",
     "hexagon_nima_postgresql",
     "hexagon_nettyepoll_pgclient",
-    "hexagon_nettyepoll_async_pgclient",
     "hexagon_nettyepoll_postgresql",
     "hexagon_tomcat_postgresql",
 )

+ 0 - 6
frameworks/Kotlin/hexagon/store_pgclient_async/build.gradle

@@ -1,6 +0,0 @@
-
-dependencies {
-    api(project(":core_async"))
-    implementation("io.vertx:vertx-pg-client:$vertxVersion")
-    implementation("com.ongres.scram:client:2.1")
-}

+ 0 - 114
frameworks/Kotlin/hexagon/store_pgclient_async/src/main/kotlin/BenchmarkPgClientStore.kt

@@ -1,114 +0,0 @@
-package com.hexagonkt.async.store
-
-import com.hexagonkt.Settings
-import com.hexagonkt.core.Jvm
-import com.hexagonkt.model.CachedWorld
-import com.hexagonkt.model.Fortune
-import com.hexagonkt.model.World
-import io.vertx.core.CompositeFuture.all
-import io.vertx.core.Future
-import io.vertx.core.Vertx.vertx
-import io.vertx.pgclient.PgConnectOptions
-import io.vertx.pgclient.PgPool
-import io.vertx.sqlclient.*
-import org.cache2k.Cache
-import java.util.concurrent.CompletableFuture
-
-class BenchmarkPgClientStore(
-    engine: String,
-    private val settings: Settings = Settings(),
-) : BenchmarkStore(settings) {
-
-    companion object {
-        private const val SELECT_WORLD: String = "select * from world where id = $1"
-        private const val UPDATE_WORLD: String = "update world set randomNumber = $1 where id = $2"
-        private const val SELECT_ALL_FORTUNES: String = "select * from fortune"
-    }
-
-    private val connectOptions: PgConnectOptions by lazy {
-        PgConnectOptions().apply {
-            host = Jvm.systemSettingOrNull("${engine.uppercase()}_DB_HOST") ?: "tfb-database"
-            database = settings.databaseName
-            user = settings.databaseUsername
-            password = settings.databasePassword
-            cachePreparedStatements = true
-        }
-    }
-
-    private val poolOptions: PoolOptions by lazy {
-        PoolOptions().apply {
-            val environment = Jvm.systemSettingOrNull<String>("BENCHMARK_ENV")?.lowercase()
-            maxSize = 8 + if (environment == "citrine") Jvm.cpuCount else Jvm.cpuCount * 2
-        }
-    }
-
-    private val dataSource: SqlClient by lazy { PgPool.pool(vertx(), connectOptions, poolOptions) }
-
-    override fun findAllFortunes(): CompletableFuture<List<Fortune>> =
-        dataSource.preparedQuery(SELECT_ALL_FORTUNES)
-            .execute()
-            .map { rowSet ->
-                rowSet.map { row -> Fortune(row.getInteger(0), row.getString(1)) }
-            }
-            .toCompletionStage()
-            .toCompletableFuture()
-
-    override fun findWorlds(ids: List<Int>): CompletableFuture<List<World>> {
-        val futures = ids.map { findWorld(it, dataSource) }
-        return all(futures).map { it.list<World>() }.toCompletionStage().toCompletableFuture()
-    }
-
-    override fun replaceWorlds(worlds: List<World>): CompletableFuture<*> {
-        val futures = worlds.map {
-            val worldId = it.id
-            val newRandomNumber = it.randomNumber
-            dataSource
-                .preparedQuery(SELECT_WORLD)
-                .execute(Tuple.of(worldId))
-                .flatMap { rowSet ->
-                    val row = rowSet.iterator().next()
-                    row.getInteger(1) // Read 'randomNumber' to comply with Test type 5, point 6
-                    dataSource
-                        .preparedQuery(UPDATE_WORLD)
-                        .execute(Tuple.of(newRandomNumber, worldId))
-                }
-        }
-        return all(futures).toCompletionStage().toCompletableFuture()
-    }
-
-    override fun initWorldsCache(cache: Cache<Int, CachedWorld>) {
-        dataSource
-            .preparedQuery("select * from world")
-            .execute()
-            .map { rowSet ->
-                rowSet.map { row ->
-                    val id = row.getInteger(0)
-                    val randomNumber = row.getInteger(1)
-                    cache.put(id, CachedWorld(id, randomNumber))
-                }
-            }
-            .toCompletionStage()
-            .toCompletableFuture()
-            .get()
-    }
-
-    override fun loadCachedWorld(id: Int): CachedWorld =
-        findWorld(id, dataSource)
-            .map { world -> CachedWorld(world.id, world.randomNumber) }
-            .toCompletionStage()
-            .toCompletableFuture()
-            .get()
-
-    override fun close() {
-        dataSource.close()
-    }
-
-    private fun findWorld(id: Int, client: SqlClient): Future<World> =
-        client
-            .preparedQuery(SELECT_WORLD)
-            .execute(Tuple.of(id))
-            .map { rowSet ->
-                val row = rowSet.iterator().next()
-                World(row.getInteger(0), row.getInteger(1))
-            }
-}