Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions frameworks/vertx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /app
COPY pom.xml .
RUN mvn dependency:go-offline -q
COPY src ./src
RUN mvn package -DskipTests -q

FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /app/target/vertx-httparena-1.0.0.jar /app/app.jar
EXPOSE 8080 8443
ENTRYPOINT ["java", \
"-server", \
"-XX:+UseParallelGC", \
"-XX:+UseNUMA", \
"-XX:-StackTraceInThrowable", \
"-Dio.netty.buffer.checkBounds=false", \
"-Dio.netty.buffer.checkAccessible=false", \
"-Dvertx.disableURIValidation=true", \
"-Dvertx.disableHttpHeadersValidation=true", \
"-Dvertx.disableMetrics=true", \
"-Dvertx.disableH2c=true", \
"-Dvertx.disableWebsockets=true", \
"-Dvertx.threadChecks=false", \
"-Dvertx.disableContextTimings=true", \
"-jar", "app.jar"]
22 changes: 22 additions & 0 deletions frameworks/vertx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Vert.x — HttpArena

[Eclipse Vert.x](https://github.com/eclipse-vertx/vert.x) is a reactive toolkit for building high-performance applications on the JVM. Unlike traditional frameworks (Spring, Quarkus), Vert.x uses an event-loop threading model directly on Netty — no annotation scanning, no dependency injection, no framework overhead.

## Key Details

- **Vert.x 4.5.14** (latest stable) with vertx-web for routing
- **Event-loop architecture**: one verticle instance per CPU core, each on its own event loop
- **JDK 21** with ParallelGC
- **Jackson** for JSON serialization
- **SQLite** via JDBC (executed on worker threads via `executeBlocking()` to avoid blocking event loops)
- **Pre-computed** JSON and gzip responses at startup
- **Netty native transport** enabled (`preferNativeTransport`)

## Architecture Notes

Vert.x sits in a unique spot in the JVM ecosystem:
- **Spring** = DI + annotations + Tomcat/Netty (high-level framework)
- **Quarkus** = CDI + annotations + Vert.x/Netty under the hood (compile-time optimization)
- **Vert.x** = event loops + handlers + Netty directly (reactive toolkit)

Quarkus actually uses Vert.x internally, so this benchmark shows the raw Vert.x performance vs. the Quarkus abstraction on top.
21 changes: 21 additions & 0 deletions frameworks/vertx/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"display_name": "vertx",
"language": "Java",
"type": "framework",
"engine": "Netty",
"description": "Eclipse Vert.x 4.5 — reactive toolkit on Netty with event-loop threading, JDK 21.",
"repo": "https://github.com/eclipse-vertx/vert.x",
"enabled": true,
"tests": [
"baseline",
"pipelined",
"limited-conn",
"json",
"upload",
"compression",
"noisy",
"mixed",
"baseline-h2",
"static-h2"
]
}
78 changes: 78 additions & 0 deletions frameworks/vertx/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.httparena</groupId>
<artifactId>vertx-httparena</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vertx.version>4.5.14</vertx.version>
<jackson.version>2.16.1</jackson.version>
</properties>

<dependencies>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.47.2.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.httparena.MainVerticle</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading
Loading