zio-http: the seven profiles it was missing - #1250
Open
MDA2AV wants to merge 2 commits into
Open
Conversation
static, static-tls, json-tls, async-db, crud, api-4 and api-16. The entry carried four endpoints; api-4 and api-16 rotate over /baseline11, /json and /async-db, so wiring Postgres brings all three profiles with it. json-tls and static-tls are a second Server.serve over the same routes on 8081, raced against the plaintext one: neither ever completes, so the race only settles if one fails, which takes the process down rather than leaving a port silently unserved. Postgres is reached over JDBC through HikariCP. The driver blocks, so every query runs on ZIO's blocking pool and the server's event loops stay free. DATABASE_URL arrives as postgres://user:pass@host:port/db, which JDBC does not accept, so it is rewritten to a jdbc:postgresql:// URL with the credentials lifted out. crud runs cache-aside on Redis through jedis, with a 200ms TTL and an explicit delete on update. Static file bodies are read from disk on every request; only the content type is decided from the name. Note java.lang.Runtime has to be spelled out: `import zio.*` puts zio.Runtime in scope and shadows it. Validation: 58 passed, 0 failed.
Owner
Author
|
/benchmark --save |
Contributor
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Contributor
Benchmark ResultsFramework:
Full log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
static,static-tls,json-tls,async-db,crud,api-4andapi-16.Tests go from 6 to 13.
The entry carried four endpoints —
/pipeline,/baseline11,/json/:count,/upload.api-4andapi-16rotate over/baseline11,/jsonand/async-db, so wiring Postgres brings all three profiles with it.json-tls / static-tls
A second
Server.serveover the same routes on 8081, raced against the plaintextone. Neither ever completes, so the race only settles if one fails, which takes
the process down rather than leaving a port silently unserved.
Postgres
JDBC through HikariCP. The driver blocks, so every query runs on ZIO's blocking
pool and the server's event loops stay free.
DATABASE_URLarrives aspostgres://user:pass@host:port/db, which JDBC does not accept, so it isrewritten to a
jdbc:postgresql://URL with the credentials lifted out.static
Bodies are read from disk on every request, per the arena rule that applies in
every mode; only the content type is decided from the name, and the
pre-compressed
.br/.gzsibling is picked per request.crud
Cache-aside on Redis through jedis, 200ms TTL, explicit delete on update.
Note for the next person
java.lang.Runtimehas to be spelled out in this file —import zio.*putszio.Runtimein scope and shadows it, and the error message sends you toward anizumi reflection import rather than the actual problem.
Validation
58 passed, 0 failed, including every new profile:
fortunesis deliberately not included.🤖 Generated with Claude Code