Skip to content
Merged

aa #49

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
15e5ef2
Bump rack from 3.1.11 to 3.1.16 in /frameworks/Ruby/rack-sequel
dependabot[bot] Jun 5, 2025
6d87e55
Merge pull request #9929 from TechEmpower/dependabot/bundler/framewor…
github-actions[bot] Jun 5, 2025
a1b5e6e
upgrade feat (#9925)
smthing Jun 6, 2025
d84235d
Bump com.fasterxml.jackson.core:jackson-core
dependabot[bot] Jun 7, 2025
37dd817
Merge pull request #9934 from TechEmpower/dependabot/maven/frameworks…
github-actions[bot] Jun 7, 2025
f02224f
[php] Fix Phalcon and update with PHP/8.4 (#9937)
joanhey Jun 9, 2025
9e334c5
[Python/Blacksheep] Adjust the number of single-process database conn…
bymoye Jun 9, 2025
99c3e0c
[aiohttp] - lower connection pool value (#9935)
Reskov Jun 9, 2025
a1ca18a
upgrade to tio-boot v1.9.8 (#9933)
litongjava Jun 9, 2025
d6fc514
[aiohttp] - use batch updates (#9932)
Reskov Jun 9, 2025
25f66f1
Bump com.fasterxml.jackson.core:jackson-core
dependabot[bot] Jun 9, 2025
a56307a
Upgrade hyperlane (#9923)
eastspire Jun 9, 2025
568f4f8
Merge pull request #9939 from TechEmpower/dependabot/maven/frameworks…
github-actions[bot] Jun 9, 2025
f3000dd
Bump org.postgresql:postgresql in /frameworks/Java/jooby
dependabot[bot] Jun 11, 2025
193929c
Merge pull request #9945 from TechEmpower/dependabot/maven/frameworks…
github-actions[bot] Jun 11, 2025
9f8a58e
Bump org.postgresql:postgresql in /frameworks/Java/solon
dependabot[bot] Jun 11, 2025
1eb7e82
Merge pull request #9946 from TechEmpower/dependabot/maven/frameworks…
github-actions[bot] Jun 11, 2025
16ee4d6
Bump requests from 2.32.0 to 2.32.4 in /frameworks/Python/api_hour (#…
dependabot[bot] Jun 11, 2025
8da5eeb
[php] OpenSwoole update to PHP/8.4 (#9943)
joanhey Jun 11, 2025
d64e84d
Upgrade hyperlane (#9941)
eastspire Jun 11, 2025
4db9e4f
Update httpserver (#9930)
ruroru Jun 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frameworks/Java/activeweb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.9</version>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
6 changes: 3 additions & 3 deletions frameworks/Java/httpserver/httpserver-postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM maven:3.6.1-jdk-11-slim as maven
FROM maven:3-eclipse-temurin-24-alpine as maven
WORKDIR /httpserver
COPY pom.xml pom.xml
COPY src src
RUN mvn compile assembly:single -q

FROM openjdk:11.0.3-jdk-slim
FROM openjdk:25-jdk-slim
WORKDIR /httpserver
COPY --from=maven /httpserver/target/httpserver-1.0-jar-with-dependencies.jar app.jar

EXPOSE 8080

CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AggressiveOpts", "-jar", "app.jar", "postgres"]
CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-jar", "app.jar", "postgres"]
6 changes: 3 additions & 3 deletions frameworks/Java/httpserver/httpserver.dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM maven:3.6.1-jdk-11-slim as maven
FROM maven:3-eclipse-temurin-24-alpine as maven
WORKDIR /httpserver
COPY pom.xml pom.xml
COPY src src
RUN mvn compile assembly:single -q

FROM openjdk:11.0.3-jdk-slim
FROM openjdk:25-jdk-slim
WORKDIR /httpserver
COPY --from=maven /httpserver/target/httpserver-1.0-jar-with-dependencies.jar app.jar

EXPOSE 8080

CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AggressiveOpts", "-jar", "app.jar"]
CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-jar", "app.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public static void main(String[] args) throws Exception {
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "DEBUG");
// create server
HttpServer server = HttpServer.create(new InetSocketAddress(port), 1024 * 8);
server.setExecutor(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()));
server.setExecutor(Executors.newVirtualThreadPerTaskExecutor());
// add context handlers
server.createContext("/plaintext", createPlaintextHandler());
server.createContext("/json", createJSONHandler());
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Java/jooby/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<jooby.version>3.4.0</jooby.version>
<netty.version>4.1.113.Final</netty.version>
<dsl-json.version>2.0.2</dsl-json.version>
<postgresql.version>42.7.4</postgresql.version>
<postgresql.version>42.7.7</postgresql.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>22</maven.compiler.source>
<maven.compiler.target>22</maven.compiler.target>
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Java/ninja-standalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.9</version>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
Expand Down
12 changes: 6 additions & 6 deletions frameworks/Java/smart-socket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<dependency>
<groupId>tech.smartboot.feat</groupId>
<artifactId>feat-cloud-starter</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>io.github.smartboot.socket</groupId>
<artifactId>aio-pro</artifactId>
<version>1.5.62-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.github.smartboot.socket</groupId>-->
<!-- <artifactId>aio-pro</artifactId>-->
<!-- <version>1.5.62-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>tech.smartboot.servlet</groupId>
<artifactId>servlet-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Java/solon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.4</version>
<version>42.7.7</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion frameworks/Java/tio-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<tio-boot.version>1.9.7</tio-boot.version>
<tio-boot.version>1.9.8</tio-boot.version>


<main.class>com.litongjava.tio.http.server.MainApp</main.class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import com.litongjava.tio.http.server.config.EhCachePluginConfig;
import com.litongjava.tio.http.server.config.EnjoyEngineConfig;
import com.litongjava.tio.http.server.config.MysqlDbConfig;
import com.litongjava.tio.http.server.controller.CacheHandler;
import com.litongjava.tio.http.server.controller.DbHandler;
import com.litongjava.tio.http.server.controller.IndexHandler;
import com.litongjava.tio.http.server.handler.CacheHandler;
import com.litongjava.tio.http.server.handler.DbHandler;
import com.litongjava.tio.http.server.handler.IndexHandler;
import com.litongjava.tio.http.server.router.HttpRequestRouter;
import com.litongjava.tio.utils.environment.EnvUtils;

Expand Down Expand Up @@ -38,7 +38,6 @@ public void config() throws Exception {
TioBootServer server = TioBootServer.me();
HttpRequestRouter requestRouter = server.getRequestRouter();
if (requestRouter != null) {
requestRouter.add("/", controller::index);
requestRouter.add("/plaintext", controller::plaintext);
requestRouter.add("/json", controller::json);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.litongjava.tio.http.server.controller;
package com.litongjava.tio.http.server.handler;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.litongjava.tio.http.server.controller;
package com.litongjava.tio.http.server.handler;

import java.util.ArrayList;
import java.util.Comparator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
package com.litongjava.tio.http.server.controller;
package com.litongjava.tio.http.server.handler;

import com.alibaba.fastjson2.JSON;
import com.litongjava.tio.boot.http.TioRequestContext;
import com.litongjava.tio.http.common.HeaderName;
import com.litongjava.tio.http.common.HeaderValue;
import com.litongjava.tio.http.common.HttpRequest;
import com.litongjava.tio.http.common.HttpResponse;
import com.litongjava.tio.http.common.utils.MimeTypeUtils;
import com.litongjava.tio.http.server.model.Message;
import com.litongjava.tio.http.server.util.Resps;

/**
* ab -k -n1000000 -c10 http://127.0.0.1:8080/json
* ab -k -n1000000 -c10 http://127.0.0.1:8080/plaintext
*/
public class IndexHandler {
private static final String HELLO_WORLD_RN = "Hello, World!\r\n";

private static final String HELLO_WORLD = "Hello, World!";

private static final byte[] HELLO_WORLD_BYTES = HELLO_WORLD.getBytes();

public HttpResponse index(HttpRequest request) {
return Resps.txt(request, "tio-boot");
}
private static final byte[] HELLO_WORLD_BYTES = HELLO_WORLD_RN.getBytes();
private static byte[] JSON_BYTES = JSON.toJSONBytes(new Message(HELLO_WORLD));

public HttpResponse plaintext(HttpRequest request) {
HttpResponse response = TioRequestContext.getResponse();
response.setBody(HELLO_WORLD_BYTES);
response.addHeader(HeaderName.Content_Type, HeaderValue.Content_Type.TEXT_PLAIN_TXT);
String mimeTypeStr = MimeTypeUtils.getTextUTF8();
response.setContentType(mimeTypeStr);
return response;
}

public HttpResponse json(HttpRequest request) {
HttpResponse response = TioRequestContext.getResponse();
response.setBody(JSON.toJSONBytes(new Message(HELLO_WORLD)));
response.addHeader(HeaderName.Content_Type, HeaderValue.Content_Type.TEXT_PLAIN_JSON);
response.setBody(JSON_BYTES);
String mimeTypeStr = MimeTypeUtils.getJsonUTF8();
response.setContentType(mimeTypeStr);
return response;
}
}
4 changes: 3 additions & 1 deletion frameworks/Java/tio-boot/src/main/resources/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ server.port=8080

JDBC_URL=jdbc:mysql://tfb-database/hello_world
JDBC_USER=benchmarkdbuser
JDBC_PSWD=benchmarkdbpass
JDBC_PSWD=benchmarkdbpass

#--tio.core.diagnostic=true --server.http.request.printPacket=true
2 changes: 1 addition & 1 deletion frameworks/PHP/openswoole/openswoole-no-async.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.3-cli
FROM php:8.4-cli

RUN apt-get update && apt-get install -y git > /dev/null

Expand Down
2 changes: 1 addition & 1 deletion frameworks/PHP/openswoole/openswoole.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.3-cli
FROM php:8.4-cli

RUN apt-get update && apt-get install -y git > /dev/null

Expand Down
16 changes: 8 additions & 8 deletions frameworks/PHP/phalcon/phalcon-micro.dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
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 -y php-pear php8.3-dev > /dev/null
RUN mkdir -p /etc/php/8.3/fpm/conf.d
RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.3/fpm/conf.d/phalcon.ini
RUN apt-get install -y php-pear php8.4-dev > /dev/null
RUN mkdir -p /etc/php/8.4/fpm/conf.d
RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.4/fpm/conf.d/phalcon.ini

RUN apt-get install -yqq nginx git unzip \
php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml > /dev/null
php8.4-cli php8.4-fpm php8.4-mysql php8.4-mbstring php8.4-xml > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

COPY deploy/conf/* /etc/php/8.3/fpm/
COPY deploy/conf/* /etc/php/8.4/fpm/

ADD ./ /phalcon
WORKDIR /phalcon

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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --ignore-platform-reqs

Expand All @@ -30,5 +30,5 @@ RUN chmod -R 777 app

EXPOSE 8080

CMD service php8.3-fpm start && \
CMD service php8.4-fpm start && \
nginx -c /phalcon/deploy/nginx.conf
16 changes: 8 additions & 8 deletions frameworks/PHP/phalcon/phalcon-mongodb.dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
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 -y php-pear php8.3-dev > /dev/null
RUN mkdir -p /etc/php/8.3/fpm/conf.d
RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.3/fpm/conf.d/phalcon.ini
RUN apt-get install -y php-pear php8.4-dev > /dev/null
RUN mkdir -p /etc/php/8.4/fpm/conf.d
RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.4/fpm/conf.d/phalcon.ini

RUN apt-get install -yqq nginx git unzip \
php8.3-cli php8.3-fpm php8.3-mbstring php8.3-xml php8.3-mongodb > /dev/null
php8.4-cli php8.4-fpm php8.4-mbstring php8.4-xml php8.4-mongodb > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

COPY deploy/conf/* /etc/php/8.3/fpm/
COPY deploy/conf/* /etc/php/8.4/fpm/

ADD ./ /phalcon
WORKDIR /phalcon

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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet --ignore-platform-reqs

Expand All @@ -30,5 +30,5 @@ RUN chmod -R 777 app

EXPOSE 8080

CMD service php8.3-fpm start && \
CMD service php8.4-fpm start && \
nginx -c /phalcon/deploy/nginx.conf
16 changes: 8 additions & 8 deletions frameworks/PHP/phalcon/phalcon.dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
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 -y php-pear php8.3-dev > /dev/null
RUN mkdir -p /etc/php/8.3/fpm/conf.d
RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.3/fpm/conf.d/phalcon.ini
RUN apt-get install -y php-pear php8.4-dev > /dev/null
RUN mkdir -p /etc/php/8.4/fpm/conf.d
RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.4/fpm/conf.d/phalcon.ini

RUN apt-get install -yqq nginx git unzip \
php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml > /dev/null
php8.4-cli php8.4-fpm php8.4-mysql php8.4-mbstring php8.4-xml > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

COPY deploy/conf/* /etc/php/8.3/fpm/
COPY deploy/conf/* /etc/php/8.4/fpm/

ADD ./ /phalcon
WORKDIR /phalcon

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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --ignore-platform-reqs

RUN chmod -R 777 app

EXPOSE 8080

CMD service php8.3-fpm start && \
CMD service php8.4-fpm start && \
nginx -c /phalcon/deploy/nginx.conf
9 changes: 5 additions & 4 deletions frameworks/Python/aiohttp/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ def pg_dsn(dialect=None) -> str:
async def db_ctx(app: web.Application):
# number of gunicorn workers = multiprocessing.cpu_count() as per gunicorn_conf.py
# max_connections = 2000 as per toolset/setup/linux/databases/postgresql/postgresql.conf:64
# give 10% leeway
max_size = min(1800 / multiprocessing.cpu_count(), 160)
max_size = max(int(max_size), 1)
min_size = max(int(max_size / 2), 1)
# since the world table contains only 10,000 rows, a large connection pool is unnecessary
# the server hardware provides 56 CPU cores producing high concurrency
# https://wiki.postgresql.org/wiki/Number_Of_Database_Connections
max_size = 2
min_size = 2
print(f'connection pool: min size: {min_size}, max size: {max_size}, orm: {CONNECTION_ORM}')
if CONNECTION_ORM:
dsn = pg_dsn('asyncpg')
Expand Down
14 changes: 10 additions & 4 deletions frameworks/Python/aiohttp/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def json_response(payload):
READ_SELECT_ORM = select(World.randomnumber).where(World.id == bindparam("id"))
READ_FORTUNES_ORM = select(Fortune.id, Fortune.message)
WRITE_ROW_SQL = 'UPDATE "world" SET "randomnumber"=$2 WHERE id=$1'
WRITE_ROW_BATCH_SQL = 'UPDATE "world" w SET "randomnumber"=u.new_val FROM (SELECT unnest($1::int[]) as id, unnest($2::int[]) as new_val) u WHERE w.id = u.id'

template_path = Path(__file__).parent / 'templates' / 'fortune.jinja'
template = jinja2.Template(template_path.read_text())
Expand Down Expand Up @@ -155,15 +156,20 @@ async def updates_raw(request):
num_queries = get_num_queries(request)
update_ids = sample(range(1, 10001), num_queries)
update_ids.sort()
fetch_params = tuple((i, ) for i in update_ids)
updates = tuple(zip(update_ids, sample(range(1, 10001), num_queries)))
worlds = [{'id': row_id, 'randomNumber': number} for row_id, number in updates]

numbers = sample(range(1, 10001), num_queries)
fetch_params = [(i,) for i in update_ids]
row_updates = [*zip(update_ids, numbers)]

async with request.app['pg'].acquire() as conn:
# the result of this is the int previous random number which we don't actually use
await conn.executemany(READ_ROW_SQL, fetch_params)
await conn.executemany(WRITE_ROW_SQL, updates)
if num_queries <= 5:
await conn.executemany(WRITE_ROW_SQL, row_updates)
else:
await conn.execute(WRITE_ROW_BATCH_SQL, update_ids, numbers)

worlds = [{'id': row_id, 'randomNumber': number} for row_id, number in row_updates]
return json_response(worlds)


Expand Down
2 changes: 1 addition & 1 deletion frameworks/Python/api_hour/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MarkupSafe==0.23
piprot==0.9.1
psycopg2==2.7.5
PyYAML==5.4
requests==2.32.0
requests==2.32.4
requests-futures==0.9.5
setproctitle==1.1.8
ujson==1.33
Expand Down
Loading
Loading