From c4443eb4b04a63f6010d51d411dfe286a301dc81 Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Thu, 8 Aug 2024 22:04:37 +0200 Subject: [PATCH 01/22] Update to jsonsergen 0.0.5 with the JsonDsl backend (#9190) --- frameworks/Java/vertx/pom.xml | 8 ++++---- .../Java/vertx/src/main/java/vertx/model/CachedWorld.java | 3 ++- .../Java/vertx/src/main/java/vertx/model/Message.java | 3 ++- .../Java/vertx/src/main/java/vertx/model/World.java | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/frameworks/Java/vertx/pom.xml b/frameworks/Java/vertx/pom.xml index 12eff9d69a5..06199d308db 100644 --- a/frameworks/Java/vertx/pom.xml +++ b/frameworks/Java/vertx/pom.xml @@ -28,14 +28,14 @@ ${stack.version} - com.fasterxml.jackson.core - jackson-core - ${jackson.version} + com.dslplatform + dsl-json + 2.0.2 com.julienviet jsonsergen - 0.0.4 + 0.0.5 io.netty diff --git a/frameworks/Java/vertx/src/main/java/vertx/model/CachedWorld.java b/frameworks/Java/vertx/src/main/java/vertx/model/CachedWorld.java index 423d5273f62..3a55bfc2e89 100644 --- a/frameworks/Java/vertx/src/main/java/vertx/model/CachedWorld.java +++ b/frameworks/Java/vertx/src/main/java/vertx/model/CachedWorld.java @@ -1,5 +1,6 @@ package vertx.model; +import com.julienviet.jsonsergen.Backend; import com.julienviet.jsonsergen.JsonSerGen; import io.vertx.codegen.annotations.DataObject; import io.vertx.core.buffer.Buffer; @@ -10,7 +11,7 @@ * The model for the "world" database table. */ @DataObject -@JsonSerGen +@JsonSerGen(backends = Backend.DSL_JSON) public final class CachedWorld implements Comparable { private final int id; diff --git a/frameworks/Java/vertx/src/main/java/vertx/model/Message.java b/frameworks/Java/vertx/src/main/java/vertx/model/Message.java index ce240bd5ae9..ab9cd2a3d48 100644 --- a/frameworks/Java/vertx/src/main/java/vertx/model/Message.java +++ b/frameworks/Java/vertx/src/main/java/vertx/model/Message.java @@ -1,11 +1,12 @@ package vertx.model; +import com.julienviet.jsonsergen.Backend; import com.julienviet.jsonsergen.JsonSerGen; import io.vertx.codegen.annotations.DataObject; import io.vertx.core.buffer.Buffer; @DataObject -@JsonSerGen +@JsonSerGen(backends = Backend.DSL_JSON) public class Message { private String message; diff --git a/frameworks/Java/vertx/src/main/java/vertx/model/World.java b/frameworks/Java/vertx/src/main/java/vertx/model/World.java index 43f7bfc2a61..610f4371cab 100644 --- a/frameworks/Java/vertx/src/main/java/vertx/model/World.java +++ b/frameworks/Java/vertx/src/main/java/vertx/model/World.java @@ -1,5 +1,6 @@ package vertx.model; +import com.julienviet.jsonsergen.Backend; import com.julienviet.jsonsergen.JsonSerGen; import io.vertx.codegen.annotations.DataObject; import io.vertx.core.buffer.Buffer; @@ -8,7 +9,7 @@ * The model for the "world" database table. */ @DataObject -@JsonSerGen +@JsonSerGen(backends = Backend.DSL_JSON) public final class World implements Comparable { private final int id; From 8d801c857067756c18f7ecec8da58e98ff5e97bd Mon Sep 17 00:00:00 2001 From: Juanjo Aguililla Date: Thu, 8 Aug 2024 22:04:53 +0200 Subject: [PATCH 02/22] [Kotlin/Hexagon] Update Hexagon and dependencies' versions (#9191) * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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] * 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 * Add note * Add note * Update dependencies * Update dependencies * Update dependencies * Recheck CI jobs * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update Hexagon and Java version, switch templates to JTE * Update Hexagon and improve Netty Epoll configuration * Update Hexagon version * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update dependencies * Update Hexagon version * Update dependencies --------- Signed-off-by: dependabot[bot] 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> --- frameworks/Kotlin/hexagon/build.gradle | 14 +++++++------- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../hexagon/hexagon-helidon-pgclient.dockerfile | 4 ++-- .../Kotlin/hexagon/hexagon-helidon.dockerfile | 4 ++-- .../hexagon/hexagon-jettyloom-pgclient.dockerfile | 4 ++-- .../Kotlin/hexagon/hexagon-jettyloom.dockerfile | 4 ++-- .../hexagon/hexagon-nettyepoll-pgclient.dockerfile | 4 ++-- .../Kotlin/hexagon/hexagon-nettyepoll.dockerfile | 4 ++-- .../Kotlin/hexagon/hexagon-tomcat.dockerfile | 4 ++-- frameworks/Kotlin/hexagon/hexagon.dockerfile | 4 ++-- .../src/main/kotlin/WebListenerServer.kt | 5 +++-- 11 files changed, 27 insertions(+), 26 deletions(-) diff --git a/frameworks/Kotlin/hexagon/build.gradle b/frameworks/Kotlin/hexagon/build.gradle index 9279d3b38fd..a4d141e5c2a 100644 --- a/frameworks/Kotlin/hexagon/build.gradle +++ b/frameworks/Kotlin/hexagon/build.gradle @@ -1,7 +1,7 @@ plugins { - id "org.jetbrains.kotlin.jvm" version "1.9.23" apply false - id "org.graalvm.buildtools.native" version "0.10.1" apply false + id "org.jetbrains.kotlin.jvm" version "2.0.20-RC" apply false + id "org.graalvm.buildtools.native" version "0.10.2" apply false } version = "1.0.0" @@ -9,13 +9,13 @@ description = "TFB benchmark" group = "com.hexagonkt" ext { - hexagonVersion = "3.5.1" - jettyVersion = "12.0.7" - nettyVersion = "4.1.107.Final" + hexagonVersion = "3.6.1" + jettyVersion = "12.0.12" + nettyVersion = "4.1.112.Final" hikariVersion = "5.1.0" postgresqlVersion = "42.7.3" - vertxVersion = "4.5.5" + vertxVersion = "4.5.9" cache2kVersion = "2.6.1.Final" applicationClass = "com.hexagonkt.BenchmarkKt" @@ -30,5 +30,5 @@ subprojects { } tasks.wrapper { - gradleVersion = "8.6" + gradleVersion = "8.9" } diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties index a80b22ce5cf..09523c0e549 100644 --- a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties +++ b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile index d87e78307b0..3b3a1602f55 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test installDist # # RUNTIME # -FROM docker.io/eclipse-temurin:21-jre-alpine +FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl ARG PROJECT=hexagon_helidon_pgclient ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile index 913a9459a06..271fa95dbf8 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test installDist # # RUNTIME # -FROM docker.io/eclipse-temurin:21-jre-alpine +FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl ARG PROJECT=hexagon_helidon_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile index 90d51b0b30b..d6c37bcd77f 100644 --- a/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test installDist # # RUNTIME # -FROM docker.io/eclipse-temurin:21-jre-alpine +FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl ARG PROJECT=hexagon_jetty_pgclient ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile b/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile index 93b0e22a963..07bf482b28e 100644 --- a/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test installDist # # RUNTIME # -FROM docker.io/eclipse-temurin:21-jre-alpine +FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl ARG PROJECT=hexagon_jetty_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile index ba9b55020b9..972347f053b 100644 --- a/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test installDist # # RUNTIME # -FROM docker.io/eclipse-temurin:21-jre-alpine +FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl ARG PROJECT=hexagon_nettyepoll_pgclient ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile b/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile index a7c28730e03..393f73f62a6 100644 --- a/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test installDist # # RUNTIME # -FROM docker.io/eclipse-temurin:21-jre-alpine +FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl ARG PROJECT=hexagon_nettyepoll_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile index abd537c0dd3..32e153cbc0a 100644 --- a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test war # # RUNTIME # -FROM docker.io/tomcat:10-jre21-temurin-jammy +FROM docker.io/tomcat:11.0.0-jre21-temurin-noble ARG MODULE=/hexagon/hexagon_tomcat_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon.dockerfile b/frameworks/Kotlin/hexagon/hexagon.dockerfile index a8eec2e6809..59f89e5cb5c 100644 --- a/frameworks/Kotlin/hexagon/hexagon.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.6-jdk21-alpine AS build +FROM docker.io/gradle:8.9-jdk21-alpine AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN gradle --quiet -x test installDist # # RUNTIME # -FROM docker.io/eclipse-temurin:21-jre-alpine +FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl ARG PROJECT=hexagon_jetty_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon_tomcat_postgresql/src/main/kotlin/WebListenerServer.kt b/frameworks/Kotlin/hexagon/hexagon_tomcat_postgresql/src/main/kotlin/WebListenerServer.kt index 69fe6d13ba6..c7d7ea4449c 100644 --- a/frameworks/Kotlin/hexagon/hexagon_tomcat_postgresql/src/main/kotlin/WebListenerServer.kt +++ b/frameworks/Kotlin/hexagon/hexagon_tomcat_postgresql/src/main/kotlin/WebListenerServer.kt @@ -6,6 +6,7 @@ import com.hexagonkt.http.model.Header import com.hexagonkt.http.model.Headers import com.hexagonkt.http.handlers.HttpHandler import com.hexagonkt.http.handlers.OnHandler +import com.hexagonkt.http.handlers.PathHandler import com.hexagonkt.http.server.servlet.ServletServer import com.hexagonkt.store.BenchmarkSqlStore import com.hexagonkt.templates.jte.JteAdapter @@ -18,7 +19,7 @@ import jakarta.servlet.annotation.WebListener private companion object { val headers = Headers(Header("server", "Tomcat")) - fun createHandlers(settings: Settings): List { + fun createHandlers(settings: Settings): HttpHandler { val store = BenchmarkSqlStore("postgresql") val templateEngine = JteAdapter(TEXT_HTML, precompiled = true) val templateUrl = urlOf("classpath:fortunes.jte") @@ -28,7 +29,7 @@ import jakarta.servlet.annotation.WebListener send(headers = headers) } - return listOf(serverHeaderHandler, controllerPath) + return PathHandler(serverHeaderHandler, controllerPath) } } } From ee5d2b2b8574bbe6c805863d1e09367a8927353d Mon Sep 17 00:00:00 2001 From: Andrew McCloskey Date: Thu, 8 Aug 2024 16:05:05 -0400 Subject: [PATCH 03/22] vertx-web-kotlin-dsljson updates (#9192) * minor performance improvements and warning suppression * vertx-web-kotlin-dsljson updates * formatting * update postgres socket connection config --- .../configuration/scripts/server.sh | 12 ++++++------ .../src/main/kotlin/com/example/starter/App.kt | 8 ++++---- .../com/example/starter/PostgresVerticle.kt | 15 ++++----------- .../com/example/starter/db/AbstractRepository.kt | 2 +- .../com/example/starter/db/FortuneRepository.kt | 4 ++-- .../com/example/starter/db/WorldRepository.kt | 10 +++++----- .../com/example/starter/utils/JsonExtensions.kt | 2 +- .../example/starter/utils/PeriodicDateResolver.kt | 7 +++++-- .../com/example/starter/utils/RowSetExtensions.kt | 3 ++- .../example/starter/utils/ThrowableExtensions.kt | 12 ++++++++---- .../src/main/resources/pg-connect-options.json | 5 +---- ...vertx-web-kotlin-dsljson-postgresql.dockerfile | 4 +++- .../vertx-web-kotlin-dsljson.dockerfile | 4 +++- 13 files changed, 45 insertions(+), 43 deletions(-) diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/configuration/scripts/server.sh b/frameworks/Kotlin/vertx-web-kotlin-dsljson/configuration/scripts/server.sh index 80e05662a59..a5b03908062 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/configuration/scripts/server.sh +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/configuration/scripts/server.sh @@ -1,16 +1,17 @@ #!/bin/bash -NUM_PROCESSORS=$((`grep --count ^processor /proc/cpuinfo`)) - JVM_OPTS="-server \ -Xms2G \ -Xmx2G \ + -XX:+AlwaysPreTouch \ -XX:+UseParallelGC \ + -XX:+PreserveFramePointer \ + -XX:+EnableDynamicAgentLoading \ -XX:InitialCodeCacheSize=512m \ -XX:ReservedCodeCacheSize=512m \ -XX:MaxInlineLevel=20 \ - -XX:+AlwaysPreTouch \ -XX:+UseNUMA \ + -Djava.lang.Integer.IntegerCache.high=10000 \ -Dvertx.disableMetrics=true \ -Dvertx.disableH2c=true \ -Dvertx.disableWebsockets=true \ @@ -19,6 +20,7 @@ JVM_OPTS="-server \ -Dvertx.disableContextTimings=true \ -Dvertx.disableTCCL=true \ -Dvertx.disableHttpHeadersValidation=true \ + -Dvertx.eventLoopPoolSize=$((`grep --count ^processor /proc/cpuinfo`)) \ -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \ -Dio.netty.buffer.checkBounds=false \ -Dio.netty.buffer.checkAccessible=false \ @@ -26,8 +28,6 @@ JVM_OPTS="-server \ JAR_PATH="./build/libs/vertx-web-kotlin-dsljson-benchmark-1.0.0-SNAPSHOT-fat.jar" -VERTX_ARGS="-instances 1" - cleanup() { echo "Caught SIGINT signal. Stopping the Java program..." if [ ! -z "$JAVA_PID" ]; then @@ -39,7 +39,7 @@ cleanup() { trap cleanup SIGINT -java $JVM_OPTS -jar $JAR_PATH $VERTX_ARGS & +java $JVM_OPTS -jar $JAR_PATH & JAVA_PID=$! echo "Server PID: $JAVA_PID" diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/App.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/App.kt index 03fb0ca2c04..ee66a635231 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/App.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/App.kt @@ -3,7 +3,6 @@ package com.example.starter import com.example.starter.utils.PeriodicDateResolver import com.example.starter.utils.block import io.vertx.core.Vertx -import io.vertx.core.impl.cpu.CpuCoreSensor import io.vertx.kotlin.core.deploymentOptionsOf import io.vertx.kotlin.core.vertxOptionsOf import kotlin.time.Duration.Companion.seconds @@ -14,11 +13,12 @@ object App : Logging { @JvmStatic fun main(args: Array?) { - val numCores = CpuCoreSensor.availableProcessors() + val eventLoopPoolSize = System.getProperty("vertx.eventLoopPoolSize")?.toInt() + ?: Runtime.getRuntime().availableProcessors() val vertx = Vertx.vertx( vertxOptionsOf( - eventLoopPoolSize = numCores, + eventLoopPoolSize = eventLoopPoolSize, preferNativeTransport = true, ) ) @@ -41,7 +41,7 @@ object App : Logging { vertx.deployVerticle( { if (hasDb) PostgresVerticle() else BasicVerticle() }, deploymentOptionsOf( - instances = numCores, + instances = eventLoopPoolSize, ) ) diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/PostgresVerticle.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/PostgresVerticle.kt index 43cba217ec0..4caa057b488 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/PostgresVerticle.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/PostgresVerticle.kt @@ -5,10 +5,8 @@ import com.example.starter.db.WorldRepository import com.example.starter.handlers.FortuneHandler import com.example.starter.handlers.WorldHandler import com.example.starter.io.JsonResource -import com.example.starter.utils.array import com.example.starter.utils.isConnectionReset import io.vertx.core.AbstractVerticle -import io.vertx.core.Future import io.vertx.core.Promise import io.vertx.core.http.HttpServerOptions import io.vertx.ext.web.Router @@ -18,15 +16,10 @@ import org.apache.logging.log4j.kotlin.Logging class PostgresVerticle : AbstractVerticle() { override fun start(startPromise: Promise) { - Future.all( - PgConnection.connect(vertx, PG_CONNECT_OPTIONS), - PgConnection.connect(vertx, PG_CONNECT_OPTIONS), - ) - .onSuccess { cf -> - val pool = cf.array() - - val fortuneHandler = FortuneHandler(FortuneRepository(pool)) - val worldHandler = WorldHandler(WorldRepository(pool)) + PgConnection.connect(vertx, PG_CONNECT_OPTIONS) + .onSuccess { conn -> + val fortuneHandler = FortuneHandler(FortuneRepository(conn)) + val worldHandler = WorldHandler(WorldRepository(conn)) val router = Router.router(vertx) diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/AbstractRepository.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/AbstractRepository.kt index df665df0769..f2dec9a5f84 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/AbstractRepository.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/AbstractRepository.kt @@ -3,5 +3,5 @@ package com.example.starter.db import io.vertx.pgclient.PgConnection abstract class AbstractRepository( - protected val pool: Array + protected val conn: PgConnection ) \ No newline at end of file diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/FortuneRepository.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/FortuneRepository.kt index 3bb95576a4d..b9e4b9ab784 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/FortuneRepository.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/FortuneRepository.kt @@ -7,8 +7,8 @@ import io.vertx.core.Future import io.vertx.pgclient.PgConnection import io.vertx.sqlclient.Row -class FortuneRepository(pool: Array) : AbstractRepository(pool) { - private val selectFortuneQuery = this.pool[0].preparedQuery(SELECT_FORTUNE_SQL) +class FortuneRepository(conn: PgConnection) : AbstractRepository(conn) { + private val selectFortuneQuery = this.conn.preparedQuery(SELECT_FORTUNE_SQL) fun selectFortunes(): Future> = selectFortuneQuery .execute() diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/WorldRepository.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/WorldRepository.kt index 734b486547a..74823141453 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/WorldRepository.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/db/WorldRepository.kt @@ -13,10 +13,10 @@ import io.vertx.sqlclient.impl.SqlClientInternal import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.atomic.AtomicInteger -@Suppress("NOTHING_TO_INLINE") -class WorldRepository(pool: Array) : AbstractRepository(pool) { - private val selectWorldQuery = this.pool[0].preparedQuery(SELECT_WORLD_SQL) - private val updateWorldQueries = generateQueries(this.pool[1]) +@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST") +class WorldRepository(conn: PgConnection) : AbstractRepository(conn) { + private val selectWorldQuery = this.conn.preparedQuery(SELECT_WORLD_SQL) + private val updateWorldQueries = generateQueries(this.conn) fun selectRandomWorld(): Future = selectWorldQuery .execute(Tuple.of(randomWorld())) @@ -26,7 +26,7 @@ class WorldRepository(pool: Array) : AbstractRepository(poo val promise = Promise.promise>() val arr = arrayOfNulls(numWorlds) val count = AtomicInteger(0) - (this.pool[0] as SqlClientInternal).group { c -> + (this.conn as SqlClientInternal).group { c -> repeat(numWorlds) { c.preparedQuery(SELECT_WORLD_SQL).execute(Tuple.of(randomWorld())) { ar -> val index = count.getAndIncrement() diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/JsonExtensions.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/JsonExtensions.kt index 87c965ca9b7..264be5a7323 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/JsonExtensions.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/JsonExtensions.kt @@ -16,4 +16,4 @@ inline fun T.serialize(initialSizeHint: Int = 0): Buffer { val output = BufferOutputStream(initialSizeHint) DSL_JSON.serialize(this, output) return output -} \ No newline at end of file +} diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/PeriodicDateResolver.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/PeriodicDateResolver.kt index 2e29e784914..23786587569 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/PeriodicDateResolver.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/PeriodicDateResolver.kt @@ -1,16 +1,19 @@ package com.example.starter.utils import io.vertx.core.Vertx +import io.vertx.core.http.HttpHeaders import java.time.ZonedDateTime import java.time.format.DateTimeFormatter object PeriodicDateResolver { - var current: String = next() + var current: CharSequence = next() fun init(vertx: Vertx) { vertx.setPeriodic(1000L) { current = next() } } @Suppress("NOTHING_TO_INLINE") - private inline fun next(): String = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now()) + private inline fun next(): CharSequence = HttpHeaders.createOptimized( + DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now()) + ) } \ No newline at end of file diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/RowSetExtensions.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/RowSetExtensions.kt index c968777ff77..3959ba8d9a0 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/RowSetExtensions.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/RowSetExtensions.kt @@ -5,10 +5,11 @@ import io.vertx.sqlclient.RowSet // This extension relies on the assumption the mapper never returns null, as it is defined. Otherwise, // we prevent the overhead from having to do another iteration over the loop for a `filterNotNull` check. +@Suppress("UNCHECKED_CAST") inline fun RowSet.mapToArray(mapper: (Row) -> U): Array { val arr = arrayOfNulls(this.size()) val iterator = this.iterator() var index = 0 while (iterator.hasNext()) arr[index++] = mapper(iterator.next()) return arr as Array -} \ No newline at end of file +} diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/ThrowableExtensions.kt b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/ThrowableExtensions.kt index 044d24b06ab..00cf1463297 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/ThrowableExtensions.kt +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/kotlin/com/example/starter/utils/ThrowableExtensions.kt @@ -6,7 +6,11 @@ import java.net.SocketException const val CONNECTION_RESET_MESSAGE = "Connection reset" -fun Throwable.isConnectionReset(): Boolean { - return (this is NativeIoException && this.expectedErr() == Errors.ERRNO_ECONNRESET_NEGATIVE) - || (this is SocketException && this.message == CONNECTION_RESET_MESSAGE) -} \ No newline at end of file +@Suppress("NOTHING_TO_INLINE") +inline fun Throwable.isConnectionReset(): Boolean { + return when { + this is NativeIoException && this.expectedErr() == Errors.ERRNO_ECONNRESET_NEGATIVE -> true + this is SocketException && this.message == CONNECTION_RESET_MESSAGE -> true + else -> false + } +} diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/resources/pg-connect-options.json b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/resources/pg-connect-options.json index a145a0a51c5..3cf43317687 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/resources/pg-connect-options.json +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/src/main/resources/pg-connect-options.json @@ -5,10 +5,7 @@ "port": 5432, "database": "hello_world", "cachePreparedStatements": true, - "preparedStatementCacheMaxSize": 512, - "preparedStatementCacheSqlLimit": 2048, - "tcpKeepAlive": true, - "tcpFastOpen": true, + "preparedStatementCacheMaxSize": 1024, "pipeliningLimit": 100000, "receiveBufferSize": 262144, "sendBufferSize": 262144 diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson-postgresql.dockerfile b/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson-postgresql.dockerfile index 0ef28c410d9..50152d8df30 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson-postgresql.dockerfile +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson-postgresql.dockerfile @@ -17,10 +17,11 @@ CMD java \ -Xmx2G \ -XX:+AlwaysPreTouch \ -XX:+UseParallelGC \ - -XX:InitialCodeCacheSize=512m \ + -XX:InitialCodeCacheSize=512m \ -XX:ReservedCodeCacheSize=512m \ -XX:MaxInlineLevel=20 \ -XX:+UseNUMA \ + -Djava.lang.Integer.IntegerCache.high=10000 \ -Dvertx.disableMetrics=true \ -Dvertx.disableH2c=true \ -Dvertx.disableWebsockets=true \ @@ -29,6 +30,7 @@ CMD java \ -Dvertx.disableContextTimings=true \ -Dvertx.disableTCCL=true \ -Dvertx.disableHttpHeadersValidation=true \ + -Dvertx.eventLoopPoolSize=$((`grep --count ^processor /proc/cpuinfo`)) \ -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \ -Dio.netty.buffer.checkBounds=false \ -Dio.netty.buffer.checkAccessible=false \ diff --git a/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson.dockerfile b/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson.dockerfile index a4a1c142cf5..568f19f79dd 100644 --- a/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson.dockerfile +++ b/frameworks/Kotlin/vertx-web-kotlin-dsljson/vertx-web-kotlin-dsljson.dockerfile @@ -17,10 +17,11 @@ CMD java \ -Xmx2G \ -XX:+AlwaysPreTouch \ -XX:+UseParallelGC \ - -XX:InitialCodeCacheSize=512m \ + -XX:InitialCodeCacheSize=512m \ -XX:ReservedCodeCacheSize=512m \ -XX:MaxInlineLevel=20 \ -XX:+UseNUMA \ + -Djava.lang.Integer.IntegerCache.high=10000 \ -Dvertx.disableMetrics=true \ -Dvertx.disableH2c=true \ -Dvertx.disableWebsockets=true \ @@ -29,6 +30,7 @@ CMD java \ -Dvertx.disableContextTimings=true \ -Dvertx.disableTCCL=true \ -Dvertx.disableHttpHeadersValidation=true \ + -Dvertx.eventLoopPoolSize=$((`grep --count ^processor /proc/cpuinfo`)) \ -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \ -Dio.netty.buffer.checkBounds=false \ -Dio.netty.buffer.checkAccessible=false \ From 2e05f43beb2bdbf2dffa80b0bfadb584e21793a9 Mon Sep 17 00:00:00 2001 From: Francesco Iapicca Date: Thu, 8 Aug 2024 23:06:20 +0300 Subject: [PATCH 04/22] Add Dart 3 example (#9197) * port dart2 implementation * somehow stable version of dart in docker is not 3.5.0 yet, reverting pubspec and dockerfile * general code clean up * update dockerfile * update server binding * change InternetAddress in binging to string * re-bump to dart 3.5 * fix error in server.dart * rename Containerfile as dart3.dockerfile --------- Co-authored-by: Francesco Iapicca --- frameworks/Dart/dart3/.dockerignore | 9 +++ frameworks/Dart/dart3/.gitignore | 5 ++ frameworks/Dart/dart3/README.md | 22 +++++ frameworks/Dart/dart3/analysis_options.yaml | 1 + frameworks/Dart/dart3/benchmark_config.json | 26 ++++++ frameworks/Dart/dart3/bin/server.dart | 89 +++++++++++++++++++++ frameworks/Dart/dart3/dart3.dockerfile | 14 ++++ frameworks/Dart/dart3/pubspec.yaml | 7 ++ 8 files changed, 173 insertions(+) create mode 100644 frameworks/Dart/dart3/.dockerignore create mode 100644 frameworks/Dart/dart3/.gitignore create mode 100644 frameworks/Dart/dart3/README.md create mode 100644 frameworks/Dart/dart3/analysis_options.yaml create mode 100644 frameworks/Dart/dart3/benchmark_config.json create mode 100755 frameworks/Dart/dart3/bin/server.dart create mode 100644 frameworks/Dart/dart3/dart3.dockerfile create mode 100644 frameworks/Dart/dart3/pubspec.yaml diff --git a/frameworks/Dart/dart3/.dockerignore b/frameworks/Dart/dart3/.dockerignore new file mode 100644 index 00000000000..6a6cc8727a7 --- /dev/null +++ b/frameworks/Dart/dart3/.dockerignore @@ -0,0 +1,9 @@ +# From https://hub.docker.com/_/dart +.dockerignore +Dockerfile +build/ +.dart_tool/ +.git/ +.github/ +.gitignore +.packages diff --git a/frameworks/Dart/dart3/.gitignore b/frameworks/Dart/dart3/.gitignore new file mode 100644 index 00000000000..8ac40f21809 --- /dev/null +++ b/frameworks/Dart/dart3/.gitignore @@ -0,0 +1,5 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ +*.lock +!bin \ No newline at end of file diff --git a/frameworks/Dart/dart3/README.md b/frameworks/Dart/dart3/README.md new file mode 100644 index 00000000000..7152e705637 --- /dev/null +++ b/frameworks/Dart/dart3/README.md @@ -0,0 +1,22 @@ +# Dart 3 Benchmarking Test + +### Test Type Implementation Source Code + +- [JSON](server.dart) +- [PLAINTEXT](server.dart) + +## Important Libraries + +The tests were run with: + +- [Dart v3.4.4](https://dart.dev/) + +## Test URLs + +### JSON + +http://localhost:8080/json + +### PLAINTEXT + +http://localhost:8080/plaintext diff --git a/frameworks/Dart/dart3/analysis_options.yaml b/frameworks/Dart/dart3/analysis_options.yaml new file mode 100644 index 00000000000..572dd239d09 --- /dev/null +++ b/frameworks/Dart/dart3/analysis_options.yaml @@ -0,0 +1 @@ +include: package:lints/recommended.yaml diff --git a/frameworks/Dart/dart3/benchmark_config.json b/frameworks/Dart/dart3/benchmark_config.json new file mode 100644 index 00000000000..059fb368d0e --- /dev/null +++ b/frameworks/Dart/dart3/benchmark_config.json @@ -0,0 +1,26 @@ +{ + "framework": "dart3", + "tests": [ + { + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Stripped", + "classification": "Platform", + "database": "None", + "framework": "None", + "language": "Dart", + "flavor": "None", + "orm": "None", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "dart3", + "notes": "", + "versus": "None" + } + } + ] +} diff --git a/frameworks/Dart/dart3/bin/server.dart b/frameworks/Dart/dart3/bin/server.dart new file mode 100755 index 00000000000..f2b98dcd197 --- /dev/null +++ b/frameworks/Dart/dart3/bin/server.dart @@ -0,0 +1,89 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:isolate'; + +final _encoder = JsonUtf8Encoder(); + +void main(List _) async { + /// Create an [Isolate] containinig an [HttpServer] + /// for each processor after the first + for (var i = 1; i < Platform.numberOfProcessors; i++) { + await Isolate.spawn(_startServer, _); + } + + /// Create a [HttpServer] for the first processor + await _startServer(_); +} + +/// Creates and setup a [HttpServer] +Future _startServer(List _) async { + /// Binds the [HttpServer] on `0.0.0.0:8080`. + final server = await HttpServer.bind( + InternetAddress('0.0.0.0', type: InternetAddressType.IPv4), + 8080, + shared: true, + ); + + /// Sets [HttpServer]'s [serverHeader]. + server + ..defaultResponseHeaders.clear() + ..serverHeader = 'dart'; + + /// Handles [HttpRequest]'s from [HttpServer]. + await for (final request in server) { + switch (request.uri.path) { + case '/json': + _jsonTest(request); + break; + case '/plaintext': + _plaintextTest(request); + break; + default: + _sendResponse(request, HttpStatus.notFound); + } + } +} + +/// Completes the given [request] by writing the [bytes] with the given +/// [statusCode] and [type]. +void _sendResponse( + HttpRequest request, + int statusCode, { + ContentType? type, + List bytes = const [], +}) => + request.response + ..statusCode = statusCode + ..headers.contentType = type + ..headers.date = DateTime.now() + ..contentLength = bytes.length + ..add(bytes) + ..close(); + +/// Completes the given [request] by writing the [response] as JSON. +void _sendJson(HttpRequest request, Object response) => _sendResponse( + request, + HttpStatus.ok, + type: ContentType.json, + bytes: _encoder.convert(response), + ); + +/// Completes the given [request] by writing the [response] as plain text. +void _sendText(HttpRequest request, String response) => _sendResponse( + request, + HttpStatus.ok, + type: ContentType.text, + bytes: utf8.encode(response), + ); + +/// Responds with the JSON test to the [request]. +void _jsonTest(HttpRequest request) => _sendJson( + request, + const {'message': 'Hello, World!'}, + ); + +/// Responds with the plaintext test to the [request]. +void _plaintextTest(HttpRequest request) => _sendText( + request, + 'Hello, World!', + ); diff --git a/frameworks/Dart/dart3/dart3.dockerfile b/frameworks/Dart/dart3/dart3.dockerfile new file mode 100644 index 00000000000..7e6e9053968 --- /dev/null +++ b/frameworks/Dart/dart3/dart3.dockerfile @@ -0,0 +1,14 @@ + +FROM dart:3.5 AS builder + +COPY . /app +WORKDIR /app +RUN mkdir build +RUN dart compile exe ./bin/server.dart -o build/server + +FROM scratch +COPY --from=builder /runtime/ / +COPY --from=builder /app/build /bin + +EXPOSE 8080 +CMD ["server"] \ No newline at end of file diff --git a/frameworks/Dart/dart3/pubspec.yaml b/frameworks/Dart/dart3/pubspec.yaml new file mode 100644 index 00000000000..2b351720c9b --- /dev/null +++ b/frameworks/Dart/dart3/pubspec.yaml @@ -0,0 +1,7 @@ +name: dartbenchmark +description: A benchmark of dart +environment: + sdk: '>=3.5.0 <4.0.0' + +dev_dependencies: + lints: ^4.0.0 From 3d5d29ef7d557a2cb5e843a97c610bff0e96b9f2 Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Thu, 8 Aug 2024 22:06:31 +0200 Subject: [PATCH 05/22] [php] Laravel update to v 11 (#9200) * Update Laravel to v 11 * Update and clean dockerfiles * Fix pecl * Update dockerfile and remove extra composer.json * Clean dockerfile --- frameworks/PHP/laravel/composer.json | 2 +- frameworks/PHP/laravel/deploy/conf/php.ini | 2 +- .../laravel/deploy/workerman/composer.json | 58 ------------------- .../PHP/laravel/laravel-laravel-s.dockerfile | 6 +- .../laravel-octane-frankenphp.dockerfile | 26 ++++----- .../PHP/laravel/laravel-roadrunner.dockerfile | 6 +- .../PHP/laravel/laravel-swoole.dockerfile | 6 +- .../PHP/laravel/laravel-workerman.dockerfile | 24 ++++---- frameworks/PHP/laravel/laravel.dockerfile | 21 +++---- 9 files changed, 54 insertions(+), 97 deletions(-) delete mode 100644 frameworks/PHP/laravel/deploy/workerman/composer.json diff --git a/frameworks/PHP/laravel/composer.json b/frameworks/PHP/laravel/composer.json index 094026428e5..f25952eccea 100644 --- a/frameworks/PHP/laravel/composer.json +++ b/frameworks/PHP/laravel/composer.json @@ -8,7 +8,7 @@ ], "license": "MIT", "require": { - "laravel/framework": "^10" + "laravel/framework": "^11" }, "config": { "optimize-autoloader": true, diff --git a/frameworks/PHP/laravel/deploy/conf/php.ini b/frameworks/PHP/laravel/deploy/conf/php.ini index 82133535145..98e34225e0d 100644 --- a/frameworks/PHP/laravel/deploy/conf/php.ini +++ b/frameworks/PHP/laravel/deploy/conf/php.ini @@ -1767,7 +1767,7 @@ ldap.max_links = -1 opcache.enable=1 ; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 +opcache.enable_cli=1 ; The OPcache shared memory storage size. ;opcache.memory_consumption=128 diff --git a/frameworks/PHP/laravel/deploy/workerman/composer.json b/frameworks/PHP/laravel/deploy/workerman/composer.json deleted file mode 100644 index 343ff8fcf3c..00000000000 --- a/frameworks/PHP/laravel/deploy/workerman/composer.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "laravel/laravel", - "type": "project", - "description": "The Laravel Framework.", - "keywords": [ - "framework", - "laravel" - ], - "license": "MIT", - "require": { - "php": "^8.0", - "laravel/framework": "^8.0", - "joanhey/adapterman": "^0.6" - }, - "require-dev": { - "facade/ignition": "^2.3.6", - "fzaninotto/faker": "^1.9.1", - "mockery/mockery": "^1.3.1", - "nunomaduro/collision": "^5.0", - "phpunit/phpunit": "^9.3" - }, - "config": { - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true - }, - "extra": { - "laravel": { - "dont-discover": [] - } - }, - "autoload": { - "psr-4": { - "App\\": "app/" - } - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests/" - } - }, - "minimum-stability": "dev", - "prefer-stable": true, - "scripts": { - "post-autoload-dump": [ - "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", - "@php artisan package:discover --ansi" - ], - "post-root-package-install": [ - "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" - ], - "post-create-project-cmd": [ - "@php artisan key:generate --ansi" - ] - } -} - - diff --git a/frameworks/PHP/laravel/laravel-laravel-s.dockerfile b/frameworks/PHP/laravel/laravel-laravel-s.dockerfile index a0e946e5097..c353ef28b4f 100644 --- a/frameworks/PHP/laravel/laravel-laravel-s.dockerfile +++ b/frameworks/PHP/laravel/laravel-laravel-s.dockerfile @@ -9,7 +9,11 @@ RUN echo "opcache.jit_buffer_size=128M" >> /usr/local/etc/php/conf.d/docker-php- WORKDIR /laravel COPY --link . . -RUN mkdir -p /laravel/bootstrap/cache /laravel/storage/logs /laravel/storage/framework/sessions /laravel/storage/framework/views /laravel/storage/framework/cache +RUN mkdir -p bootstrap/cache \ + storage/logs \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache COPY --link deploy/laravel-s/composer.json . diff --git a/frameworks/PHP/laravel/laravel-octane-frankenphp.dockerfile b/frameworks/PHP/laravel/laravel-octane-frankenphp.dockerfile index 1829a4292f4..2ad30a612e3 100644 --- a/frameworks/PHP/laravel/laravel-octane-frankenphp.dockerfile +++ b/frameworks/PHP/laravel/laravel-octane-frankenphp.dockerfile @@ -1,25 +1,25 @@ FROM dunglas/frankenphp RUN install-php-extensions \ - pcntl \ + intl \ + opcache \ + pcntl \ pdo_mysql \ - intl \ - zip \ - opcache > /dev/null + zip > /dev/null -COPY . /app +COPY --link . /app/ -COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer +COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer -RUN mkdir -p /app/bootstrap/cache /app/storage/logs /app/storage/framework/sessions /app/storage/framework/views /app/storage/framework/cache -RUN chmod -R 777 /app +RUN mkdir -p bootstrap/cache \ + storage/logs \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache -COPY deploy/conf/php.ini /usr/local/etc/php - -RUN composer require laravel/octane guzzlehttp/guzzle - -RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet +COPY --link deploy/conf/php.ini /usr/local/etc/php +RUN composer require laravel/octane guzzlehttp/guzzle --update-no-dev --no-scripts --quiet RUN php artisan optimize RUN frankenphp -v diff --git a/frameworks/PHP/laravel/laravel-roadrunner.dockerfile b/frameworks/PHP/laravel/laravel-roadrunner.dockerfile index d5d42d62879..33c7067c7b0 100644 --- a/frameworks/PHP/laravel/laravel-roadrunner.dockerfile +++ b/frameworks/PHP/laravel/laravel-roadrunner.dockerfile @@ -9,7 +9,11 @@ RUN echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opca WORKDIR /laravel COPY --link . . -RUN mkdir -p /laravel/bootstrap/cache /laravel/storage/logs /laravel/storage/framework/sessions /laravel/storage/framework/views /laravel/storage/framework/cache +RUN mkdir -p bootstrap/cache \ + storage/logs \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache RUN apt-get update > /dev/null && \ apt-get install -yqq curl unzip > /dev/null diff --git a/frameworks/PHP/laravel/laravel-swoole.dockerfile b/frameworks/PHP/laravel/laravel-swoole.dockerfile index 3882a7ac4c8..52308a4dd5e 100644 --- a/frameworks/PHP/laravel/laravel-swoole.dockerfile +++ b/frameworks/PHP/laravel/laravel-swoole.dockerfile @@ -9,7 +9,11 @@ RUN echo "opcache.jit_buffer_size=128M" >> /usr/local/etc/php/conf.d/docker-php- WORKDIR /laravel COPY --link . . -RUN mkdir -p /laravel/bootstrap/cache /laravel/storage/framework/sessions /laravel/storage/framework/views /laravel/storage/framework/cache +RUN mkdir -p bootstrap/cache \ + storage/logs \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache COPY --link deploy/swoole/composer.json . diff --git a/frameworks/PHP/laravel/laravel-workerman.dockerfile b/frameworks/PHP/laravel/laravel-workerman.dockerfile index 48cf4ee5e42..34ee2de30a5 100644 --- a/frameworks/PHP/laravel/laravel-workerman.dockerfile +++ b/frameworks/PHP/laravel/laravel-workerman.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -9,23 +9,25 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ RUN apt-get install -yqq git unzip \ php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null -COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer +COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -ADD ./ /laravel WORKDIR /laravel +COPY --link . . -EXPOSE 8080 - -RUN mkdir -p /laravel/bootstrap/cache /laravel/storage/logs /laravel/storage/framework/sessions /laravel/storage/framework/views /laravel/storage/framework/cache -RUN chmod -R 777 /laravel +RUN mkdir -p bootstrap/cache \ + storage/logs \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache -COPY deploy/workerman/composer.json ./ -RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet +RUN composer require joanhey/adapterman --update-no-dev --no-scripts --quiet RUN php artisan optimize -COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini +COPY --link deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini + +EXPOSE 8080 -CMD php server-man.php start +ENTRYPOINT [ "php", "server-man.php", "start" ] diff --git a/frameworks/PHP/laravel/laravel.dockerfile b/frameworks/PHP/laravel/laravel.dockerfile index c1858216a66..455d2e6d60f 100644 --- a/frameworks/PHP/laravel/laravel.dockerfile +++ b/frameworks/PHP/laravel/laravel.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -7,19 +7,21 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-dev > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null -COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer +COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.3/fpm/ - -ADD ./ /laravel +COPY --link deploy/conf/* /etc/php/8.3/fpm/ WORKDIR /laravel +COPY --link . . RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; -RUN mkdir -p /laravel/bootstrap/cache /laravel/storage/logs /laravel/storage/framework/sessions /laravel/storage/framework/views /laravel/storage/framework/cache -RUN chmod -R 777 /laravel +RUN mkdir -p bootstrap/cache \ + storage/logs \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet RUN php artisan optimize @@ -29,6 +31,5 @@ EXPOSE 8080 # Uncomment next line for Laravel console error logging to be viewable in docker logs # RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf -RUN mkdir -p /run/php -CMD /usr/sbin/php-fpm8.3 --fpm-config /etc/php/8.3/fpm/php-fpm.conf && \ +CMD service php8.3-fpm start && \ nginx -c /laravel/deploy/nginx.conf From 4408f2eade47d7fee8e00a69544a1b3a35d54251 Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Thu, 8 Aug 2024 22:06:41 +0200 Subject: [PATCH 06/22] [php] Lumen update to v11 (#9199) * Update lumen to v11 * Update and clean dockerfiles --- frameworks/PHP/lumen/composer.json | 2 +- frameworks/PHP/lumen/lumen-laravel-s.dockerfile | 9 +++++++-- frameworks/PHP/lumen/lumen-swoole.dockerfile | 2 +- frameworks/PHP/lumen/lumen-workerman.dockerfile | 13 +++++++------ frameworks/PHP/lumen/lumen.dockerfile | 13 +++++++------ 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/frameworks/PHP/lumen/composer.json b/frameworks/PHP/lumen/composer.json index aaf2e3d44d1..2552d9450e3 100644 --- a/frameworks/PHP/lumen/composer.json +++ b/frameworks/PHP/lumen/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "project", "require": { - "laravel/lumen-framework": "^10" + "laravel/lumen-framework": "^11" }, "autoload": { "psr-4": { diff --git a/frameworks/PHP/lumen/lumen-laravel-s.dockerfile b/frameworks/PHP/lumen/lumen-laravel-s.dockerfile index a2b4be68310..9c2df7afaef 100644 --- a/frameworks/PHP/lumen/lumen-laravel-s.dockerfile +++ b/frameworks/PHP/lumen/lumen-laravel-s.dockerfile @@ -7,9 +7,14 @@ RUN echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opca #RUN echo "opcache.jit_buffer_size=128M" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini WORKDIR /lumen -ADD --link . . +COPY --link . . + +RUN mkdir -p bootstrap/cache \ + storage/logs \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache -RUN mkdir -p /lumen/bootstrap/cache /lumen/storage/logs /lumen/storage/framework/sessions /lumen/storage/framework/views /lumen/storage/framework/cache RUN chmod -R 777 /lumen COPY deploy/laravel-s/composer.json ./ diff --git a/frameworks/PHP/lumen/lumen-swoole.dockerfile b/frameworks/PHP/lumen/lumen-swoole.dockerfile index de3d4294973..0f4f3434e37 100644 --- a/frameworks/PHP/lumen/lumen-swoole.dockerfile +++ b/frameworks/PHP/lumen/lumen-swoole.dockerfile @@ -3,7 +3,7 @@ FROM phpswoole/swoole:5.1.3-php8.3 RUN docker-php-ext-install pcntl opcache curl > /dev/null WORKDIR /lumen -ADD --link . . +COPY --link . . COPY --link deploy/swoole/php.ini /usr/local/etc/php/ diff --git a/frameworks/PHP/lumen/lumen-workerman.dockerfile b/frameworks/PHP/lumen/lumen-workerman.dockerfile index aabe520cdc8..decfe424411 100644 --- a/frameworks/PHP/lumen/lumen-workerman.dockerfile +++ b/frameworks/PHP/lumen/lumen-workerman.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -14,16 +14,17 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -ADD ./ /lumen WORKDIR /lumen +COPY --link . . + RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet RUN composer require joanhey/adapterman:^0.6 --quiet -RUN mkdir -p /lumen/storage -RUN mkdir -p /lumen/storage/framework/sessions -RUN mkdir -p /lumen/storage/framework/views -RUN mkdir -p /lumen/storage/framework/cache +RUN mkdir -p storage \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache RUN chmod -R 777 /lumen diff --git a/frameworks/PHP/lumen/lumen.dockerfile b/frameworks/PHP/lumen/lumen.dockerfile index 1b5f8a76e62..9d11da427af 100644 --- a/frameworks/PHP/lumen/lumen.dockerfile +++ b/frameworks/PHP/lumen/lumen.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -13,17 +13,18 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer COPY deploy/conf/* /etc/php/8.3/fpm/ -ADD ./ /lumen WORKDIR /lumen +COPY --link . . + RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN mkdir -p /lumen/storage -RUN mkdir -p /lumen/storage/framework/sessions -RUN mkdir -p /lumen/storage/framework/views -RUN mkdir -p /lumen/storage/framework/cache +RUN mkdir -p storage \ + storage/framework/sessions \ + storage/framework/views \ + storage/framework/cache RUN chmod -R 777 /lumen From a74a2d21018caf2683fef8133fc69d4c97e94b16 Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Thu, 8 Aug 2024 22:06:59 +0200 Subject: [PATCH 07/22] [ci skip] Silverlining change display name in prefork (#9195) --- frameworks/Go/silverlining/benchmark_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/Go/silverlining/benchmark_config.json b/frameworks/Go/silverlining/benchmark_config.json index 368481b04cf..bd8544f9111 100644 --- a/frameworks/Go/silverlining/benchmark_config.json +++ b/frameworks/Go/silverlining/benchmark_config.json @@ -35,7 +35,7 @@ "webserver": "None", "os": "Linux", "database_os": "Linux", - "display_name": "silverlining", + "display_name": "silverlining [prefork]", "notes": "", "versus": "go" } From 1c0d617f696575caf080d12ed3014cc04b70d58e Mon Sep 17 00:00:00 2001 From: Rasmus Porsager Date: Thu, 8 Aug 2024 22:07:20 +0200 Subject: [PATCH 08/22] Send less with uWebSockets.js (#9194) * Send less * Fix method name * And on the right object --- frameworks/JavaScript/uwebsockets.js/src/server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frameworks/JavaScript/uwebsockets.js/src/server.js b/frameworks/JavaScript/uwebsockets.js/src/server.js index 1db7d391f2a..0305347a2cf 100644 --- a/frameworks/JavaScript/uwebsockets.js/src/server.js +++ b/frameworks/JavaScript/uwebsockets.js/src/server.js @@ -16,8 +16,10 @@ if (DATABASE) db = await import(`./database/${DATABASE}.js`); const webserver = uWebSockets.App(); +uWebSockets._cfg('silent'); + webserver.get("/plaintext", new uWebSockets.DeclarativeResponse() - .writeHeader("Server", "uWebSockets.js") + .writeHeader("Server", "uWS") .writeHeader("Content-Type", "text/plain") .end("Hello, World!") ); @@ -90,7 +92,7 @@ if (db) { handleError(error, response); } }); - + const extra = { id: 0, message: "Additional fortune added at request time." }; webserver.get("/fortunes", async (response) => { From 5e66b478e6f10208e10eaead87632d8eb1913f21 Mon Sep 17 00:00:00 2001 From: Redkale Date: Fri, 9 Aug 2024 04:07:45 +0800 Subject: [PATCH 09/22] Update Redkale 2.9.0-SNAPSHOT (#9193) * Update Redkale 2.9.0-SNAPSHOT * Update Redkale 2.9.0-SNAPSHOT --- frameworks/Java/redkale/pom-jdbc.xml | 5 +- frameworks/Java/redkale/pom-vertx.xml | 5 +- frameworks/Java/redkale/pom.xml | 5 +- .../java/org/redkalex/benchmark/Message.java | 81 +++++++++---------- 4 files changed, 49 insertions(+), 47 deletions(-) diff --git a/frameworks/Java/redkale/pom-jdbc.xml b/frameworks/Java/redkale/pom-jdbc.xml index 43ce0fa4e0f..93df4fb9464 100644 --- a/frameworks/Java/redkale/pom-jdbc.xml +++ b/frameworks/Java/redkale/pom-jdbc.xml @@ -7,7 +7,8 @@ org.redkale.boot.Application - 2.8.0-SNAPSHOT + 2.9.0-SNAPSHOT + 1.3.0-SNAPSHOT 42.6.0 UTF-8 18 @@ -85,7 +86,7 @@ org.redkale.maven.plugins redkale-maven-plugin - 1.2.0-SNAPSHOT + ${redkale-maven.version} --no-fallback diff --git a/frameworks/Java/redkale/pom-vertx.xml b/frameworks/Java/redkale/pom-vertx.xml index 9879cff1237..fc371f67798 100644 --- a/frameworks/Java/redkale/pom-vertx.xml +++ b/frameworks/Java/redkale/pom-vertx.xml @@ -7,7 +7,8 @@ org.redkale.boot.Application - 2.8.0-SNAPSHOT + 2.9.0-SNAPSHOT + 1.3.0-SNAPSHOT 4.5.0 2.1 UTF-8 @@ -92,7 +93,7 @@ org.redkale.maven.plugins redkale-maven-plugin - 1.2.0-SNAPSHOT + ${redkale-maven.version} --no-fallback diff --git a/frameworks/Java/redkale/pom.xml b/frameworks/Java/redkale/pom.xml index 8e6fa747ac0..78ffcbdd93b 100644 --- a/frameworks/Java/redkale/pom.xml +++ b/frameworks/Java/redkale/pom.xml @@ -7,7 +7,8 @@ org.redkale.boot.Application - 2.8.0-SNAPSHOT + 2.9.0-SNAPSHOT + 1.3.0-SNAPSHOT UTF-8 11 11 @@ -74,7 +75,7 @@ org.redkale.maven.plugins redkale-maven-plugin - 1.2.0-SNAPSHOT + ${redkale-maven.version} --no-fallback diff --git a/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/Message.java b/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/Message.java index 73cbe2c2afd..00c529e9eee 100644 --- a/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/Message.java +++ b/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/Message.java @@ -1,41 +1,40 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package org.redkalex.benchmark; - -import org.redkale.annotation.Bean; -import org.redkale.convert.ConvertSmallString; -import org.redkale.convert.json.JsonConvert; - -/** - * - * @author zhangjx - */ -@Bean -public final class Message { - - @ConvertSmallString - private String message; - - public Message() { - } - - public Message(String message) { - this.message = message; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - @Override - public String toString() { - return JsonConvert.root().convertTo(this); - } -} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.redkalex.benchmark; + +import org.redkale.annotation.Serial; +import org.redkale.convert.ConvertSmallString; +import org.redkale.convert.json.JsonConvert; + +/** + * + * @author zhangjx + */ +@Serial +public final class Message { + + @ConvertSmallString + private String message; + + public Message() {} + + public Message(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return JsonConvert.root().convertTo(this); + } +} From 48075478254408c7a210698b2f0953dd79a81253 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:17:14 +0000 Subject: [PATCH 10/22] Bump aiohttp from 3.9.4 to 3.10.2 in /frameworks/Python/api_hour Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.4 to 3.10.2. - [Release notes](https://github.com/aio-libs/aiohttp/releases) - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.4...v3.10.2) --- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- frameworks/Python/api_hour/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/Python/api_hour/requirements.txt b/frameworks/Python/api_hour/requirements.txt index 81b923f4005..19dcab407ab 100644 --- a/frameworks/Python/api_hour/requirements.txt +++ b/frameworks/Python/api_hour/requirements.txt @@ -1,4 +1,4 @@ -aiohttp==3.9.4 +aiohttp==3.10.2 -e git+https://github.com/Eyepea/aiohttp_jinja2.git@c9675e5c1e1ee7741b30aea8d8fbffcde016c7a0#egg=aiohttp_jinja2-master aiopg==0.7.0 -e git+https://github.com/Eyepea/API-Hour.git@577abbdcbb8cc2810dad46e260b338b15db4d0e3#egg=api_hour-master From e05436e96c606be703cd75e52b8c5c192e3f0d7b Mon Sep 17 00:00:00 2001 From: Petrik de Heus Date: Tue, 13 Aug 2024 21:43:37 +0200 Subject: [PATCH 11/22] [rails] Upgrade to Rails 7.2 (#9209) Update to latest release. - Remove YJIT initializer as YJIT is enabled by Rails by default. - Updated config with bin/rails app:update --- frameworks/Ruby/rails/.ruby-version | 2 +- frameworks/Ruby/rails/Gemfile | 2 +- frameworks/Ruby/rails/Gemfile.lock | 170 +++++++++--------- frameworks/Ruby/rails/config/application.rb | 13 +- .../rails/config/environments/development.rb | 19 +- .../rails/config/environments/production.rb | 52 +++--- .../Ruby/rails/config/environments/test.rb | 24 ++- .../rails/config/initializers/enable_yjit.rb | 11 -- frameworks/Ruby/rails/config/puma.rb | 67 +++---- 9 files changed, 167 insertions(+), 193 deletions(-) delete mode 100644 frameworks/Ruby/rails/config/initializers/enable_yjit.rb diff --git a/frameworks/Ruby/rails/.ruby-version b/frameworks/Ruby/rails/.ruby-version index fd2a01863fd..15a27998172 100644 --- a/frameworks/Ruby/rails/.ruby-version +++ b/frameworks/Ruby/rails/.ruby-version @@ -1 +1 @@ -3.1.0 +3.3.0 diff --git a/frameworks/Ruby/rails/Gemfile b/frameworks/Ruby/rails/Gemfile index 39eb973e700..8039ed09fd9 100644 --- a/frameworks/Ruby/rails/Gemfile +++ b/frameworks/Ruby/rails/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' gem 'oj', '~> 3.16' gem 'pg', '~> 1.5', group: :postgresql gem 'puma', '~> 6.4' -gem 'rails', '~> 7.1.3' +gem 'rails', '~> 7.2.0' gem 'redis', '~> 5.0' gem 'trilogy', '~> 2.8.1', group: :mysql gem 'tzinfo-data' diff --git a/frameworks/Ruby/rails/Gemfile.lock b/frameworks/Ruby/rails/Gemfile.lock index 5c25771e659..dfa97091616 100644 --- a/frameworks/Ruby/rails/Gemfile.lock +++ b/frameworks/Ruby/rails/Gemfile.lock @@ -1,97 +1,94 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) + actioncable (7.2.0) + actionpack (= 7.2.0) + activesupport (= 7.2.0) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.3.4) - actionpack (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activesupport (= 7.1.3.4) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (7.2.0) + actionpack (= 7.2.0) + activejob (= 7.2.0) + activerecord (= 7.2.0) + activestorage (= 7.2.0) + activesupport (= 7.2.0) + mail (>= 2.8.0) + actionmailer (7.2.0) + actionpack (= 7.2.0) + actionview (= 7.2.0) + activejob (= 7.2.0) + activesupport (= 7.2.0) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.3.4) - actionview (= 7.1.3.4) - activesupport (= 7.1.3.4) + actionpack (7.2.0) + actionview (= 7.2.0) + activesupport (= 7.2.0) nokogiri (>= 1.8.5) racc - rack (>= 2.2.4) + rack (>= 2.2.4, < 3.2) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.4) - actionpack (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) + useragent (~> 0.16) + actiontext (7.2.0) + actionpack (= 7.2.0) + activerecord (= 7.2.0) + activestorage (= 7.2.0) + activesupport (= 7.2.0) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.3.4) - activesupport (= 7.1.3.4) + actionview (7.2.0) + activesupport (= 7.2.0) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.3.4) - activesupport (= 7.1.3.4) + activejob (7.2.0) + activesupport (= 7.2.0) globalid (>= 0.3.6) - activemodel (7.1.3.4) - activesupport (= 7.1.3.4) - activerecord (7.1.3.4) - activemodel (= 7.1.3.4) - activesupport (= 7.1.3.4) + activemodel (7.2.0) + activesupport (= 7.2.0) + activerecord (7.2.0) + activemodel (= 7.2.0) + activesupport (= 7.2.0) timeout (>= 0.4.0) - activestorage (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activesupport (= 7.1.3.4) + activestorage (7.2.0) + actionpack (= 7.2.0) + activejob (= 7.2.0) + activerecord (= 7.2.0) + activesupport (= 7.2.0) marcel (~> 1.0) - activesupport (7.1.3.4) + activesupport (7.2.0) base64 bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) base64 (0.2.0) bigdecimal (3.1.8) - builder (3.2.4) - concurrent-ruby (1.3.1) + builder (3.3.0) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) date (3.3.4) drb (2.2.1) - erubi (1.12.0) + erubi (1.13.0) globalid (1.2.1) activesupport (>= 6.1) i18n (1.14.5) concurrent-ruby (~> 1.0) io-console (0.7.2) - irb (1.13.1) + irb (1.14.0) rdoc (>= 4.0.0) reline (>= 0.4.2) + logger (1.6.0) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -103,9 +100,8 @@ GEM marcel (1.0.4) mini_mime (1.1.5) mini_portile2 (2.8.7) - minitest (5.23.1) - mutex_m (0.2.0) - net-imap (0.4.11) + minitest (5.24.1) + net-imap (0.4.14) date net-protocol net-pop (0.1.2) @@ -115,22 +111,24 @@ GEM net-smtp (0.5.0) net-protocol nio4r (2.7.3) - nokogiri (1.16.5) + nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.5-arm64-darwin) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.5-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) - oj (3.16.3) + oj (3.16.5) bigdecimal (>= 3.0) - pg (1.5.6) + ostruct (>= 0.2) + ostruct (0.6.0) + pg (1.5.7) psych (5.1.2) stringio puma (6.4.2) nio4r (~> 2.0) - racc (1.8.0) - rack (3.0.11) + racc (1.8.1) + rack (3.1.7) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -138,20 +136,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.1.3.4) - actioncable (= 7.1.3.4) - actionmailbox (= 7.1.3.4) - actionmailer (= 7.1.3.4) - actionpack (= 7.1.3.4) - actiontext (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activemodel (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) + rails (7.2.0) + actioncable (= 7.2.0) + actionmailbox (= 7.2.0) + actionmailer (= 7.2.0) + actionpack (= 7.2.0) + actiontext (= 7.2.0) + actionview (= 7.2.0) + activejob (= 7.2.0) + activemodel (= 7.2.0) + activerecord (= 7.2.0) + activestorage (= 7.2.0) + activesupport (= 7.2.0) bundler (>= 1.15.0) - railties (= 7.1.3.4) + railties (= 7.2.0) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -159,24 +157,25 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) - irb + railties (7.2.0) + actionpack (= 7.2.0) + activesupport (= 7.2.0) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rake (13.2.1) - rdoc (6.6.3.1) + rdoc (6.7.0) psych (>= 4.0.0) redis (5.2.0) redis-client (>= 0.22.0) redis-client (0.22.2) connection_pool - reline (0.5.7) + reline (0.5.9) io-console (~> 0.5) - stringio (3.1.0) + securerandom (0.3.1) + stringio (3.1.1) thor (1.3.1) timeout (0.4.1) trilogy (2.8.1) @@ -184,11 +183,12 @@ GEM concurrent-ruby (~> 1.0) tzinfo-data (1.2024.1) tzinfo (>= 1.0.0) + useragent (0.16.10) webrick (1.8.1) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.14) + zeitwerk (2.6.17) PLATFORMS arm64-darwin-20 @@ -199,7 +199,7 @@ DEPENDENCIES oj (~> 3.16) pg (~> 1.5) puma (~> 6.4) - rails (~> 7.1.3) + rails (~> 7.2.0) redis (~> 5.0) trilogy (~> 2.8.1) tzinfo-data diff --git a/frameworks/Ruby/rails/config/application.rb b/frameworks/Ruby/rails/config/application.rb index 2cca7e95baa..7e3e1d4af56 100644 --- a/frameworks/Ruby/rails/config/application.rb +++ b/frameworks/Ruby/rails/config/application.rb @@ -8,9 +8,10 @@ # require "active_storage/engine" require "action_controller/railtie" # require "action_mailer/railtie" +# require "action_mailbox/engine" +# require "action_text/engine" require "action_view/railtie" # require "action_cable/engine" -# require "sprockets/railtie" # require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems @@ -20,12 +21,12 @@ module Hello class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.1 + config.load_defaults 7.2 - # Settings in config/environments/* take precedence over those specified here. - # Application configuration can go into files in config/initializers - # -- all .rb files in that directory are automatically loaded after loading - # the framework and any gems in your application. + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w[assets tasks]) config.action_dispatch.default_headers.merge!('Server' => 'WebServer') diff --git a/frameworks/Ruby/rails/config/environments/development.rb b/frameworks/Ruby/rails/config/environments/development.rb index 8620b53db5a..6a2306dbabc 100644 --- a/frameworks/Ruby/rails/config/environments/development.rb +++ b/frameworks/Ruby/rails/config/environments/development.rb @@ -6,7 +6,7 @@ # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. - config.cache_classes = false + config.enable_reloading = true # Do not eager load code on boot. config.eager_load = false @@ -14,7 +14,7 @@ # Show full error reports. config.consider_all_requests_local = true - # Enable server timing + # Enable server timing. config.server_timing = true # Enable/disable caching. By default caching is disabled. @@ -24,9 +24,7 @@ config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{2.days.to_i}" - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -48,16 +46,15 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true - - # Uncomment if you wish to allow Action Cable access from any origin. - # config.action_cable.disable_request_forgery_protection = true + config.action_view.annotate_rendered_view_with_filenames = true - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true + + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! end diff --git a/frameworks/Ruby/rails/config/environments/production.rb b/frameworks/Ruby/rails/config/environments/production.rb index 3ad22143e26..f9de0f173d6 100644 --- a/frameworks/Ruby/rails/config/environments/production.rb +++ b/frameworks/Ruby/rails/config/environments/production.rb @@ -4,7 +4,7 @@ # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. - config.cache_classes = true + config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers @@ -13,16 +13,15 @@ config.eager_load = true # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false + config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] - # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. + # config.public_file_server.enabled = false # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.asset_host = "http://assets.example.com" @@ -31,16 +30,24 @@ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # Include generic and useful information about system operation, but avoid logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :info + # Skip http-to-https redirect for the default health check endpoint. + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } # Prepend all log lines with the following tags. config.log_tags = [ :request_id ] + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + # Use a different cache store in production. config.cache_store = :redis_cache_store, { url: ENV['REDIS_URL'], @@ -54,10 +61,6 @@ } } - # Use a real queuing backend for Active Job (and separate queues per environment). - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "hello_production" - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true @@ -65,19 +68,14 @@ # Don't log any deprecations. config.active_support.report_deprecations = false - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new - - # Use a different logger for distributed setups. - # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") - - if ENV["RAILS_LOG_TO_STDOUT"].present? - logger = ActiveSupport::Logger.new(STDOUT) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end - # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } end diff --git a/frameworks/Ruby/rails/config/environments/test.rb b/frameworks/Ruby/rails/config/environments/test.rb index bfcd30081b1..999db7091ef 100644 --- a/frameworks/Ruby/rails/config/environments/test.rb +++ b/frameworks/Ruby/rails/config/environments/test.rb @@ -8,27 +8,25 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # Turn false under Spring and add config.action_view.cache_template_loading = true. - config.cache_classes = true + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false - # Eager loading loads your whole application. When running a single test locally, - # this probably isn't necessary. It's a good idea to do in a continuous integration - # system, or in some way before deploying your code. + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.hour.to_i}" - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false @@ -48,6 +46,6 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true end diff --git a/frameworks/Ruby/rails/config/initializers/enable_yjit.rb b/frameworks/Ruby/rails/config/initializers/enable_yjit.rb deleted file mode 100644 index 963858ab4c6..00000000000 --- a/frameworks/Ruby/rails/config/initializers/enable_yjit.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Automatically enable YJIT as of Ruby 3.3, as it bring very -# sizeable performance improvements. - -# If you are deploying to a memory constrained environment -# you may want to delete this file, but otherwise it's free -# performance. -if defined? RubyVM::YJIT.enable - Rails.application.config.after_initialize do - RubyVM::YJIT.enable - end -end diff --git a/frameworks/Ruby/rails/config/puma.rb b/frameworks/Ruby/rails/config/puma.rb index 3089f8334a2..b513db258e6 100644 --- a/frameworks/Ruby/rails/config/puma.rb +++ b/frameworks/Ruby/rails/config/puma.rb @@ -1,49 +1,40 @@ -require_relative 'auto_tune' +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. -# FWBM only... use the puma_auto_tune gem in production! -tuned_num_workers, tuned_num_threads = auto_tune +require_relative 'auto_tune' -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers: a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum; this matches the default thread size of Active Record. +# Puma starts a configurable number of processes (workers) and each process +# serves each request in a thread from an internal thread pool. # -max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 3 } -min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } -threads min_threads_count, max_threads_count - -# Specifies the `worker_timeout` threshold that Puma will use to wait before -# terminating a worker in development environments. +# The ideal number of threads per worker depends both on how much time the +# application spends waiting for IO operations and on how much you wish to +# to prioritize throughput over latency. # -worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" - -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# As a rule of thumb, increasing the number of threads will increase how much +# traffic a given process can handle (throughput), but due to CRuby's +# Global VM Lock (GVL) it has diminishing returns and will degrade the +# response time (latency) of the application. # -port ENV.fetch("PORT") { 3000 } - -# Specifies the `environment` that Puma will run in. +# The default is set to 3 threads as it's deemed a decent compromise between +# throughput and latency for the average Rails application. # -environment ENV.fetch("RAILS_ENV") { "development" } +# Any libraries that use a connection pool or another resource pool should +# be configured to provide at least as many connections as the number of +# threads. This includes Active Record's `pool` parameter in `database.yml`. +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) +threads threads_count, threads_count -# Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } +worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" -# Specifies the number of `workers` to boot in clustered mode. -# Workers are forked web server processes. If using threads and workers together -# the concurrency of the application would be max `threads` * `workers`. -# Workers do not work on JRuby or Windows (both of which do not support -# processes). -# -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } -workers tuned_num_workers +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +port ENV.fetch("PORT", 3000) -# Use the `preload_app!` method when specifying a `workers` number. -# This directive tells Puma to first boot the application and load code -# before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. -# -preload_app! +tuned_num_workers, tuned_num_threads = auto_tune +workers tuned_num_workers -# Allow puma to be restarted by `rails restart` command. +# Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart + +# Only use a pidfile when requested +pidfile ENV["PIDFILE"] if ENV["PIDFILE"] From a77b6eb051ce3fe60104161821b348312e7c3806 Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Tue, 13 Aug 2024 21:43:46 +0200 Subject: [PATCH 12/22] Revert for now native epoll on linux instead of io-uring (#9208) --- frameworks/Java/vertx/pom.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/frameworks/Java/vertx/pom.xml b/frameworks/Java/vertx/pom.xml index 06199d308db..4230d89326b 100644 --- a/frameworks/Java/vertx/pom.xml +++ b/frameworks/Java/vertx/pom.xml @@ -148,9 +148,6 @@ Linux false - - unix - From 919e13b01eea0470f48f04fc766aa6d724d6ea52 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 14 Aug 2024 00:43:56 +0500 Subject: [PATCH 13/22] ntex: update version, try different allocator (#9206) --- frameworks/Rust/ntex/Cargo.toml | 2 +- frameworks/Rust/ntex/src/db.rs | 59 ++++++++++++++-------------- frameworks/Rust/ntex/src/main.rs | 3 +- frameworks/Rust/ntex/src/main_db.rs | 4 +- frameworks/Rust/ntex/src/main_plt.rs | 1 + 5 files changed, 35 insertions(+), 34 deletions(-) diff --git a/frameworks/Rust/ntex/Cargo.toml b/frameworks/Rust/ntex/Cargo.toml index 6699c6c0f1d..92c0da890ac 100755 --- a/frameworks/Rust/ntex/Cargo.toml +++ b/frameworks/Rust/ntex/Cargo.toml @@ -37,7 +37,7 @@ tokio = ["ntex/tokio"] async-std = ["ntex/async-std"] [dependencies] -ntex = "=2.0.3" +ntex = "=2.1.0" ntex-bytes = { version = "0.1.21", features=["simd"] } mimalloc = { version = "0.1.25", default-features = false } snmalloc-rs = { version = "0.3.3", features = ["native-cpu"] } diff --git a/frameworks/Rust/ntex/src/db.rs b/frameworks/Rust/ntex/src/db.rs index 5bceed5b73e..b3adc6e70bf 100644 --- a/frameworks/Rust/ntex/src/db.rs +++ b/frameworks/Rust/ntex/src/db.rs @@ -1,11 +1,11 @@ -use std::{cell::RefCell, fmt::Write as FmtWrite}; +#![allow(clippy::uninit_vec)] +use std::{borrow::Cow, cell::RefCell, fmt::Write as FmtWrite}; -use futures::stream::{futures_unordered::FuturesUnordered, StreamExt}; use nanorand::{Rng, WyRand}; use ntex::util::{BufMut, Bytes, BytesMut}; use smallvec::SmallVec; use tokio_postgres::types::ToSql; -use tokio_postgres::{connect, Client, Row, Statement}; +use tokio_postgres::{connect, Client, Statement}; use yarte::{ywrite_html, Serialize}; use super::utils; @@ -17,9 +17,9 @@ pub struct World { } #[derive(Serialize, Debug)] -pub struct Fortune<'a> { +pub struct Fortune { pub id: i32, - pub message: &'a str, + pub message: Cow<'static, str>, } /// Postgres interface @@ -60,10 +60,7 @@ impl PgConnection { q.push(')'); updates.push(cl.prepare(&q).await.unwrap()); } - let world = cl - .prepare("SELECT id, randomnumber FROM world WHERE id=$1") - .await - .unwrap(); + let world = cl.prepare("SELECT * FROM world WHERE id=$1").await.unwrap(); PgConnection { cl, @@ -83,7 +80,7 @@ impl PgConnection { let row = self.cl.query_one(&self.world, &[&random_id]).await.unwrap(); let mut body = self.buf.borrow_mut(); - utils::reserve(&mut body, 256); + utils::reserve(&mut body, 8 * 1024); World { id: row.get(0), randomnumber: row.get(1), @@ -92,20 +89,17 @@ impl PgConnection { body.split().freeze() } - async fn get_one_world(&self, id: i32) -> Row { - self.cl.query_one(&self.world, &[&id]).await.unwrap() - } - pub async fn get_worlds(&self, num: usize) -> Bytes { let mut rng = self.rng.clone(); - let mut queries = FuturesUnordered::new(); + let mut queries = SmallVec::<[_; 32]>::new(); (0..num).for_each(|_| { let w_id = (rng.generate::() % 10_000 + 1) as i32; - queries.push(self.get_one_world(w_id)) + queries.push(self.cl.query_one(&self.world, &[&w_id])); }); let mut worlds = SmallVec::<[_; 32]>::new(); - while let Some(row) = queries.next().await { + for fut in queries { + let row = fut.await.unwrap(); worlds.push(World { id: row.get(0), randomnumber: row.get(1), @@ -126,14 +120,15 @@ impl PgConnection { pub async fn update(&self, num: usize) -> Bytes { let mut rng = self.rng.clone(); - let mut queries = FuturesUnordered::new(); + let mut queries = SmallVec::<[_; 32]>::new(); (0..num).for_each(|_| { let w_id = (rng.generate::() % 10_000 + 1) as i32; - queries.push(self.get_one_world(w_id)) + queries.push(self.cl.query_one(&self.world, &[&w_id])); }); let mut worlds = SmallVec::<[_; 32]>::new(); - while let Some(row) = queries.next().await { + for fut in queries.into_iter() { + let row = fut.await.unwrap(); worlds.push(World { id: row.get(0), randomnumber: (rng.generate::() % 10_000 + 1) as i32, @@ -163,18 +158,22 @@ impl PgConnection { } pub async fn tell_fortune(&self) -> Bytes { - let rows = self.cl.query_raw(&self.fortune, &[]).await.unwrap(); + let fut = self.cl.query_raw(&self.fortune, &[]); - let mut fortunes = Vec::with_capacity(rows.len() + 1); - fortunes.push(Fortune { + let rows = fut.await.unwrap(); + let mut fortunes: SmallVec<[_; 32]> = smallvec::smallvec![Fortune { id: 0, - message: "Additional fortune added at request time.", - }); - fortunes.extend(rows.iter().map(|row| Fortune { - id: row.get(0), - message: row.get(1), - })); - fortunes.sort_by(|it, next| it.message.cmp(next.message)); + message: Cow::Borrowed("Additional fortune added at request time."), + }]; + + for row in rows { + fortunes.push(Fortune { + id: row.get(0), + message: Cow::Owned(row.get(1)), + }); + } + + fortunes.sort_by(|it, next| it.message.cmp(&next.message)); let mut body = std::mem::replace(&mut *self.buf.borrow_mut(), BytesMut::new()); utils::reserve(&mut body, 8 * 1024); diff --git a/frameworks/Rust/ntex/src/main.rs b/frameworks/Rust/ntex/src/main.rs index c9fd1e80245..c456fac47e4 100644 --- a/frameworks/Rust/ntex/src/main.rs +++ b/frameworks/Rust/ntex/src/main.rs @@ -1,5 +1,6 @@ #[global_allocator] -static GLOBAL: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc; +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; +// static GLOBAL: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc; use ntex::http::header::{CONTENT_TYPE, SERVER}; use ntex::{http, time::Seconds, util::BytesMut, util::PoolId, web}; diff --git a/frameworks/Rust/ntex/src/main_db.rs b/frameworks/Rust/ntex/src/main_db.rs index 437fd70b9e1..78c21fa7132 100644 --- a/frameworks/Rust/ntex/src/main_db.rs +++ b/frameworks/Rust/ntex/src/main_db.rs @@ -1,7 +1,7 @@ #[cfg(not(target_os = "macos"))] #[global_allocator] -static GLOBAL: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc; -// static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; +// static GLOBAL: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc; use ntex::http::header::{CONTENT_TYPE, SERVER}; use ntex::http::{HttpService, KeepAlive, Request, Response, StatusCode}; diff --git a/frameworks/Rust/ntex/src/main_plt.rs b/frameworks/Rust/ntex/src/main_plt.rs index cda9b69fa15..2f46ce448e1 100644 --- a/frameworks/Rust/ntex/src/main_plt.rs +++ b/frameworks/Rust/ntex/src/main_plt.rs @@ -1,5 +1,6 @@ #[global_allocator] static GLOBAL: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc; + use std::{future::Future, io, pin::Pin, task::Context, task::Poll}; use ntex::{fn_service, http::h1, io::Io, io::RecvError, util::ready, util::PoolId}; From 990e3132698841deed4cac1f3d0c637de640ff20 Mon Sep 17 00:00:00 2001 From: Anton Kirilov Date: Tue, 13 Aug 2024 20:44:06 +0100 Subject: [PATCH 14/22] Update H2O to revision c54c63285 (#9205) --- frameworks/C/h2o/h2o.dockerfile | 2 +- frameworks/C/h2o/src/handlers/world.c | 6 ++++-- frameworks/PHP/php/php-h2o.dockerfile | 2 +- frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frameworks/C/h2o/h2o.dockerfile b/frameworks/C/h2o/h2o.dockerfile index bca0d12b19e..3b383b7f6df 100644 --- a/frameworks/C/h2o/h2o.dockerfile +++ b/frameworks/C/h2o/h2o.dockerfile @@ -33,7 +33,7 @@ RUN apt-get -yqq update && \ ruby \ systemtap-sdt-dev -ARG H2O_VERSION=18b175f71ede08b50d3e5ae8303dacef3ea510fc +ARG H2O_VERSION=c54c63285b52421da2782f028022647fc2ea3dd1 WORKDIR /tmp/h2o-build RUN curl -LSs "https://github.com/h2o/h2o/archive/${H2O_VERSION}.tar.gz" | \ diff --git a/frameworks/C/h2o/src/handlers/world.c b/frameworks/C/h2o/src/handlers/world.c index 82d29ce08b8..84088a25d42 100644 --- a/frameworks/C/h2o/src/handlers/world.c +++ b/frameworks/C/h2o/src/handlers/world.c @@ -238,8 +238,10 @@ static int do_multiple_queries(bool do_update, bool use_cache, h2o_req_t *req) const size_t num_query = get_query_number(req); // MAX_QUERIES is a relatively small number, say less than or equal to UINT16_MAX, so assume no - // overflow in the following arithmetic operations. - assert(num_query && num_query <= MAX_QUERIES && num_query <= UINT16_MAX); + // unsigned overflow in the following arithmetic operations. + static_assert(MAX_QUERIES <= UINT16_MAX, + "potential out-of-bounds memory accesses in the following code"); + assert(num_query && num_query <= MAX_QUERIES); size_t base_size = offsetof(multiple_query_ctx_t, res) + num_query * sizeof(query_result_t); diff --git a/frameworks/PHP/php/php-h2o.dockerfile b/frameworks/PHP/php/php-h2o.dockerfile index 57571b6b3c7..3de194e526b 100644 --- a/frameworks/PHP/php/php-h2o.dockerfile +++ b/frameworks/PHP/php/php-h2o.dockerfile @@ -4,7 +4,7 @@ ARG H2O_PREFIX=/opt/h2o FROM "ubuntu:${UBUNTU_VERSION}" AS compile -ARG H2O_VERSION=18b175f71ede08b50d3e5ae8303dacef3ea510fc +ARG H2O_VERSION=c54c63285b52421da2782f028022647fc2ea3dd1 ARG DEBIAN_FRONTEND=noninteractive ARG H2O_PREFIX diff --git a/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile b/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile index 7cc59cf699f..cdfbf5811b2 100644 --- a/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile +++ b/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile @@ -4,7 +4,7 @@ ARG H2O_PREFIX=/opt/h2o FROM "ubuntu:${UBUNTU_VERSION}" AS compile -ARG H2O_VERSION=18b175f71ede08b50d3e5ae8303dacef3ea510fc +ARG H2O_VERSION=c54c63285b52421da2782f028022647fc2ea3dd1 ARG DEBIAN_FRONTEND=noninteractive ARG H2O_PREFIX From 61305905d2f13d1490f86e0fc925237f820fddeb Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Tue, 13 Aug 2024 21:44:16 +0200 Subject: [PATCH 15/22] Fix bottle (#9203) --- frameworks/Python/bottle/benchmark_config.json | 3 ++- frameworks/Python/bottle/bottle-raw.dockerfile | 2 +- frameworks/Python/bottle/bottle.dockerfile | 2 +- frameworks/Python/bottle/requirements.txt | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frameworks/Python/bottle/benchmark_config.json b/frameworks/Python/bottle/benchmark_config.json index e37735b8353..c895cf1e4e7 100644 --- a/frameworks/Python/bottle/benchmark_config.json +++ b/frameworks/Python/bottle/benchmark_config.json @@ -45,7 +45,8 @@ "database_os": "Linux", "display_name": "Bottle", "notes": "PyPy2", - "versus": "wsgi" + "versus": "wsgi", + "tags": ["broken"] }, "raw": { "db_url": "/raw-db", diff --git a/frameworks/Python/bottle/bottle-raw.dockerfile b/frameworks/Python/bottle/bottle-raw.dockerfile index 24a59598829..8ba573a7a2b 100644 --- a/frameworks/Python/bottle/bottle-raw.dockerfile +++ b/frameworks/Python/bottle/bottle-raw.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6.6-stretch +FROM python:3.9-bookworm WORKDIR /bottle COPY views views diff --git a/frameworks/Python/bottle/bottle.dockerfile b/frameworks/Python/bottle/bottle.dockerfile index 24a59598829..8ba573a7a2b 100644 --- a/frameworks/Python/bottle/bottle.dockerfile +++ b/frameworks/Python/bottle/bottle.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6.6-stretch +FROM python:3.9-bookworm WORKDIR /bottle COPY views views diff --git a/frameworks/Python/bottle/requirements.txt b/frameworks/Python/bottle/requirements.txt index 25c2d97e91a..7f6135dbd5b 100644 --- a/frameworks/Python/bottle/requirements.txt +++ b/frameworks/Python/bottle/requirements.txt @@ -1,6 +1,6 @@ -bottle==0.12.19 +bottle==0.12.25 bottle-sqlalchemy==0.4.3 -greenlet==0.4.14 +greenlet==0.4.17 gunicorn==19.9.0 meinheld==1.0.2 mysqlclient==1.3.12 From 094e02d6e4e3facfbe27fed0370464c63df5cdc0 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Wed, 14 Aug 2024 03:44:26 +0800 Subject: [PATCH 16/22] [xitca-web] update dep. (#9201) --- frameworks/Rust/xitca-web/Cargo.lock | 487 ++++++++++-------- frameworks/Rust/xitca-web/Cargo.toml | 18 +- frameworks/Rust/xitca-web/src/main_iou.rs | 2 +- frameworks/Rust/xitca-web/src/util.rs | 4 +- .../Rust/xitca-web/xitca-web-axum.dockerfile | 2 +- .../Rust/xitca-web/xitca-web-iou.dockerfile | 4 +- .../Rust/xitca-web/xitca-web-sync.dockerfile | 2 +- .../Rust/xitca-web/xitca-web.dockerfile | 2 +- 8 files changed, 274 insertions(+), 247 deletions(-) diff --git a/frameworks/Rust/xitca-web/Cargo.lock b/frameworks/Rust/xitca-web/Cargo.lock index 0bce6f973f8..e510a6c31dc 100644 --- a/frameworks/Rust/xitca-web/Cargo.lock +++ b/frameworks/Rust/xitca-web/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" @@ -122,9 +122,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -143,15 +143,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.0.98" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" [[package]] name = "cfg-if" @@ -178,13 +178,48 @@ dependencies = [ "typenum", ] +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn", +] + [[package]] name = "diesel" -version = "2.1.6" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff236accb9a5069572099f0b350a92e9560e8e63a9b8d546162f4a5e03026bb2" +checksum = "bf97ee7261bb708fa3402fa9c17a54b70e90e3cb98afb3dc8999d5512cb03f94" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "byteorder", "diesel_derives", "itoa", @@ -194,11 +229,12 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.4" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14701062d6bed917b5c7103bdffaee1e4609279e240488ad24e7bd979ca6866c" +checksum = "d6ff2be1e7312c858b2ef974f5c7089833ae57b5311b334b30923af58e5718d8" dependencies = [ "diesel_table_macro_syntax", + "dsl_auto_type", "proc-macro2", "quote", "syn", @@ -206,9 +242,9 @@ dependencies = [ [[package]] name = "diesel_table_macro_syntax" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" +checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ "syn", ] @@ -224,6 +260,26 @@ dependencies = [ "subtle", ] +[[package]] +name = "dsl_auto_type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" +dependencies = [ + "darling", + "either", + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "fallible-iterator" version = "0.2.0" @@ -232,22 +288,16 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "fnv" version = "1.0.7" @@ -285,6 +335,7 @@ dependencies = [ "futures-task", "pin-project-lite", "pin-utils", + "slab", ] [[package]] @@ -310,9 +361,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -351,9 +408,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -361,12 +418,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http", "http-body", "pin-project-lite", @@ -374,9 +431,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -384,11 +441,17 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "io-uring" -version = "0.5.13" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1e1a01cfb924fd8c5c43b6827965db394f5a3a16c599ce03452266e1cf984c" +checksum = "595a0399f411a508feb2ec1e970a4a30c249351e30208960d58298de8660b0e5" dependencies = [ "bitflags 1.3.2", "libc", @@ -414,14 +477,25 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libmimalloc-sys" -version = "0.1.38" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7bb23d733dfcc8af652a78b7bf232f0e967710d044732185e561e47c0336b6" +checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" dependencies = [ "cc", "libc", ] +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall", +] + [[package]] name = "lock_api" version = "0.4.12" @@ -434,9 +508,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchit" @@ -456,15 +530,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mimalloc" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9186d86b79b52f4a77af65604b51225e8db1d6ee7e3f41aec1e40829c71a176" +checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" dependencies = [ "libmimalloc-sys", ] @@ -477,22 +551,23 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -510,21 +585,11 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -537,9 +602,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -553,9 +618,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets", ] [[package]] @@ -598,9 +663,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "postgres-protocol" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" +checksum = "acda0ebdebc28befa84bee35e651e4c5f09073d668c7aed4cf7e23c3cda84b23" dependencies = [ "base64", "byteorder", @@ -616,9 +681,9 @@ dependencies = [ [[package]] name = "postgres-types" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" +checksum = "02048d9e032fb3cc3413bbf7b83a15d84a5d419778e2628751896d856498eee9" dependencies = [ "bytes", "fallible-iterator", @@ -627,24 +692,27 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pq-sys" -version = "0.4.8" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0052426df997c0cbd30789eb44ca097e3541717a7b8fa36b1c464ee7edebd" +checksum = "a24ff9e4cf6945c988f0db7005d87747bf72864965c3529d259ad155ac41d584" dependencies = [ "vcpkg", ] [[package]] name = "proc-macro2" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -701,20 +769,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -780,12 +839,6 @@ dependencies = [ "parking_lot", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" @@ -794,18 +847,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" dependencies = [ "proc-macro2", "quote", @@ -814,11 +867,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -902,26 +956,32 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.65" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -942,9 +1002,9 @@ checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -957,31 +1017,30 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-uring" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d5e02bb137e030b3a547c65a3bd2f1836d66a97369fdcc69034002b10e155ef" +checksum = "748482e3e13584a34664a710168ad5068e8cb1d968aa4ffa887e83ca6dd27967" dependencies = [ "bytes", + "futures-util", "io-uring", "libc", - "scoped-tls", "slab", "socket2 0.4.10", "tokio", @@ -1008,7 +1067,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytes", "http", "http-body", @@ -1077,6 +1136,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + [[package]] name = "vcpkg" version = "0.2.15" @@ -1085,9 +1150,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -1117,150 +1182,93 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "xitca-codegen" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866906a5f280481ef022ccdec1640730550304bb86b016815d9982fde2f48e3e" +checksum = "336b646a30e6d44093beaae1bbe5dda664e8466d387663fc9d61c55fb2d78424" dependencies = [ "quote", "syn", @@ -1268,9 +1276,9 @@ dependencies = [ [[package]] name = "xitca-http" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d5fd258cd6cd9d677cb94273da69fafee7460bbbd001c92a73c167149856e46" +checksum = "47b5b036e32261c69d4f0e81bcb28c2e058ed569518959336fd75fc086208d3f" dependencies = [ "futures-core", "http", @@ -1290,9 +1298,9 @@ dependencies = [ [[package]] name = "xitca-io" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da690dc253320dae7ffbb70e7fa9c5e52ef79476dd41f5d52b9114c8b58d7126" +checksum = "376a4849eef1f3475a6b7a5c474dac278c320a28f6e2abc07be57048b35cc5df" dependencies = [ "bytes", "tokio", @@ -1303,7 +1311,7 @@ dependencies = [ [[package]] name = "xitca-postgres" version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=ea1f5a2447e0969a6dff84eac9ff9ff90dbc7ed1#ea1f5a2447e0969a6dff84eac9ff9ff90dbc7ed1" +source = "git+https://github.com/HFQR/xitca-web.git?rev=0cad5309beb278dc967378a35b733e26be0d4073#0cad5309beb278dc967378a35b733e26be0d4073" dependencies = [ "fallible-iterator", "percent-encoding", @@ -1318,18 +1326,18 @@ dependencies = [ [[package]] name = "xitca-router" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687a3fb0a32b89524fab7d780d4cc66942b8ee6a493a7f2ff78384fe677b8e09" +checksum = "35a771113f381c9a2f5ae1096b70d629ed241a1a473304ea902258c3d528f536" dependencies = [ "xitca-unsafe-collection", ] [[package]] name = "xitca-server" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e144aca50286d05f7450045d6b6eebe2157ed11bc5821d926fc276280113c94" +checksum = "a40a05f18780f1de843c5077583e4650b08d0518fcf9cf7948e28bc92e489736" dependencies = [ "socket2 0.5.7", "tokio", @@ -1342,15 +1350,15 @@ dependencies = [ [[package]] name = "xitca-service" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a4a38548b14925111dd99560f0a10d1eb9e3e117fa5471c35387ed6f77b58c" +checksum = "74b093ca75b264924773d53e445de08a937100bf1cbe4f62d4dc2c0d04a3ba4b" [[package]] name = "xitca-unsafe-collection" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552a6bf21a5d0dc470644cb3b99f98f44bd414cd6fcca74610465d8196b1d23e" +checksum = "467b95b08735dcd7061be626d02aea062bc0b99918bc9de11b8fc15d901158ae" dependencies = [ "bytes", ] @@ -1378,14 +1386,14 @@ dependencies = [ "xitca-server", "xitca-service", "xitca-unsafe-collection", - "xitca-web 0.5.0", + "xitca-web 0.6.2", ] [[package]] name = "xitca-web" -version = "0.5.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd23a9146a753f4f9e10bf4cc99b53d040a5459c32f043965d75f0c2b4a78af6" +checksum = "dd4f8f16791ea2a8845f617f1e87887f917835e0603d01f03a51e638b9613d0c" dependencies = [ "futures-core", "http-body", @@ -1402,3 +1410,24 @@ dependencies = [ "xitca-service", "xitca-unsafe-collection", ] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/frameworks/Rust/xitca-web/Cargo.toml b/frameworks/Rust/xitca-web/Cargo.toml index b9447c3e7ea..d9606bf2a96 100644 --- a/frameworks/Rust/xitca-web/Cargo.toml +++ b/frameworks/Rust/xitca-web/Cargo.toml @@ -11,7 +11,7 @@ required-features = ["io-uring", "pg", "router", "template"] [[bin]] name = "xitca-web-iou" path = "./src/main_iou.rs" -required-features = ["io-uring", "perf", "pg-iou", "template"] +required-features = ["io-uring", "perf", "pg", "template"] [[bin]] name = "xitca-web-wasm" @@ -33,8 +33,6 @@ required-features = ["pg-orm", "template", "web-codegen"] pg = ["xitca-postgres/single-thread"] # pg send/sync optional pg-sync = ["xitca-postgres"] -# pg io_uring optional -pg-iou = ["pg", "xitca-postgres/io-uring"] # pg orm optional pg-orm = ["diesel"] # http router optional @@ -53,18 +51,18 @@ axum = ["dep:axum", "http-body", "tower", "tower-http", "xitca-web/tower-http-co perf = ["mimalloc", "tokio/parking_lot"] [dependencies] -xitca-http = "0.5" -xitca-io = "0.3" -xitca-server = "0.3" -xitca-service = "0.1" -xitca-unsafe-collection = "0.1.1" +xitca-http = "0.6" +xitca-io = "0.4" +xitca-server = "0.4" +xitca-service = "0.2" +xitca-unsafe-collection = "0.2" atoi = "2" serde = { version = "1" } serde_json = { version = "1" } # web optional -xitca-web = { version = "0.5", features = ["json"], optional = true } +xitca-web = { version = "0.6", features = ["json"], optional = true } # raw-pg optional xitca-postgres = { version = "0.1", optional = true } @@ -97,4 +95,4 @@ codegen-units = 1 panic = "abort" [patch.crates-io] -xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "ea1f5a2447e0969a6dff84eac9ff9ff90dbc7ed1" } +xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "0cad5309beb278dc967378a35b733e26be0d4073" } diff --git a/frameworks/Rust/xitca-web/src/main_iou.rs b/frameworks/Rust/xitca-web/src/main_iou.rs index 83dfbc0eaab..67ae6dad4d3 100644 --- a/frameworks/Rust/xitca-web/src/main_iou.rs +++ b/frameworks/Rust/xitca-web/src/main_iou.rs @@ -24,7 +24,7 @@ use xitca_http::{ }; use xitca_io::{ bytes::{Bytes, BytesMut}, - io_uring::IoBuf, + io_uring::BoundedBuf, net::{io_uring::TcpStream as IOUTcpStream, TcpStream}, }; use xitca_service::{fn_build, fn_service, middleware::UncheckedReady, Service, ServiceExt}; diff --git a/frameworks/Rust/xitca-web/src/util.rs b/frameworks/Rust/xitca-web/src/util.rs index 8c4cee9da98..dc0476a5d15 100755 --- a/frameworks/Rust/xitca-web/src/util.rs +++ b/frameworks/Rust/xitca-web/src/util.rs @@ -49,7 +49,7 @@ mod non_wasm { } } - #[cfg(any(feature = "pg", feature = "pg-iou"))] + #[cfg(feature = "pg")] mod pg_state { use core::{cell::RefCell, future::Future, pin::Pin}; @@ -79,7 +79,7 @@ mod non_wasm { } } - #[cfg(any(feature = "pg", feature = "pg-iou"))] + #[cfg(feature = "pg")] pub use pg_state::*; } diff --git a/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile b/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile index 2d29f5e2ffb..f5a87ea8ec5 100644 --- a/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.77 +FROM rust:1.79 ADD ./ /xitca-web WORKDIR /xitca-web diff --git a/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile b/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile index 43bf2b23fc5..3b0ef259420 100644 --- a/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile @@ -1,9 +1,9 @@ -FROM rust:1.77 +FROM rust:1.79 ADD ./ /xitca-web WORKDIR /xitca-web -RUN cargo build --release --bin xitca-web-iou --features io-uring,perf,pg-iou,template +RUN cargo build --release --bin xitca-web-iou --features io-uring,perf,pg,template EXPOSE 8080 diff --git a/frameworks/Rust/xitca-web/xitca-web-sync.dockerfile b/frameworks/Rust/xitca-web/xitca-web-sync.dockerfile index 5e71fa5d649..21ed93620d3 100644 --- a/frameworks/Rust/xitca-web/xitca-web-sync.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web-sync.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.77 +FROM rust:1.79 ADD ./ /xitca-web WORKDIR /xitca-web diff --git a/frameworks/Rust/xitca-web/xitca-web.dockerfile b/frameworks/Rust/xitca-web/xitca-web.dockerfile index bed37320e72..0bbd89946c6 100644 --- a/frameworks/Rust/xitca-web/xitca-web.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.77 +FROM rust:1.79 ADD ./ /xitca-web WORKDIR /xitca-web From db2f34b8eb6a2a87b8f3773f9fabb839db25b234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:44:35 +0000 Subject: [PATCH 17/22] Bump aiohttp from 3.9.4 to 3.10.2 in /frameworks/Python/aiohttp Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.4 to 3.10.2. - [Release notes](https://github.com/aio-libs/aiohttp/releases) - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.4...v3.10.2) --- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- frameworks/Python/aiohttp/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/Python/aiohttp/requirements.txt b/frameworks/Python/aiohttp/requirements.txt index d0caf5f25e7..444a284f816 100644 --- a/frameworks/Python/aiohttp/requirements.txt +++ b/frameworks/Python/aiohttp/requirements.txt @@ -1,4 +1,4 @@ -aiohttp==3.9.4 +aiohttp==3.10.2 asyncpg==0.25.0 cchardet==2.1.7 gunicorn==20.1 From 1b2f23aa7c8a9cdd4d3ed1b9b3890b872288e30a Mon Sep 17 00:00:00 2001 From: Aaron Tavistock Date: Tue, 13 Aug 2024 12:50:42 -0700 Subject: [PATCH 18/22] [elixir] Version and code updates (#9198) * Updates for Phoenix, Elixir, Erlang, and Docker image * Missed on mix file and template should be heex * Add back fortunes with heex * Update plug libraries * Code based performance improvements --- .../Elixir/phoenix/benchmark_config.json | 29 +---------- frameworks/Elixir/phoenix/config/bandit.exs | 43 ---------------- frameworks/Elixir/phoenix/config/config.exs | 8 +++ frameworks/Elixir/phoenix/config/prod.exs | 9 ++-- .../Elixir/phoenix/lib/hello/application.ex | 2 +- frameworks/Elixir/phoenix/lib/hello/cache.ex | 5 -- .../Elixir/phoenix/lib/hello/world_cache.ex | 31 ++++++++++++ frameworks/Elixir/phoenix/lib/hello_web.ex | 4 +- .../hello_web/controllers/page_controller.ex | 36 ++++++------- .../{fortunes.html.eex => fortunes.html.heex} | 0 frameworks/Elixir/phoenix/mix.exs | 16 +++--- frameworks/Elixir/phoenix/mix.lock | 50 +++++++++---------- .../Elixir/phoenix/phoenix-bandit.dockerfile | 39 --------------- frameworks/Elixir/phoenix/phoenix.dockerfile | 6 +-- .../Elixir/plug/elixir-plug-ecto.dockerfile | 6 +-- frameworks/Elixir/plug/mix.exs | 12 ++--- frameworks/Elixir/plug/mix.lock | 34 ++++++------- 17 files changed, 123 insertions(+), 207 deletions(-) delete mode 100644 frameworks/Elixir/phoenix/config/bandit.exs delete mode 100644 frameworks/Elixir/phoenix/lib/hello/cache.ex create mode 100644 frameworks/Elixir/phoenix/lib/hello/world_cache.ex rename frameworks/Elixir/phoenix/lib/hello_web/controllers/page_html/{fortunes.html.eex => fortunes.html.heex} (100%) delete mode 100644 frameworks/Elixir/phoenix/phoenix-bandit.dockerfile diff --git a/frameworks/Elixir/phoenix/benchmark_config.json b/frameworks/Elixir/phoenix/benchmark_config.json index 9af25b9fbdc..2286bd85fbd 100644 --- a/frameworks/Elixir/phoenix/benchmark_config.json +++ b/frameworks/Elixir/phoenix/benchmark_config.json @@ -2,30 +2,6 @@ "framework": "phoenix", "tests": [{ "default": { - "json_url": "/json", - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", - "plaintext_url": "/plaintext", - "update_url": "/updates?queries=", - "cached_query_url": "/cached-queries?count=", - "port": 8080, - "approach": "Realistic", - "classification": "Fullstack", - "database": "Postgres", - "framework": "Phoenix", - "language": "Elixir", - "flavor": "None", - "orm": "full", - "platform": "beam", - "webserver": "cowboy", - "os": "Linux", - "database_os": "Linux", - "display_name": "Phoenix", - "notes": "", - "versus": "" - }, - "bandit": { "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -45,9 +21,8 @@ "webserver": "bandit", "os": "Linux", "database_os": "Linux", - "display_name": "Phoenix-Bandit", - "notes": "", - "versus": "default" + "display_name": "Phoenix", + "notes": "" } }] } diff --git a/frameworks/Elixir/phoenix/config/bandit.exs b/frameworks/Elixir/phoenix/config/bandit.exs deleted file mode 100644 index ccaf648c115..00000000000 --- a/frameworks/Elixir/phoenix/config/bandit.exs +++ /dev/null @@ -1,43 +0,0 @@ -import Config - -config :hello, HelloWeb.Endpoint, - adapter: Bandit.PhoenixAdapter, - http: [port: 8080, ip: {0, 0, 0, 0}], - cache_static_lookup: false, - check_orgin: false, - debug_errors: false, - code_reloader: false, - server: true - - -config :hello, Hello.Repo, - username: "benchmarkdbuser", - password: "benchmarkdbpass", - database: "hello_world", - hostname: "tfb-database", - pool_size: 40, - queue_target: 5000, - log: false - -config :phoenix, :logger, false - -config :logger, - compile_time_purge_matching: [ - [level_lower_than: :error] - ], - level: :error, - backends: [] - -# ## SSL Support -# -# To get SSL working, you will need to add the `https` key -# to the previous section: -# -# config:hello, Hello.Endpoint, -# ... -# https: [port: 443, -# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"), -# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")] -# -# Where those two env variables point to a file on -# disk for the key and cert. diff --git a/frameworks/Elixir/phoenix/config/config.exs b/frameworks/Elixir/phoenix/config/config.exs index be5688f535b..e464e49d164 100755 --- a/frameworks/Elixir/phoenix/config/config.exs +++ b/frameworks/Elixir/phoenix/config/config.exs @@ -18,6 +18,14 @@ config :hello, HelloWeb.Endpoint, debug_errors: false, secret_key_base: "Z18ZjzZslFpKd8HB41IljqMavPiOKVF9y1DIQ+S2Ytg7Op0EIauwJgd7mtRStssx" +# Configure cache for world entities +config :hello, Hello.WorldCache, + gc_interval: :timer.hours(1), + max_size: 1_000_000, + allocated_memory: 100_000_000, + gc_cleanup_min_timeout: :timer.seconds(30), + gc_cleanup_max_timeout: :timer.minutes(30) + # Configures Elixir's Logger config :logger, :console, format: "$time $metadata[$level] $message\n", diff --git a/frameworks/Elixir/phoenix/config/prod.exs b/frameworks/Elixir/phoenix/config/prod.exs index 853a5ea247d..48b24364a40 100755 --- a/frameworks/Elixir/phoenix/config/prod.exs +++ b/frameworks/Elixir/phoenix/config/prod.exs @@ -1,9 +1,10 @@ import Config config :hello, HelloWeb.Endpoint, - url: [host: "0.0.0.0"], - http: [port: 8080, protocol_options: [max_keepalive: :infinity], backlog: 8096], - cache_static_lookup: false, + adapter: Bandit.PhoenixAdapter, + http: [port: 8080, ip: {0, 0, 0, 0}], + http_options: [log_protocol_errors: false], + compress: false, check_origin: false, debug_errors: false, code_reloader: false, @@ -14,7 +15,7 @@ config :hello, Hello.Repo, password: "benchmarkdbpass", database: "hello_world", hostname: "tfb-database", - pool_size: 40, + pool_size: 50, queue_target: 5000, log: false diff --git a/frameworks/Elixir/phoenix/lib/hello/application.ex b/frameworks/Elixir/phoenix/lib/hello/application.ex index 58fed15fc63..49f1ef8ba03 100644 --- a/frameworks/Elixir/phoenix/lib/hello/application.ex +++ b/frameworks/Elixir/phoenix/lib/hello/application.ex @@ -6,7 +6,7 @@ defmodule Hello.Application do def start(_type, _args) do children = [ Hello.Repo, - {Hello.Cache, []}, + {Hello.WorldCache, []}, HelloWeb.Endpoint ] diff --git a/frameworks/Elixir/phoenix/lib/hello/cache.ex b/frameworks/Elixir/phoenix/lib/hello/cache.ex deleted file mode 100644 index 0f051a3fb72..00000000000 --- a/frameworks/Elixir/phoenix/lib/hello/cache.ex +++ /dev/null @@ -1,5 +0,0 @@ -defmodule Hello.Cache do - use Nebulex.Cache, - otp_app: :hello, - adapter: Nebulex.Adapters.Local -end diff --git a/frameworks/Elixir/phoenix/lib/hello/world_cache.ex b/frameworks/Elixir/phoenix/lib/hello/world_cache.ex new file mode 100644 index 00000000000..b4943e14a35 --- /dev/null +++ b/frameworks/Elixir/phoenix/lib/hello/world_cache.ex @@ -0,0 +1,31 @@ +defmodule Hello.WorldCache do + use Nebulex.Cache, + otp_app: :hello, + adapter: Nebulex.Adapters.Local + + alias Hello.Models.World + alias Hello.Repo + + def seed do + if not __MODULE__.has_key?(:seeded) do + World + |> Repo.all() + |> Enum.into([], &{&1.id, &1}) + |> __MODULE__.put_all() + + __MODULE__.put(:seeded, true) + end + end + + def fetch(id) do + case __MODULE__.get(id) do + nil -> + world = Repo.get(World, id) + :ok = __MODULE__.put(id, world) + world + world -> + world + end + end + +end diff --git a/frameworks/Elixir/phoenix/lib/hello_web.ex b/frameworks/Elixir/phoenix/lib/hello_web.ex index 78062f969be..1193aab23a5 100644 --- a/frameworks/Elixir/phoenix/lib/hello_web.ex +++ b/frameworks/Elixir/phoenix/lib/hello_web.ex @@ -62,9 +62,7 @@ defmodule HelloWeb do defp html_helpers do quote do # Use all HTML functionality (forms, tags, etc) - use Phoenix.HTML - # Core UI Components and translation - import HelloWeb.Gettext + import Phoenix.HTML # Routes generation with the ~p sigil unquote(verified_routes()) diff --git a/frameworks/Elixir/phoenix/lib/hello_web/controllers/page_controller.ex b/frameworks/Elixir/phoenix/lib/hello_web/controllers/page_controller.ex index a44c5edf099..34c1fc120fd 100644 --- a/frameworks/Elixir/phoenix/lib/hello_web/controllers/page_controller.ex +++ b/frameworks/Elixir/phoenix/lib/hello_web/controllers/page_controller.ex @@ -1,10 +1,11 @@ defmodule HelloWeb.PageController do - alias Hello.Models.{Fortune, World} use HelloWeb, :controller + alias Hello.Models.Fortune + alias Hello.Models.World alias Hello.Repo - alias Hello.Cache + alias Hello.WorldCache @random_max 10_000 @@ -29,7 +30,7 @@ defmodule HelloWeb.PageController do worlds = Stream.repeatedly(&random_id/0) |> Stream.uniq() - |> Stream.map(fn idx -> Repo.get(World, idx) end) + |> Stream.map(&Repo.get(World, &1)) |> Enum.take(size(params["queries"])) json(conn, worlds) @@ -41,11 +42,11 @@ defmodule HelloWeb.PageController do message: "Additional fortune added at request time." } - fortunes = [additional_fortune | Repo.all(Fortune)] + fortunes = + [additional_fortune | Repo.all(Fortune)] + |> Enum.sort_by(& &1.message) - render(conn, :fortunes, - fortunes: Enum.sort(fortunes, fn f1, f2 -> f1.message < f2.message end) - ) + render(conn, :fortunes, fortunes: fortunes) end def updates(conn, params) do @@ -54,9 +55,13 @@ defmodule HelloWeb.PageController do worlds = Stream.repeatedly(&random_id/0) |> Stream.uniq() - |> Stream.map(fn idx -> Repo.get(World, idx) end) + |> Stream.map(&Repo.get(World, &1)) |> Stream.map(fn world -> %{id: world.id, randomnumber: :rand.uniform(@random_max)} end) |> Enum.take(size(params["queries"])) + # If this is not sorted it sometimes generates + # FAIL for http://tfb-server:8080/updates/20 + # Only 20470 executed queries in the database out of roughly 20480 expected. + |> Enum.sort_by(& &1.id) Repo.insert_all( World, @@ -75,28 +80,17 @@ defmodule HelloWeb.PageController do def cached(conn, params) do :rand.seed(:exsp) + WorldCache.seed() worlds = Stream.repeatedly(&random_id/0) |> Stream.uniq() - |> Stream.map(&get_cached_world/1) + |> Stream.map(&WorldCache.fetch(&1)) |> Enum.take(size(params["count"])) json(conn, worlds) end - defp get_cached_world(idx) do - case Cache.get(idx) do - nil -> - world = Repo.get(World, idx) - :ok = Cache.put(idx, world) - world - - world -> - world - end - end - defp random_id() do :rand.uniform(@random_max) end diff --git a/frameworks/Elixir/phoenix/lib/hello_web/controllers/page_html/fortunes.html.eex b/frameworks/Elixir/phoenix/lib/hello_web/controllers/page_html/fortunes.html.heex similarity index 100% rename from frameworks/Elixir/phoenix/lib/hello_web/controllers/page_html/fortunes.html.eex rename to frameworks/Elixir/phoenix/lib/hello_web/controllers/page_html/fortunes.html.heex diff --git a/frameworks/Elixir/phoenix/mix.exs b/frameworks/Elixir/phoenix/mix.exs index fa48c24784d..a0ecab89cd7 100755 --- a/frameworks/Elixir/phoenix/mix.exs +++ b/frameworks/Elixir/phoenix/mix.exs @@ -4,8 +4,8 @@ defmodule Hello.Mixfile do def project do [ app: :hello, - version: "0.1.0", - elixir: "~> 1.14", + version: "1.1.1", + elixir: "~> 1.17", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, deps: deps() @@ -29,17 +29,17 @@ defmodule Hello.Mixfile do # Type `mix help deps` for examples and options defp deps do [ - {:bandit, "~> 1.0.0-pre.5"}, + {:bandit, "~> 1.0.0"}, {:gettext, "~> 0.20"}, - {:ecto_sql, "~> 3.7"}, + {:ecto_sql, "~> 3.10"}, {:jason, "~> 1.2"}, {:phoenix, "~> 1.7"}, - {:phoenix_ecto, "~> 4.4"}, - {:phoenix_html, "~> 3.2"}, {:phoenix_live_view, "~> 0.18"}, + {:phoenix_ecto, "~> 4.4"}, + {:phoenix_html, "~> 4.1"}, {:plug_cowboy, "~> 2.5"}, - {:postgrex, "~> 0.15"}, - {:nebulex, "~> 2.4"} + {:postgrex, ">= 0.0.0"}, + {:nebulex, "~> 2.6"} ] end end diff --git a/frameworks/Elixir/phoenix/mix.lock b/frameworks/Elixir/phoenix/mix.lock index 415edcb0107..f3c8c288625 100644 --- a/frameworks/Elixir/phoenix/mix.lock +++ b/frameworks/Elixir/phoenix/mix.lock @@ -1,32 +1,32 @@ %{ - "bandit": {:hex, :bandit, "1.0.0-pre.5", "94b668f987a3b63f53123d2bdef1aaab73439eb02fcef7eb99032038206cab54", [:mix], [{:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0-pre", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "686da83f0c2cabd68cc221067ab43bc50af88c3e7fc8ef824a0b7039a978e383"}, - "castore": {:hex, :castore, "1.0.2", "0c6292ecf3e3f20b7c88408f00096337c4bfd99bd46cc2fe63413ddbe45b3573", [:mix], [], "hexpm", "40b2dd2836199203df8500e4a270f10fc006cc95adc8a319e148dc3077391d96"}, - "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, + "bandit": {:hex, :bandit, "1.0.0", "2bd87bbf713d0eed0090f2fa162cd1676198122e6c2b68a201c706e354a6d5e5", [:mix], [{:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "32acf6ac030fee1f99fd9c3fcf81671911ae8637e0a61c98111861b466efafdb"}, + "castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"}, + "cowboy": {:hex, :cowboy, "2.12.0", "f276d521a1ff88b2b9b4c54d0e753da6c66dd7be6c9fca3d9418b561828a3731", [:make, :rebar3], [{:cowlib, "2.13.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, - "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, - "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, + "cowlib": {:hex, :cowlib, "2.13.0", "db8f7505d8332d98ef50a3ef34b34c1afddec7506e4ee4dd4a3a266285d282ca", [:make, :rebar3], [], "hexpm", "e1e1284dc3fc030a64b1ad0d8382ae7e99da46c3246b815318a4b848873800a4"}, + "db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, - "ecto": {:hex, :ecto, "3.10.1", "c6757101880e90acc6125b095853176a02da8f1afe056f91f1f90b80c9389822", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d2ac4255f1601bdf7ac74c0ed971102c6829dc158719b94bd30041bbad77f87a"}, - "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, - "expo": {:hex, :expo, "0.4.1", "1c61d18a5df197dfda38861673d392e642649a9cef7694d2f97a587b2cfb319b", [:mix], [], "hexpm", "2ff7ba7a798c8c543c12550fa0e2cbc81b95d4974c65855d8d15ba7b37a1ce47"}, - "gettext": {:hex, :gettext, "0.22.2", "6bfca374de34ecc913a28ba391ca184d88d77810a3e427afa8454a71a51341ac", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "8a2d389673aea82d7eae387e6a2ccc12660610080ae7beb19452cfdc1ec30f60"}, + "ecto": {:hex, :ecto, "3.11.2", "e1d26be989db350a633667c5cda9c3d115ae779b66da567c68c80cfb26a8c9ee", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3c38bca2c6f8d8023f2145326cc8a80100c3ffe4dcbd9842ff867f7fc6156c65"}, + "ecto_sql": {:hex, :ecto_sql, "3.11.3", "4eb7348ff8101fbc4e6bbc5a4404a24fecbe73a3372d16569526b0cf34ebc195", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.11.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e5f36e3d736b99c7fee3e631333b8394ade4bafe9d96d35669fca2d81c2be928"}, + "expo": {:hex, :expo, "1.0.0", "647639267e088717232f4d4451526e7a9de31a3402af7fcbda09b27e9a10395a", [:mix], [], "hexpm", "18d2093d344d97678e8a331ca0391e85d29816f9664a25653fd7e6166827827c"}, + "gettext": {:hex, :gettext, "0.25.0", "98a95a862a94e2d55d24520dd79256a15c87ea75b49673a2e2f206e6ebc42e5d", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "38e5d754e66af37980a94fb93bb20dcde1d2361f664b0a19f01e87296634051f"}, "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, - "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, - "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, - "nebulex": {:hex, :nebulex, "2.5.1", "8ffbde30643e76d6cec712281ca68ab05f73170de9e758a39bc7e4e6987f608f", [:mix], [{:decorator, "~> 1.4", [hex: :decorator, repo: "hexpm", optional: true]}, {:shards, "~> 1.1", [hex: :shards, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "8d0d3800d98c68ee19b229b7fe35fac0192ab5963a573612cf74a388e083bccf"}, - "phoenix": {:hex, :phoenix, "1.7.3", "4d8eca2c020c9ed81a28e7a8c60e0a4f6f9f7f6e12eb91dfd01301eac07424c1", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.4", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "6b1bc308758f95ecf3e0d795389440a2ca88a903e0fda1f921c780918c16d640"}, - "phoenix_ecto": {:hex, :phoenix_ecto, "4.4.2", "b21bd01fdeffcfe2fab49e4942aa938b6d3e89e93a480d4aee58085560a0bc0d", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "70242edd4601d50b69273b057ecf7b684644c19ee750989fd555625ae4ce8f5d"}, - "phoenix_html": {:hex, :phoenix_html, "3.3.1", "4788757e804a30baac6b3fc9695bf5562465dd3f1da8eb8460ad5b404d9a2178", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "bed1906edd4906a15fd7b412b85b05e521e1f67c9a85418c55999277e553d0d3"}, - "phoenix_live_view": {:hex, :phoenix_live_view, "0.19.0", "de5643d03e3cdf5ff19cd45b5d14543a3b1ad8551d529f6b24246e88a6c6f1b8", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a650b6f814c4f386314b98f1aebf92f8652649166612f84ef2e60a20894addfa"}, - "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.2", "a4950b63ace57720b0fc1c6da083c53346b36f99021de89595cc4f026288ff51", [:mix], [], "hexpm", "45741676a94c71f9afdfed9d22d49b6856c026ff504db04e3dc03a1d86f8201c"}, - "phoenix_template": {:hex, :phoenix_template, "1.0.1", "85f79e3ad1b0180abb43f9725973e3b8c2c3354a87245f91431eec60553ed3ef", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "157dc078f6226334c91cb32c1865bf3911686f8bcd6bcff86736f6253e6993ee"}, - "plug": {:hex, :plug, "1.14.2", "cff7d4ec45b4ae176a227acd94a7ab536d9b37b942c8e8fa6dfc0fff98ff4d80", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "842fc50187e13cf4ac3b253d47d9474ed6c296a8732752835ce4a86acdf68d13"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.6.1", "9a3bbfceeb65eff5f39dab529e5cd79137ac36e913c02067dba3963a26efe9b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "de36e1a21f451a18b790f37765db198075c25875c64834bcc82d90b309eb6613"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, - "postgrex": {:hex, :postgrex, "0.17.1", "01c29fd1205940ee55f7addb8f1dc25618ca63a8817e56fac4f6846fc2cddcbe", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "14b057b488e73be2beee508fb1955d8db90d6485c6466428fe9ccf1d6692a555"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, + "mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"}, + "nebulex": {:hex, :nebulex, "2.6.3", "78af348ed9f8a338871b41e0b6de718c1808e627ce03fbe86598cbda2bdda2f5", [:mix], [{:decorator, "~> 1.4", [hex: :decorator, repo: "hexpm", optional: true]}, {:shards, "~> 1.1", [hex: :shards, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "09cdcbb62f8463ffcec7cae4936425ce91e25d92a6cd37e48b5dda7c851958d5"}, + "phoenix": {:hex, :phoenix, "1.7.14", "a7d0b3f1bc95987044ddada111e77bd7f75646a08518942c72a8440278ae7825", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "c7859bc56cc5dfef19ecfc240775dae358cbaa530231118a9e014df392ace61a"}, + "phoenix_ecto": {:hex, :phoenix_ecto, "4.6.2", "3b83b24ab5a2eb071a20372f740d7118767c272db386831b2e77638c4dcc606d", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "3f94d025f59de86be00f5f8c5dd7b5965a3298458d21ab1c328488be3b5fcd59"}, + "phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "0.20.17", "f396bbdaf4ba227b82251eb75ac0afa6b3da5e509bc0d030206374237dfc9450", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a61d741ffb78c85fdbca0de084da6a48f8ceb5261a79165b5a0b59e5f65ce98b"}, + "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, + "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"}, + "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.7.1", "87677ffe3b765bc96a89be7960f81703223fe2e21efa42c125fcd0127dd9d6b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "02dbd5f9ab571b864ae39418db7811618506256f6d13b4a45037e5fe78dc5de3"}, + "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"}, + "postgrex": {:hex, :postgrex, "0.19.0", "f7d50e50cb42e0a185f5b9a6095125a9ab7e4abccfbe2ab820ab9aa92b71dbab", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "dba2d2a0a8637defbf2307e8629cb2526388ba7348f67d04ec77a5d6a72ecfae"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, - "thousand_island": {:hex, :thousand_island, "1.0.0-pre.3", "67b31809769736031b240339fa5096a6e491b7d7ec5e0e37ee80cab10e8712a9", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "75602046418b2510aac3c968b2941778187fe88256010116834903b806d77f53"}, - "websock": {:hex, :websock, "0.5.1", "c496036ce95bc26d08ba086b2a827b212c67e7cabaa1c06473cd26b40ed8cf10", [:mix], [], "hexpm", "b9f785108b81cd457b06e5f5dabe5f65453d86a99118b2c0a515e1e296dc2d2c"}, - "websock_adapter": {:hex, :websock_adapter, "0.5.1", "292e6c56724e3457e808e525af0e9bcfa088cc7b9c798218e78658c7f9b85066", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "8e2e1544bfde5f9d0442f9cec2f5235398b224f75c9e06b60557debf64248ec1"}, + "thousand_island": {:hex, :thousand_island, "1.3.5", "6022b6338f1635b3d32406ff98d68b843ba73b3aa95cfc27154223244f3a6ca5", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2be6954916fdfe4756af3239fb6b6d75d0b8063b5df03ba76fd8a4c87849e180"}, + "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"}, + "websock_adapter": {:hex, :websock_adapter, "0.5.6", "0437fe56e093fd4ac422de33bf8fc89f7bc1416a3f2d732d8b2c8fd54792fe60", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "e04378d26b0af627817ae84c92083b7e97aca3121196679b73c73b99d0d133ea"}, } diff --git a/frameworks/Elixir/phoenix/phoenix-bandit.dockerfile b/frameworks/Elixir/phoenix/phoenix-bandit.dockerfile deleted file mode 100644 index 103350fc6db..00000000000 --- a/frameworks/Elixir/phoenix/phoenix-bandit.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -ARG ELIXIR="1.14.5" -ARG ERLANG="26.0" -ARG ALPINE="3.17.3" - -ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR}-erlang-${ERLANG}-alpine-${ALPINE}" -ARG RUNNER_IMAGE="alpine:${ALPINE}" - -FROM ${BUILDER_IMAGE} AS builder - -ARG MIX_ENV="bandit" - -RUN mix local.hex --force && \ - mix local.rebar --force - -COPY mix.exs mix.lock ./ -RUN mix deps.get --force --only prod - -COPY config ./config - -RUN mix deps.compile - -COPY priv ./priv -COPY lib ./lib - -COPY rel ./rel -RUN mix release --force --path /export - -# start a new build stage so that the final image will only contain -# the compiled release and other runtime necessities -FROM ${RUNNER_IMAGE} - -RUN apk add --no-cache libstdc++ openssl ncurses-libs - -COPY --from=builder /export /opt - -EXPOSE 8080 - -ENTRYPOINT ["/opt/bin/hello"] -CMD ["start"] diff --git a/frameworks/Elixir/phoenix/phoenix.dockerfile b/frameworks/Elixir/phoenix/phoenix.dockerfile index c9e0d7701b2..dcf8df3dd20 100644 --- a/frameworks/Elixir/phoenix/phoenix.dockerfile +++ b/frameworks/Elixir/phoenix/phoenix.dockerfile @@ -1,6 +1,6 @@ -ARG ELIXIR="1.14.5" -ARG ERLANG="26.0" -ARG ALPINE="3.17.3" +ARG ELIXIR="1.17.2" +ARG ERLANG="27.0.1" +ARG ALPINE="3.19.3" ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR}-erlang-${ERLANG}-alpine-${ALPINE}" ARG RUNNER_IMAGE="alpine:${ALPINE}" diff --git a/frameworks/Elixir/plug/elixir-plug-ecto.dockerfile b/frameworks/Elixir/plug/elixir-plug-ecto.dockerfile index a674dd80178..c943ba48991 100644 --- a/frameworks/Elixir/plug/elixir-plug-ecto.dockerfile +++ b/frameworks/Elixir/plug/elixir-plug-ecto.dockerfile @@ -1,6 +1,6 @@ -ARG ELIXIR="1.14.2" -ARG ERLANG="25.1.2" -ARG ALPINE="3.16.2" +ARG ELIXIR="1.17.2" +ARG ERLANG="27.0.1" +ARG ALPINE="3.19.3" ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR}-erlang-${ERLANG}-alpine-${ALPINE}" ARG RUNNER_IMAGE="alpine:${ALPINE}" diff --git a/frameworks/Elixir/plug/mix.exs b/frameworks/Elixir/plug/mix.exs index 1660a684b65..dcb29917a46 100644 --- a/frameworks/Elixir/plug/mix.exs +++ b/frameworks/Elixir/plug/mix.exs @@ -4,8 +4,8 @@ defmodule FrameworkBenchmarks.MixProject do def project do [ app: :framework_benchmarks, - version: "1.1.0", - elixir: "~> 1.14", + version: "1.1.1", + elixir: "~> 1.17", start_permanent: Mix.env() == :prod, deps: deps() ] @@ -24,10 +24,10 @@ defmodule FrameworkBenchmarks.MixProject do [ {:plug_cowboy, "~> 2.5"}, {:jason, "~> 1.4"}, - {:ecto_sql, "~> 3.8"}, - {:postgrex, "~> 0.16"}, - {:cachex, "~> 3.4"}, - {:phoenix_html, "~> 3.2"} + {:ecto_sql, "~> 3.10"}, + {:postgrex, ">= 0.0.0"}, + {:cachex, "~> 3.6"}, + {:phoenix_html, "~> 4.1"} ] end end diff --git a/frameworks/Elixir/plug/mix.lock b/frameworks/Elixir/plug/mix.lock index 324fedc25f8..fcc35f892b8 100644 --- a/frameworks/Elixir/plug/mix.lock +++ b/frameworks/Elixir/plug/mix.lock @@ -1,27 +1,23 @@ %{ "cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"}, - "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, - "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, + "cowboy": {:hex, :cowboy, "2.12.0", "f276d521a1ff88b2b9b4c54d0e753da6c66dd7be6c9fca3d9418b561828a3731", [:make, :rebar3], [{:cowlib, "2.13.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, - "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, - "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, + "cowlib": {:hex, :cowlib, "2.13.0", "db8f7505d8332d98ef50a3ef34b34c1afddec7506e4ee4dd4a3a266285d282ca", [:make, :rebar3], [], "hexpm", "e1e1284dc3fc030a64b1ad0d8382ae7e99da46c3246b815318a4b848873800a4"}, + "db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, - "ecto": {:hex, :ecto, "3.10.1", "c6757101880e90acc6125b095853176a02da8f1afe056f91f1f90b80c9389822", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d2ac4255f1601bdf7ac74c0ed971102c6829dc158719b94bd30041bbad77f87a"}, - "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, - "eljiffy": {:hex, :eljiffy, "1.3.0", "7e584be454c5ec3fc3ae472eedb4cb2185e9ed6cd863df383ef601de3f3b27fd", [:mix], [{:jiffy, "~> 1.0", [hex: :jiffy, repo: "hexpm", optional: false]}], "hexpm", "90420512d60fb45bc9c09221b4d89cc539c9bfefc1c62f24cb3e2cb13acf2215"}, + "ecto": {:hex, :ecto, "3.11.2", "e1d26be989db350a633667c5cda9c3d115ae779b66da567c68c80cfb26a8c9ee", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3c38bca2c6f8d8023f2145326cc8a80100c3ffe4dcbd9842ff867f7fc6156c65"}, + "ecto_sql": {:hex, :ecto_sql, "3.11.3", "4eb7348ff8101fbc4e6bbc5a4404a24fecbe73a3372d16569526b0cf34ebc195", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.11.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e5f36e3d736b99c7fee3e631333b8394ade4bafe9d96d35669fca2d81c2be928"}, "eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"}, - "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, - "jiffy": {:hex, :jiffy, "1.1.1", "aca10f47aa91697bf24ab9582c74e00e8e95474c7ef9f76d4f1a338d0f5de21b", [:rebar3], [], "hexpm", "62e1f0581c3c19c33a725c781dfa88410d8bff1bbafc3885a2552286b4785c4c"}, - "jumper": {:hex, :jumper, "1.0.1", "3c00542ef1a83532b72269fab9f0f0c82bf23a35e27d278bfd9ed0865cecabff", [:mix], [], "hexpm", "318c59078ac220e966d27af3646026db9b5a5e6703cb2aa3e26bcfaba65b7433"}, - "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, - "phoenix_html": {:hex, :phoenix_html, "3.3.1", "4788757e804a30baac6b3fc9695bf5562465dd3f1da8eb8460ad5b404d9a2178", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "bed1906edd4906a15fd7b412b85b05e521e1f67c9a85418c55999277e553d0d3"}, - "plug": {:hex, :plug, "1.14.2", "cff7d4ec45b4ae176a227acd94a7ab536d9b37b942c8e8fa6dfc0fff98ff4d80", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "842fc50187e13cf4ac3b253d47d9474ed6c296a8732752835ce4a86acdf68d13"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.6.1", "9a3bbfceeb65eff5f39dab529e5cd79137ac36e913c02067dba3963a26efe9b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "de36e1a21f451a18b790f37765db198075c25875c64834bcc82d90b309eb6613"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, - "postgrex": {:hex, :postgrex, "0.17.1", "01c29fd1205940ee55f7addb8f1dc25618ca63a8817e56fac4f6846fc2cddcbe", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "14b057b488e73be2beee508fb1955d8db90d6485c6466428fe9ccf1d6692a555"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, + "jumper": {:hex, :jumper, "1.0.2", "68cdcd84472a00ac596b4e6459a41b3062d4427cbd4f1e8c8793c5b54f1406a7", [:mix], [], "hexpm", "9b7782409021e01ab3c08270e26f36eb62976a38c1aa64b2eaf6348422f165e1"}, + "mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"}, + "phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"}, + "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.7.1", "87677ffe3b765bc96a89be7960f81703223fe2e21efa42c125fcd0127dd9d6b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "02dbd5f9ab571b864ae39418db7811618506256f6d13b4a45037e5fe78dc5de3"}, + "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"}, + "postgrex": {:hex, :postgrex, "0.19.0", "f7d50e50cb42e0a185f5b9a6095125a9ab7e4abccfbe2ab820ab9aa92b71dbab", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "dba2d2a0a8637defbf2307e8629cb2526388ba7348f67d04ec77a5d6a72ecfae"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, - "sleeplocks": {:hex, :sleeplocks, "1.1.2", "d45aa1c5513da48c888715e3381211c859af34bee9b8290490e10c90bb6ff0ca", [:rebar3], [], "hexpm", "9fe5d048c5b781d6305c1a3a0f40bb3dfc06f49bf40571f3d2d0c57eaa7f59a5"}, + "sleeplocks": {:hex, :sleeplocks, "1.1.3", "96a86460cc33b435c7310dbd27ec82ca2c1f24ae38e34f8edde97f756503441a", [:rebar3], [], "hexpm", "d3b3958552e6eb16f463921e70ae7c767519ef8f5be46d7696cc1ed649421321"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, - "ucol": {:hex, :ucol, "2.0.0", "64f9589d682dac6ca59252e1222e22697784f74addd0b88c5e34d53d267356bb", [:rebar3], [], "hexpm", "b544b88ce034d1d1ab58e093744cbded9a1e8b05006870b4d3865d6cd5066a21"}, - "unsafe": {:hex, :unsafe, "1.0.1", "a27e1874f72ee49312e0a9ec2e0b27924214a05e3ddac90e91727bc76f8613d8", [:mix], [], "hexpm", "6c7729a2d214806450d29766abc2afaa7a2cbecf415be64f36a6691afebb50e5"}, + "unsafe": {:hex, :unsafe, "1.0.2", "23c6be12f6c1605364801f4b47007c0c159497d0446ad378b5cf05f1855c0581", [:mix], [], "hexpm", "b485231683c3ab01a9cd44cb4a79f152c6f3bb87358439c6f68791b85c2df675"}, } From 61ebc1487c02ebff63be9d467151f7b1b919775d Mon Sep 17 00:00:00 2001 From: Daniil Zotov <142039751+zoto-ff@users.noreply.github.com> Date: Wed, 14 Aug 2024 18:05:20 +0300 Subject: [PATCH 19/22] Update Bun (#9211) * update bun * use bun build --compile * kill children on parent exit --- frameworks/TypeScript/bun/bun.dockerfile | 8 +++++--- frameworks/TypeScript/bun/src/index.ts | 14 +++++++------- frameworks/TypeScript/bun/src/spawn.ts | 17 +++++++++++++---- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/frameworks/TypeScript/bun/bun.dockerfile b/frameworks/TypeScript/bun/bun.dockerfile index 7692c8c82ae..ecf6ead2bbc 100644 --- a/frameworks/TypeScript/bun/bun.dockerfile +++ b/frameworks/TypeScript/bun/bun.dockerfile @@ -1,13 +1,15 @@ -FROM oven/bun:1.0 +FROM oven/bun:1.1 EXPOSE 8080 WORKDIR /app -USER bun - COPY ./src . ENV NODE_ENV=production +RUN bun build --compile --minify --outfile server . + +USER bun + CMD ["bun", "spawn.ts"] diff --git a/frameworks/TypeScript/bun/src/index.ts b/frameworks/TypeScript/bun/src/index.ts index be72a268363..45c0f303291 100644 --- a/frameworks/TypeScript/bun/src/index.ts +++ b/frameworks/TypeScript/bun/src/index.ts @@ -1,5 +1,5 @@ -const HELLO_WORLD_STR = "Hello, World!"; -const options: ResponseInit = { headers: { "Server": "Bun" } }; +const plainOptions: ResponseInit = { headers: { "Server": "Bun" } }; +const jsonOptions: ResponseInit = { headers: { "Server": "Bun", "Content-Type": "application/json" } }; const server = Bun.serve({ port: 8080, @@ -7,16 +7,16 @@ const server = Bun.serve({ fetch(req: Request) { const pathname = req.url.slice(req.url.indexOf("/", 8)); - if (pathname === "/json") { - return Response.json({ message: HELLO_WORLD_STR }, options); + if (pathname == "/json") { + return new Response(JSON.stringify({ message: "Hello, World!" }), jsonOptions); } - if (pathname === "/plaintext") { - return new Response(HELLO_WORLD_STR, options); + if (pathname == "/plaintext") { + return new Response("Hello, World!", plainOptions); } return new Response("", { status: 404 }) }, }); -console.log(`Listening on localhost:${server.port}`); +console.log(`Listening on ${server.url}\n`); diff --git a/frameworks/TypeScript/bun/src/spawn.ts b/frameworks/TypeScript/bun/src/spawn.ts index b3df7f03253..a6d990c1b67 100644 --- a/frameworks/TypeScript/bun/src/spawn.ts +++ b/frameworks/TypeScript/bun/src/spawn.ts @@ -1,9 +1,18 @@ -import os from "node:os"; +const cpus = navigator.hardwareConcurrency; +const buns = new Array(cpus); -const numCPUs = os.cpus().length; -for (let i = 0; i < numCPUs; i++) { - Bun.spawn(["bun", "index.ts"], { +for (let i = 0; i < cpus; i++) { + buns[i] = Bun.spawn(["./server"], { stdio: ["inherit", "inherit", "inherit"], env: { ...process.env }, }); } + +function kill() { + for (const bun of buns) { + bun.kill(); + } +} + +process.on("SIGINT", kill); +process.on("exit", kill); \ No newline at end of file From a3ff92743d6947417d589fdc1623e977698180a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F=20=D0=A2=D1=80=D0=B5=D1=82?= =?UTF-8?q?=D1=8F=D0=BA?= Date: Wed, 14 Aug 2024 18:06:57 +0300 Subject: [PATCH 20/22] feat(ditsmod): upgrade npm packages and added bun integration. (#9213) --- .../TypeScript/ditsmod/benchmark_config.json | 132 ++++++++++++++++++ frameworks/TypeScript/ditsmod/bun.lockb | Bin 0 -> 59387 bytes .../ditsmod/ditsmod-bun-mysql.dockerfile | 17 +++ .../ditsmod/ditsmod-bun-postgres.dockerfile | 17 +++ .../TypeScript/ditsmod/ditsmod-bun.dockerfile | 12 ++ .../ditsmod/ditsmod-mysql.dockerfile | 2 +- .../ditsmod/ditsmod-postgres.dockerfile | 2 +- .../TypeScript/ditsmod/ditsmod.dockerfile | 2 +- frameworks/TypeScript/ditsmod/package.json | 11 +- .../TypeScript/ditsmod/src/app/app.module.ts | 9 +- .../app/bun-integration/bun-application.ts | 17 +++ .../src/app/bun-integration/bun-providers.ts | 21 +++ .../src/app/bun-integration/node-res.ts | 61 ++++++++ .../src/app/bun-integration/pre-router.ts | 26 ++++ .../ditsmod/src/app/bun-integration/spawn.ts | 9 ++ frameworks/TypeScript/ditsmod/src/main.bun.ts | 12 ++ frameworks/TypeScript/ditsmod/tsconfig.json | 15 +- 17 files changed, 349 insertions(+), 16 deletions(-) create mode 100755 frameworks/TypeScript/ditsmod/bun.lockb create mode 100644 frameworks/TypeScript/ditsmod/ditsmod-bun-mysql.dockerfile create mode 100644 frameworks/TypeScript/ditsmod/ditsmod-bun-postgres.dockerfile create mode 100644 frameworks/TypeScript/ditsmod/ditsmod-bun.dockerfile create mode 100644 frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-application.ts create mode 100644 frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-providers.ts create mode 100644 frameworks/TypeScript/ditsmod/src/app/bun-integration/node-res.ts create mode 100644 frameworks/TypeScript/ditsmod/src/app/bun-integration/pre-router.ts create mode 100644 frameworks/TypeScript/ditsmod/src/app/bun-integration/spawn.ts create mode 100644 frameworks/TypeScript/ditsmod/src/main.bun.ts diff --git a/frameworks/TypeScript/ditsmod/benchmark_config.json b/frameworks/TypeScript/ditsmod/benchmark_config.json index 42122a11d69..c16c9419bde 100755 --- a/frameworks/TypeScript/ditsmod/benchmark_config.json +++ b/frameworks/TypeScript/ditsmod/benchmark_config.json @@ -130,6 +130,138 @@ "display_name": "ditsmod [mysql & simplified use of di]", "notes": "Simplified use of Dependency Injection (no request level injector).", "versus": "nodejs" + }, + "bun": { + "dockerfile": "ditsmod-bun.dockerfile", + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "None", + "framework": "Ditsmod", + "language": "TypeScript", + "flavor": "None", + "orm": "None", + "platform": "bun", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "Ditsmod on bun", + "notes": "", + "versus": "bun" + }, + "simplified-di-bun": { + "dockerfile": "ditsmod-bun.dockerfile", + "json_url": "/json2", + "plaintext_url": "/plaintext2", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "None", + "framework": "Ditsmod", + "language": "TypeScript", + "flavor": "None", + "orm": "None", + "platform": "bun", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "ditsmod on bun [simplified use of di]", + "notes": "Simplified use of Dependency Injection (no request level injector).", + "versus": "bun" + }, + "postgres-bun": { + "dockerfile": "ditsmod-bun-postgres.dockerfile", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "cached_query_url": "/cached-queries?count=", + "fortune_url": "/fortunes", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "Ditsmod", + "language": "TypeScript", + "flavor": "None", + "orm": "Raw", + "platform": "bun", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "ditsmod on bun [postgres]", + "notes": "", + "versus": "bun" + }, + "mysql-bun": { + "dockerfile": "ditsmod-bun-mysql.dockerfile", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "cached_query_url": "/cached-queries?count=", + "fortune_url": "/fortunes", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "MySQL", + "framework": "Ditsmod", + "language": "TypeScript", + "flavor": "None", + "orm": "Raw", + "platform": "bun", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "ditsmod on bun [mysql]", + "notes": "", + "versus": "bun" + }, + "postgres2-bun": { + "dockerfile": "ditsmod-bun-postgres.dockerfile", + "db_url": "/db2", + "query_url": "/queries2?queries=", + "update_url": "/updates2?queries=", + "cached_query_url": "/cached-queries2?count=", + "fortune_url": "/fortunes2", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "Ditsmod", + "language": "TypeScript", + "flavor": "None", + "orm": "Raw", + "platform": "bun", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "ditsmod on bun [postgres & simplified use of di]", + "notes": "Simplified use of Dependency Injection (no request level injector).", + "versus": "bun" + }, + "mysql2-bun": { + "dockerfile": "ditsmod-bun-mysql.dockerfile", + "db_url": "/db2", + "query_url": "/queries2?queries=", + "update_url": "/updates2?queries=", + "cached_query_url": "/cached-queries2?count=", + "fortune_url": "/fortunes2", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "MySQL", + "framework": "Ditsmod", + "language": "TypeScript", + "flavor": "None", + "orm": "Raw", + "platform": "bun", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "ditsmod on bun [mysql & simplified use of di]", + "notes": "Simplified use of Dependency Injection (no request level injector).", + "versus": "bun" } } ] diff --git a/frameworks/TypeScript/ditsmod/bun.lockb b/frameworks/TypeScript/ditsmod/bun.lockb new file mode 100755 index 0000000000000000000000000000000000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{D;$3&eg!EPqu=FvI&C$dHN>>=x zDH8eG0jn9oe!ojBa&7@MFEgae0hB7SZ1eWXmyUczz{fUNz@@v*i8e+7pHX97 z?h*-OIzSsWKC>?9>|rKNtlntqm00#kJ=>IE^njB!6VJ8??niU&gxR3(TArQYnOmcQi%82$uvRcezJRFW>XgCyy7>1HE=!D>gg97S;;a26ZbfpL+O zJv;?;Rvc)@4SE4;)Bvr#6(%2x2;s)t0;0k=;tVZ2gX4q1T17U8UdQ%gLl4Rk5d?O| ztt;|JE&$ET47rhwy?TEzZ#za6PbClyxm>UuJ7%9}MMY7OU6v$F;XMzWINYoPhb-Xy z(X(5^(`PU#{-jU4d4toZo4sY+HiTXyz@0cDDbP@8N%8$eeYGSbO3RTP1RYklYzkwc zI5}RoB`@bMZ6YA@>?hX=Vc@d+~HK|!U^!D z7JVGabyjcUtheTJ3^2(8loGyj?2v1U7wY74$^t#nQ9{hl5w-HQvB3SZ^-9ec1#CtQ z>u@LC^2q?3mtkX6l8CdVeE(*V2t5c$bcJ>77GgsekHcI@@-e`Xm$3wQq|Vz%zK<-h zGs4`*rBPeN2#ajmR1YE!_YbDd`e0Rg7WwKFSPOLnYadYgBBY@I+bwJjwMd0k#2byjy y%a!zI_xn5Mn%X+OhlsF{&t>se>!E~LU=#7eIL1T(IGptBAyAR>0rdah|NjN?m@P;E literal 0 HcmV?d00001 diff --git a/frameworks/TypeScript/ditsmod/ditsmod-bun-mysql.dockerfile b/frameworks/TypeScript/ditsmod/ditsmod-bun-mysql.dockerfile new file mode 100644 index 00000000000..c6c56b41443 --- /dev/null +++ b/frameworks/TypeScript/ditsmod/ditsmod-bun-mysql.dockerfile @@ -0,0 +1,17 @@ +FROM oven/bun:1.1 + +COPY ./ ./ + +RUN bun install +RUN bun run build + +ENV NODE_ENV production +ENV IS_BUN true +ENV DATABASE mysql +ENV MYSQL_HOST tfb-database +ENV MYSQL_USER benchmarkdbuser +ENV MYSQL_PSWD benchmarkdbpass +ENV MYSQL_DBNAME hello_world + +EXPOSE 8080 +CMD rm node_modules/@ditsmod/*/tsconfig.json && bun src/app/bun-integration/spawn.ts diff --git a/frameworks/TypeScript/ditsmod/ditsmod-bun-postgres.dockerfile b/frameworks/TypeScript/ditsmod/ditsmod-bun-postgres.dockerfile new file mode 100644 index 00000000000..6d10f0bfc7b --- /dev/null +++ b/frameworks/TypeScript/ditsmod/ditsmod-bun-postgres.dockerfile @@ -0,0 +1,17 @@ +FROM oven/bun:1.1 + +COPY ./ ./ + +RUN bun install +RUN bun run build + +ENV NODE_ENV production +ENV IS_BUN true +ENV DATABASE postgres +ENV PG_HOST tfb-database +ENV PG_USER benchmarkdbuser +ENV PG_PSWD benchmarkdbpass +ENV PG_DBNAME hello_world + +EXPOSE 8080 +CMD rm node_modules/@ditsmod/*/tsconfig.json && bun src/app/bun-integration/spawn.ts diff --git a/frameworks/TypeScript/ditsmod/ditsmod-bun.dockerfile b/frameworks/TypeScript/ditsmod/ditsmod-bun.dockerfile new file mode 100644 index 00000000000..d18c49cab44 --- /dev/null +++ b/frameworks/TypeScript/ditsmod/ditsmod-bun.dockerfile @@ -0,0 +1,12 @@ +FROM oven/bun:1.1 + +COPY ./ ./ + +RUN bun install +RUN bun run build + +ENV NODE_ENV production +ENV IS_BUN true + +EXPOSE 8080 +CMD rm node_modules/@ditsmod/*/tsconfig.json && bun src/app/bun-integration/spawn.ts diff --git a/frameworks/TypeScript/ditsmod/ditsmod-mysql.dockerfile b/frameworks/TypeScript/ditsmod/ditsmod-mysql.dockerfile index 4136e2ae860..95ad40e9ac8 100644 --- a/frameworks/TypeScript/ditsmod/ditsmod-mysql.dockerfile +++ b/frameworks/TypeScript/ditsmod/ditsmod-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM node:18.17.1-slim +FROM node:20.16-slim COPY ./ ./ diff --git a/frameworks/TypeScript/ditsmod/ditsmod-postgres.dockerfile b/frameworks/TypeScript/ditsmod/ditsmod-postgres.dockerfile index 5ef79595757..89ecc3e80a8 100644 --- a/frameworks/TypeScript/ditsmod/ditsmod-postgres.dockerfile +++ b/frameworks/TypeScript/ditsmod/ditsmod-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM node:18.17.1-slim +FROM node:20.16-slim COPY ./ ./ diff --git a/frameworks/TypeScript/ditsmod/ditsmod.dockerfile b/frameworks/TypeScript/ditsmod/ditsmod.dockerfile index 882239148ce..0b21155188a 100644 --- a/frameworks/TypeScript/ditsmod/ditsmod.dockerfile +++ b/frameworks/TypeScript/ditsmod/ditsmod.dockerfile @@ -1,4 +1,4 @@ -FROM node:18.17.1-slim +FROM node:20.16-slim COPY ./ ./ diff --git a/frameworks/TypeScript/ditsmod/package.json b/frameworks/TypeScript/ditsmod/package.json index 962d11cc65f..3d74a7822de 100755 --- a/frameworks/TypeScript/ditsmod/package.json +++ b/frameworks/TypeScript/ditsmod/package.json @@ -19,18 +19,19 @@ "author": "Костя Третяк", "license": "MIT", "dependencies": { - "@ditsmod/core": "~2.51.1", - "@ditsmod/routing": "~2.1.0", + "@ditsmod/core": "~2.54.2", + "@ditsmod/routing": "~2.3.0", "handlebars": "^4.7.8", - "lru-cache": "^10.0.1", - "mariadb": "^3.2.1", - "postgres": "^3.3.5" + "lru-cache": "^11.0.0", + "mariadb": "^3.3.1", + "postgres": "^3.4.4" }, "devDependencies": { "@types/eslint": "^8.44.2", "@types/node": "^20.5.7", "@typescript-eslint/eslint-plugin": "^6.5.0", "@typescript-eslint/parser": "^6.5.0", + "bun-types": "^1.1.22", "eslint": "^8.48.0", "prettier": "^3.0.2", "typescript": "^5.2.2" diff --git a/frameworks/TypeScript/ditsmod/src/app/app.module.ts b/frameworks/TypeScript/ditsmod/src/app/app.module.ts index 4874719f9cc..e0c1dfedcec 100644 --- a/frameworks/TypeScript/ditsmod/src/app/app.module.ts +++ b/frameworks/TypeScript/ditsmod/src/app/app.module.ts @@ -1,8 +1,13 @@ -import { Providers, rootModule } from '@ditsmod/core'; +import { PreRouter, rootModule } from '@ditsmod/core'; + import { SimpleModule } from '#routed/simple/simple.module.js'; +import { BunPreRouter } from './bun-integration/pre-router.js'; +import { BunProviders } from './bun-integration/bun-providers.js'; @rootModule({ appends: [SimpleModule], - providersPerApp: [...new Providers().useLogConfig({ level: 'off' })], + providersPerApp: [ + ...new BunProviders().useLogConfig({ level: 'off' }).if(process.env.IS_BUN).useClass(PreRouter, BunPreRouter), + ], }) export class AppModule {} diff --git a/frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-application.ts b/frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-application.ts new file mode 100644 index 00000000000..0b462db87bb --- /dev/null +++ b/frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-application.ts @@ -0,0 +1,17 @@ +import { AnyFn, AppInitializer, Application } from '@ditsmod/core'; +import { Serve, Server } from 'bun'; + +export class BunApplication extends Application { + protected override createServer(requestListener: any): any { + const serveOptions = this.appOptions.serverOptions as Serve; + serveOptions.fetch ??= (req) => requestListener(req); + return Bun.serve(serveOptions); + } + + protected override async createServerAndBindToListening(appInitializer: AppInitializer, resolve: AnyFn) { + this.flushLogs(); + const server = (await this.createServer(appInitializer.requestListener)) as Server; + this.systemLogMediator.serverListen(this, server.hostname, server.port); + resolve({ server }); + } +} diff --git a/frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-providers.ts b/frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-providers.ts new file mode 100644 index 00000000000..0581973f421 --- /dev/null +++ b/frameworks/TypeScript/ditsmod/src/app/bun-integration/bun-providers.ts @@ -0,0 +1,21 @@ +import { Providers, Class } from '@ditsmod/core'; + +export class BunProviders extends Providers { + protected setCondition?: boolean; + protected ifCondition?: boolean; + + if(condition: any) { + this.setCondition = true; + this.ifCondition = condition; + return this; + } + + override useClass(token: A, useClass: B, multi?: boolean): this { + if (!this.setCondition || this.ifCondition) { + this.pushProvider({ token, useClass }, multi); + } + this.setCondition = undefined; + this.ifCondition = undefined; + return this; + } +} diff --git a/frameworks/TypeScript/ditsmod/src/app/bun-integration/node-res.ts b/frameworks/TypeScript/ditsmod/src/app/bun-integration/node-res.ts new file mode 100644 index 00000000000..7dae8de27a6 --- /dev/null +++ b/frameworks/TypeScript/ditsmod/src/app/bun-integration/node-res.ts @@ -0,0 +1,61 @@ +import { Writable } from 'node:stream'; + +export class NodeRes extends Writable { + #chunks: Buffer[] = []; + #resolve: (body: string) => void; + status: number = 200; + headers = {} as HeadersInit; + body = new Promise((resolve) => (this.#resolve = resolve)); + headersSent?: boolean; + statusText?: string; + + set statusCode(statusCode: number) { + this.status = statusCode; + } + + getHeader(name: string) { + return this.headers[name as keyof HeadersInit]; + } + + getHeaders() { + return this.headers; + } + + setHeader(name: string, value: number | string | readonly string[]) { + this.headers = { ...this.headers, [name]: value } as HeadersInit; + return this; + } + + writeHead(statusCode: number, headers?: HeadersInit): this; + writeHead(statusCode: number, statusMessage: string, headers?: HeadersInit): this; + writeHead(statusCode: number, statusMsgOrHeaders?: string | HeadersInit, headers?: HeadersInit): this { + this.status = statusCode; + if (typeof statusMsgOrHeaders == 'object') { + this.mergeHeaders(statusMsgOrHeaders); + } else { + this.statusText = statusMsgOrHeaders; + this.mergeHeaders(headers); + } + return this; + } + + override _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void { + this.#chunks.push(Buffer.from(chunk)); + callback(); + } + + override _final(callback: (error?: Error | null) => void): void { + const finalData = Buffer.concat(this.#chunks); + this.headersSent = true; + this.#resolve(finalData.toString()); + callback(); + } + + protected mergeHeaders(headers: HeadersInit = {}) { + if (Array.isArray(headers)) { + headers.forEach(([key, val]) => ((this.headers as any)[key] = val)); + } else { + this.headers = { ...this.headers, ...headers }; + } + } +} diff --git a/frameworks/TypeScript/ditsmod/src/app/bun-integration/pre-router.ts b/frameworks/TypeScript/ditsmod/src/app/bun-integration/pre-router.ts new file mode 100644 index 00000000000..26a0100e4e0 --- /dev/null +++ b/frameworks/TypeScript/ditsmod/src/app/bun-integration/pre-router.ts @@ -0,0 +1,26 @@ +import { PreRouter } from '@ditsmod/core'; +import { NodeRes } from './node-res.js'; + +export class BunPreRouter extends PreRouter { + override requestListener: any = async (req: Request) => { + const nodeReq = req as any; + const nodeRes = new NodeRes(); + + const url = new URL(req.url); + const uri = url.pathname; + const queryString = url.search.slice(1); + const { handle, params } = this.router.find(req.method as any, uri); + if (!handle) { + this.sendNotImplemented(nodeRes as any); + const body = await nodeRes.body; + return new Response(body, nodeRes); + } + + await handle(nodeReq, nodeRes as any, params!, queryString).catch((err) => { + this.sendInternalServerError(nodeRes as any, err); + }); + + const body = await nodeRes.body; + return new Response(body, nodeRes); + }; +} diff --git a/frameworks/TypeScript/ditsmod/src/app/bun-integration/spawn.ts b/frameworks/TypeScript/ditsmod/src/app/bun-integration/spawn.ts new file mode 100644 index 00000000000..439451029a4 --- /dev/null +++ b/frameworks/TypeScript/ditsmod/src/app/bun-integration/spawn.ts @@ -0,0 +1,9 @@ +import os from 'node:os'; + +const numCPUs = os.cpus().length; +for (let i = 0; i < numCPUs; i++) { + Bun.spawn(['bun', 'dist/main.bun.js'], { + stdio: ['inherit', 'inherit', 'inherit'], + env: { ...process.env }, + }); +} diff --git a/frameworks/TypeScript/ditsmod/src/main.bun.ts b/frameworks/TypeScript/ditsmod/src/main.bun.ts new file mode 100644 index 00000000000..42c0798a066 --- /dev/null +++ b/frameworks/TypeScript/ditsmod/src/main.bun.ts @@ -0,0 +1,12 @@ +import { Serve, Server } from 'bun'; + +import { AppModule } from './app/app.module.js'; +import { BunApplication } from './app/bun-integration/bun-application.js'; + +const reusePort = process.env.NODE_ENV == 'production'; +const serverOptions = { port: 8080, hostname: '0.0.0.0', reusePort } as Serve; +const { server } = await new BunApplication().bootstrap(AppModule, { + serverOptions: serverOptions as any, +}); + +const bunServer = server as unknown as Server; diff --git a/frameworks/TypeScript/ditsmod/tsconfig.json b/frameworks/TypeScript/ditsmod/tsconfig.json index 27c048aa781..ef1b58e6cb3 100644 --- a/frameworks/TypeScript/ditsmod/tsconfig.json +++ b/frameworks/TypeScript/ditsmod/tsconfig.json @@ -16,14 +16,17 @@ "noImplicitAny": true, "strictPropertyInitialization": false, "allowJs": false, - "paths": { - "#routed/*": ["./src/app/modules/routed/*"], - "#service/*": ["./src/app/modules/service/*"], - "#utils/*": ["./src/app/utils/*"], - } + "types": ["bun-types"], + // Bun works with bugs if this code is uncommented. + // "paths": { + // "#routed/*": ["./src/app/modules/routed/*"], + // "#service/*": ["./src/app/modules/service/*"], + // "#utils/*": ["./src/app/utils/*"], + // } }, "include": [ "src", - "test" + "test", + "./spawn.ts" ] } From b976fe8bccb062d06819a6f59440c6427e4d6859 Mon Sep 17 00:00:00 2001 From: Daniil Zotov <142039751+zoto-ff@users.noreply.github.com> Date: Wed, 14 Aug 2024 18:35:52 +0300 Subject: [PATCH 21/22] Update Elysia (#9212) * fix spawn.ts, update bun * update elysia, refactor /json and /plaintext * refactor db handlers * use bun build --compile --- frameworks/TypeScript/elysia/bun.lockb | Bin 4971 -> 4963 bytes .../elysia/elysia-postgres.dockerfile | 2 +- .../elysia/elysia-smol-postgres.dockerfile | 2 +- .../TypeScript/elysia/elysia.dockerfile | 2 +- frameworks/TypeScript/elysia/package.json | 11 +- frameworks/TypeScript/elysia/spawn.ts | 18 ++- .../TypeScript/elysia/src/db-handlers.ts | 118 +++++++++--------- frameworks/TypeScript/elysia/src/index.ts | 22 ++-- frameworks/TypeScript/elysia/src/postgres.ts | 12 +- frameworks/TypeScript/elysia/src/types.ts | 16 +-- 10 files changed, 105 insertions(+), 98 deletions(-) diff --git a/frameworks/TypeScript/elysia/bun.lockb b/frameworks/TypeScript/elysia/bun.lockb index a5f94fd2531601ff54fa87839a0663d66f7b3a7e..7e29924798c25d30517bcca2ed92c9934b0540fa 100755 GIT binary patch literal 4963 zcmeHKdsGuw8lTWmF>Rq()LkDX(5kDL$qORo5qVU*Ro553iXy}?34ub)`0U%Ue-ND`(HsR$N?JW$p|e(KrMqfjsS0gvW2Ro$oKf69~$b z$ z^`OCsJ$lzqw_C%T-|$y;mtB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$vEdvH=St86 zRAMm64e|V&bJUo4t)v&XL>jz^X4VQ3(-tcoa5nK%r=kB0>T66 zKoU9KKe8B7pG(r>m-1MWHmGzdEKM1-2}0QeXGc4n%`$2m)3F}!z4X>%Zjoeze9tMsJaNYP-G(L@?lCdzKG&1yAG znOM7z?0y-*oCg3f=|M#lDVD=;;HC7N8Q}fuB75WvLg82iz#V1q3B=%rqrZ8}%lm0lYhaXC8~eGd+qArbNaM?6-dV3T*xA;Q7HB>=yz+ z?FDccLJd6Ye}osnxj+Lvx@V#hgIZ-!L7>Z}a)nGPjZT#*r80$V06#en3-CG0Ha|p) O9!-X(v7P6q@bBNZz1cbd diff --git a/frameworks/TypeScript/elysia/elysia-postgres.dockerfile b/frameworks/TypeScript/elysia/elysia-postgres.dockerfile index e3fda732c79..40ff868c528 100644 --- a/frameworks/TypeScript/elysia/elysia-postgres.dockerfile +++ b/frameworks/TypeScript/elysia/elysia-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM oven/bun:1.0 +FROM oven/bun:1.1 EXPOSE 8080 diff --git a/frameworks/TypeScript/elysia/elysia-smol-postgres.dockerfile b/frameworks/TypeScript/elysia/elysia-smol-postgres.dockerfile index c222841c81a..de7b9d63bb0 100644 --- a/frameworks/TypeScript/elysia/elysia-smol-postgres.dockerfile +++ b/frameworks/TypeScript/elysia/elysia-smol-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM oven/bun:1.0 +FROM oven/bun:1.1 EXPOSE 8080 diff --git a/frameworks/TypeScript/elysia/elysia.dockerfile b/frameworks/TypeScript/elysia/elysia.dockerfile index c05d3f41878..3ed07652df1 100644 --- a/frameworks/TypeScript/elysia/elysia.dockerfile +++ b/frameworks/TypeScript/elysia/elysia.dockerfile @@ -1,4 +1,4 @@ -FROM oven/bun:1.0 +FROM oven/bun:1.1 EXPOSE 8080 diff --git a/frameworks/TypeScript/elysia/package.json b/frameworks/TypeScript/elysia/package.json index 082042b5f55..ba38bf05ee6 100644 --- a/frameworks/TypeScript/elysia/package.json +++ b/frameworks/TypeScript/elysia/package.json @@ -3,15 +3,16 @@ "version": "0.0.1", "module": "src/index.js", "devDependencies": { - "bun-types": "latest" + "bun-types": "^1.1.23", + "typescript": "^5.5.4" }, "scripts": { "dev": "bun run --watch src/index.ts", "start": "bun run src/index.ts", - "build": "bun build --target=bun --minify src/index.ts --outdir=build" + "build": "bun build --compile --minify --outfile server src/index.ts" }, "dependencies": { - "elysia": "^0.7.17", - "postgres": "^3.4.1" + "elysia": "^1.1.6", + "postgres": "^3.4.4" } -} +} \ No newline at end of file diff --git a/frameworks/TypeScript/elysia/spawn.ts b/frameworks/TypeScript/elysia/spawn.ts index ae02e7169a7..3bf8959c230 100644 --- a/frameworks/TypeScript/elysia/spawn.ts +++ b/frameworks/TypeScript/elysia/spawn.ts @@ -1,10 +1,18 @@ -import os from 'node:os'; +const cpus = navigator.hardwareConcurrency; +const buns = new Array(cpus); -// @ts-ignore -const numCPUs = os.availableParallelism(); -for (let i = 0; i < numCPUs; i++) { - Bun.spawn(['bun', 'build/index.js'], { +for (let i = 0; i < cpus; i++) { + buns[i] = Bun.spawn(['./server'], { stdio: ['inherit', 'inherit', 'inherit'], env: { ...process.env }, }); } + +function kill() { + for (const bun of buns) { + bun.kill(); + } +} + +process.on('SIGINT', kill); +process.on('exit', kill); \ No newline at end of file diff --git a/frameworks/TypeScript/elysia/src/db-handlers.ts b/frameworks/TypeScript/elysia/src/db-handlers.ts index 0e099d6d8b6..d75e91ff1a5 100644 --- a/frameworks/TypeScript/elysia/src/db-handlers.ts +++ b/frameworks/TypeScript/elysia/src/db-handlers.ts @@ -1,83 +1,77 @@ import Elysia from 'elysia'; -import * as postgres from './postgres'; -import { Fortune, World } from './types'; +import * as db from './postgres'; +import { Fortune } from './types'; -const deps = new Elysia({ - name: 'deps', -}) - .decorate('db', postgres) - .decorate('generateRandomNumber', () => Math.ceil(Math.random() * 10000)) - .decorate('html', (fortunes: Fortune[]) => { - const n = fortunes.length; - - let html = ''; - for (let i = 0; i < n; i++) { - html += `${fortunes[i].id}${Bun.escapeHTML( - fortunes[i].message - )}`; - } +function rand () { + return Math.ceil(Math.random() * 10000) +} - return `Fortunes${html}
idmessage
`; - }); +function parseQueriesNumber (q?: string) { + return Math.min(parseInt(q || '1') || 1, 500) +} + +function renderTemplate (fortunes: Fortune[]) { + const n = fortunes.length; + + let html = ''; + for (let i = 0; i < n; i++) { + html += `${fortunes[i].id}${Bun.escapeHTML( + fortunes[i].message + )}`; + } + + return `Fortunes${html}
idmessage
`; +} const dbHandlers = new Elysia({ name: 'db-handlers', }) - .use(deps) - .get( - '/db', - async ({ db, generateRandomNumber }) => - await db.find(generateRandomNumber()) - ) - .get( - '/fortunes', - async ({ db, html }) => { - const fortunes = await db.fortunes(); - - fortunes.push({ - id: 0, - message: 'Additional fortune added at request time.', - }); - - fortunes.sort((a, b) => (a.message < b.message ? -1 : 1)); - - return html(fortunes); - }, - { - afterHandle({ set }) { - set.headers['content-type'] = 'text/html; charset=utf-8'; - }, - } - ) - .derive(({ query }) => ({ - numberOfObjects: Math.min(parseInt(query.queries || '1') || 1, 500), - })) - .get('/queries', async ({ db, generateRandomNumber, numberOfObjects }) => { - const worldPromises = new Array>(numberOfObjects); - - for (let i = 0; i < numberOfObjects; i++) { - worldPromises[i] = db.find(generateRandomNumber()); - } + .onAfterHandle(({ set }) => { + set.headers['server'] = 'Elysia'; + }) - const worlds = await Promise.all(worldPromises); + .get('/db', () => db.find(rand())) - return worlds; + .get('/fortunes', async ({ set }) => { + const fortunes = await db.fortunes(); + + fortunes.push({ + id: 0, + message: 'Additional fortune added at request time.', + }); + + fortunes.sort((a, b) => (a.message < b.message ? -1 : 1)); + + set.headers['content-type'] = 'text/html; charset=utf-8'; + return renderTemplate(fortunes); + }) + + .get('/queries', async ({ query }) => { + const num = parseQueriesNumber(query.queries) + const worldPromises = new Array(num); + + for (let i = 0; i < num; i++) { + worldPromises[i] = db.find(rand()); + } + + return await Promise.all(worldPromises); }) - .get('/updates', async ({ db, generateRandomNumber, numberOfObjects }) => { - const worldPromises = new Array>(numberOfObjects); - for (let i = 0; i < numberOfObjects; i++) { - worldPromises[i] = db.find(generateRandomNumber()); + .get('/updates', async ({ query }) => { + const num = parseQueriesNumber(query.queries) + const worldPromises = new Array(num); + + for (let i = 0; i < num; i++) { + worldPromises[i] = db.find(rand()); } const worlds = await Promise.all(worldPromises); - for (let i = 0; i < numberOfObjects; i++) { - worlds[i].randomNumber = generateRandomNumber(); + for (let i = 0; i < num; i++) { + worlds[i].randomNumber = rand(); } await db.bulkUpdate(worlds); - return worlds; }); diff --git a/frameworks/TypeScript/elysia/src/index.ts b/frameworks/TypeScript/elysia/src/index.ts index dc0f0c8d20f..af24275c128 100644 --- a/frameworks/TypeScript/elysia/src/index.ts +++ b/frameworks/TypeScript/elysia/src/index.ts @@ -3,23 +3,27 @@ import dbHandlers from './db-handlers'; const app = new Elysia({ serve: { - // @ts-ignore reusePort: true, }, }) - .onAfterHandle(({ set }) => { + .get('/plaintext', ({ set }) => { set.headers['server'] = 'Elysia'; + return 'Hello, World!'; }) - .decorate('HELLO_WORLD_STR', 'Hello, World!') - .get('/plaintext', ({ HELLO_WORLD_STR }) => HELLO_WORLD_STR) - .get('/json', ({ HELLO_WORLD_STR }) => ({ message: HELLO_WORLD_STR })); -if (process.env.DATABASE) { + .get('/json', ({ set }) => { + set.headers = { + 'content-type': 'application/json', + 'server': 'Elysia', + }; + + return JSON.stringify({ message: 'Hello, World!' }); + }); + +if (Bun.env.DATABASE) { app.use(dbHandlers); } app.listen(8080); -console.info( - `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}` -); +console.info(`🦊 Elysia is running at ${app.server!.url}`); diff --git a/frameworks/TypeScript/elysia/src/postgres.ts b/frameworks/TypeScript/elysia/src/postgres.ts index ae101fc0867..5c9ba1dbcbe 100644 --- a/frameworks/TypeScript/elysia/src/postgres.ts +++ b/frameworks/TypeScript/elysia/src/postgres.ts @@ -9,16 +9,16 @@ const sql = postgres({ max: 1, }); -export const fortunes = async () => - await sql`SELECT id, message FROM fortune`; +export const fortunes = () => + sql`SELECT id, message FROM fortune`; -export const find = async (id: number) => - await sql`SELECT id, randomNumber FROM world WHERE id = ${id}`.then( +export const find = (id: number) => + sql`SELECT id, randomNumber FROM world WHERE id = ${id}`.then( (arr) => arr[0] ); -export const bulkUpdate = async (worlds: World[]) => - await sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int +export const bulkUpdate = (worlds: World[]) => + sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int FROM (VALUES ${sql( worlds .map((world) => [world.id, world.randomNumber]) diff --git a/frameworks/TypeScript/elysia/src/types.ts b/frameworks/TypeScript/elysia/src/types.ts index a40a9a0c7b2..6863ea8f4aa 100644 --- a/frameworks/TypeScript/elysia/src/types.ts +++ b/frameworks/TypeScript/elysia/src/types.ts @@ -1,9 +1,9 @@ -export type Fortune = { - id: number; - message: string; -}; +export interface Fortune { + id: number + message: string +} -export type World = { - id: number; - randomNumber: number; -}; +export interface World { + id: number + randomNumber: number +} From b669efdbd0df11fe54e0551294f4fc03e5ea9c96 Mon Sep 17 00:00:00 2001 From: Petrik de Heus Date: Wed, 14 Aug 2024 17:36:05 +0200 Subject: [PATCH 22/22] [ruby/sinatra-sequel] Use erb for templates (#8990) erb templates have better performance than slim templates. This also makes it more inline with the Ruby/sinatra tests, which also use erb. --- frameworks/Ruby/sinatra-sequel/Gemfile | 1 - frameworks/Ruby/sinatra-sequel/hello_world.rb | 5 +---- frameworks/Ruby/sinatra-sequel/views/fortunes.erb | 12 ++++++++++++ frameworks/Ruby/sinatra-sequel/views/fortunes.slim | 8 -------- frameworks/Ruby/sinatra-sequel/views/layout.erb | 11 +++++++++++ frameworks/Ruby/sinatra-sequel/views/layout.slim | 6 ------ 6 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 frameworks/Ruby/sinatra-sequel/views/fortunes.erb delete mode 100644 frameworks/Ruby/sinatra-sequel/views/fortunes.slim create mode 100644 frameworks/Ruby/sinatra-sequel/views/layout.erb delete mode 100644 frameworks/Ruby/sinatra-sequel/views/layout.slim diff --git a/frameworks/Ruby/sinatra-sequel/Gemfile b/frameworks/Ruby/sinatra-sequel/Gemfile index 649fbcfe6bf..f4ac3eb1fe2 100644 --- a/frameworks/Ruby/sinatra-sequel/Gemfile +++ b/frameworks/Ruby/sinatra-sequel/Gemfile @@ -5,7 +5,6 @@ gem 'passenger', '~> 6.0', :platforms=>[:ruby, :mswin], :require=>false gem 'puma', '~> 6.4', :require=>false gem 'sequel', '~> 5.0' gem 'sinatra', '~> 3.0', :require=>'sinatra/base' -gem 'slim', '~> 3.0' gem 'unicorn', '~> 6.1', :platforms=>[:ruby, :mswin], :require=>false group :mysql do diff --git a/frameworks/Ruby/sinatra-sequel/hello_world.rb b/frameworks/Ruby/sinatra-sequel/hello_world.rb index e04d76a077b..822ceb5979c 100644 --- a/frameworks/Ruby/sinatra-sequel/hello_world.rb +++ b/frameworks/Ruby/sinatra-sequel/hello_world.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -# Configure Slim templating engine -Slim::Engine.set_options :format=>:html, :sort_attrs=>false - # Our Rack application to be executed by rackup class HelloWorld < Sinatra::Base configure do @@ -73,7 +70,7 @@ def rand1 ) @fortunes.sort_by!(&:message) - slim :fortunes + erb :fortunes, :layout=>true end # Test type 5: Database updates diff --git a/frameworks/Ruby/sinatra-sequel/views/fortunes.erb b/frameworks/Ruby/sinatra-sequel/views/fortunes.erb new file mode 100644 index 00000000000..3d27f4dc50f --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/views/fortunes.erb @@ -0,0 +1,12 @@ + + + + + +<% @fortunes.each do |fortune| %> + + + + +<% end %> +
idmessage
<%= fortune.id %><%= Rack::Utils.escape_html(fortune.message) %>
diff --git a/frameworks/Ruby/sinatra-sequel/views/fortunes.slim b/frameworks/Ruby/sinatra-sequel/views/fortunes.slim deleted file mode 100644 index 14c18a58bc7..00000000000 --- a/frameworks/Ruby/sinatra-sequel/views/fortunes.slim +++ /dev/null @@ -1,8 +0,0 @@ -table - tr - th id - th message - - for fortune in @fortunes - tr - td =fortune.id - td =fortune.message \ No newline at end of file diff --git a/frameworks/Ruby/sinatra-sequel/views/layout.erb b/frameworks/Ruby/sinatra-sequel/views/layout.erb new file mode 100644 index 00000000000..7d6715a3e98 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/views/layout.erb @@ -0,0 +1,11 @@ + + + + Fortunes + + + +<%= yield %> + + + diff --git a/frameworks/Ruby/sinatra-sequel/views/layout.slim b/frameworks/Ruby/sinatra-sequel/views/layout.slim deleted file mode 100644 index 2be47605c04..00000000000 --- a/frameworks/Ruby/sinatra-sequel/views/layout.slim +++ /dev/null @@ -1,6 +0,0 @@ -doctype html -html - head - title Fortunes - body - == yield \ No newline at end of file