Skip to content
Merged
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
15 changes: 15 additions & 0 deletions frameworks/vertx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Eclipse Vert.x with vertx-web on Netty, one server verticle per core.
| `/baseline11` | POST | Sums query parameters + request body |
| `/json/{count}?m=N` | GET | First `count` dataset items with `total = price * quantity * m` |
| `/upload` | POST | Streams the body and returns the byte count |
| `/baseline2` | GET | Sums query parameter values |
| `/async-db` | GET | Reads from PostgreSQL through the reactive pg client |
| `/static/:filename` | GET | Serves a file from disk with `sendFile`, the brotli or gzip variant when the client accepts one |
| `/crud/items` | GET/POST | Lists items by category with paging, or inserts one |
| `/crud/items/:id` | GET/PUT | Reads one item through a Redis cache-aside, or updates it and drops the cached copy |

## Notes

Expand All @@ -25,3 +30,13 @@ Eclipse Vert.x with vertx-web on Netty, one server verticle per core.
- Compression through `HttpServerOptions.setCompressionSupported(true)`
- The verticle is deployed once per core, all instances sharing port 8080
- `/upload` is read from the request stream, so the 20 MB body is never buffered

`json-tls` and `static-tls` listen on `8081` when `/certs/server.crt` and `/certs/server.key` are
mounted. The verticle is deployed once per core and each instance binds both ports, so the TLS
listener is spread across every event loop rather than parked on one. ALPN is off: those two
profiles want HTTP/1.1 negotiated and no h2 offered.

Static file bodies are read from disk on every request - `sendFile` hands the descriptor to the
kernel rather than holding the bytes - and the pre-compressed sibling is picked per request.

`tags` is a JSONB column, so the pg client hands back a `JsonArray` rather than text.
9 changes: 8 additions & 1 deletion frameworks/vertx/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@
"limited-conn",
"json",
"json-comp",
"upload"
"json-tls",
"upload",
"static",
"static-tls",
"async-db",
"crud",
"api-4",
"api-16"
],
"maintainers": []
}
16 changes: 16 additions & 0 deletions frameworks/vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@
<artifactId>vertx-web</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-pg-client</artifactId>
<version>${vertx.version}</version>
</dependency>
<!-- postgres:18 negotiates SCRAM-SHA-256, which the pg client leaves to this -->
<dependency>
<groupId>com.ongres.scram</groupId>
<artifactId>scram-client</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-redis-client</artifactId>
<version>${vertx.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
Loading