{"id":18350294,"url":"https://github.com/ollls/quartz-h2","last_synced_at":"2025-08-12T10:05:05.926Z","repository":{"id":65509049,"uuid":"564053231","full_name":"ollls/quartz-h2","owner":"ollls","description":"Asynchronous Java NIO  http/2 only packet streaming server with TLS encryption implemented as Scala CATS effect. Direct native translation of fs2 stream chunks into http2 packets ( inbound and outbound ).","archived":false,"fork":false,"pushed_at":"2025-07-20T17:50:37.000Z","size":1400,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-20T19:07:15.231Z","etag":null,"topics":["cats-effect","http","http-server","http2","multipart-uploads","rest","scala","tls"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ollls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"ollls"}},"created_at":"2022-11-09T22:22:33.000Z","updated_at":"2025-07-20T17:50:40.000Z","dependencies_parsed_at":"2024-05-16T19:47:24.502Z","dependency_job_id":"a1f32a96-49b6-467f-8bcf-623d9a3e81f9","html_url":"https://github.com/ollls/quartz-h2","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ollls/quartz-h2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fquartz-h2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fquartz-h2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fquartz-h2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fquartz-h2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollls","download_url":"https://codeload.github.com/ollls/quartz-h2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fquartz-h2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270040726,"owners_count":24516684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cats-effect","http","http-server","http2","multipart-uploads","rest","scala","tls"],"created_at":"2024-11-05T21:25:59.013Z","updated_at":"2025-08-12T10:05:05.917Z","avatar_url":"https://github.com/ollls.png","language":"Scala","funding_links":["https://github.com/sponsors/ollls"],"categories":[],"sub_categories":[],"readme":"# Asynchronous Java NIO http/2 TLS packet streaming server/client.\n[![Generic badge](https://img.shields.io/badge/quartz--h2-v0.9.0-blue)](https://repo1.maven.org/maven2/io/github/ollls/quartz-h2_3/0.9.0/)\n[![Generic badge](https://img.shields.io/badge/Hello%20World-template-red)](https://github.com/ollls/json-template-qh2)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ollls_quartz-h2\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ollls_quartz-h2)\u003cbr\u003e\n\nTLS encryption implemented as scala CATS effects with ALPN h2 tag. Direct native translation of fs2 stream chunks into http2 packets, where http Request's data and http Response's data mapped directy to fs2 streams. Tested and optimized to produce highest possible TPS.(120K TPS on MacBook with h2load tool, see details below). Single java.util.concurrent.ForkJoinPool for JAVA NIO Socket Groups and for evalOn() with CATS Effects. Http/2 weights and dependency are not implemented, for performance reasons.\n\n## Documentation\nhttps://ollls.github.io/quartz-h2/index.html\u003cbr\u003e\nhttps://github.com/ollls/json-template-qh2\n\n## 0.8.5 README\nhttps://github.com/ollls/quartz-h2/blob/v0.8.5/README.md\n\n## Examples, use cases\nhttps://github.com/ollls/quartz-h2/tree/main/examples\n\n\n## Quick start\nRunning server with git clone on the code base.\n\n```\ngit clone https://github.com/ollls/quartz-h2.git\nsbt IO/run\nsbt TAPIR/run\nsbt RIO/run\n```\n\n- Open https://localhost:8443/doc/index.html in the browser.\n- Open https://localhost:8443/mp4safari - to test iPhone/Safari compatible ranged http video streams with TAPIR/run)\n\n- Partial func based route: https://github.com/ollls/quartz-h2/blob/main/examples/IO/src/main/scala/Run.scala\u003cbr\u003e\n- Tapir endpoints routes:   https://github.com/ollls/quartz-h2/blob/main/examples/STTP/src/main/scala/Run.scala\u003cbr\u003e\n\n\n- https://github.com/ollls/json-template-qh2\n- https://github.com/ollls/qh2_tapir_template\n- https://github.com/ollls/quartz-h2-gptapi\n- https://github.com/ollls/qh2_grpc\n\n## Tests\n\n### Tests with h2load (AMD Ryzen 9 9950X)\nhttps://nghttp2.org/documentation/h2load-howto.html \n\n### http2 spec compatibility tests\nhttps://formulae.brew.sh/formula/h2spec\n\n```\nh2load -D10 -c62 -m30 -t2 https://localhost:8443/test\n\nfinished in 10.01s, 181570.00 req/s, 1.73MB/s\nrequests: 1815700 total, 1817684 started, 1815700 done, 1815700 succeeded, 0 failed, 0 errored, 0 timeout\nstatus codes: 1815700 2xx, 0 3xx, 0 4xx, 0 5xx\ntraffic: 17.32MB (18160348) total, 1.73MB (1815700) headers (space savings 90.00%), 0B (0) data\n                     min         max         mean         sd        +/- sd\ntime for request:       94us    159.39ms     10.63ms     13.72ms    89.47%\ntime for connect:    10.31ms       2.04s    261.10ms    605.82ms    85.48%\ntime to 1st byte:    54.64ms       2.14s    305.98ms    612.49ms    85.48%\nreq/s           :    2353.88     3028.57     2928.14      194.00    85.48%\n\n```\n\nIOURING with 4 rings on (AMD Ryzen 9 9950X) \n( different dynamic more connections without degradation, on big multi-core it's important to have number of IOURING rings \u003e 2 ) \n```\nh2load -D10 -c140 -m20 -t1 https://localhost:8443/test\n\nfinished in 10.02s, 172321.00 req/s, 1.64MB/s\nrequests: 1723210 total, 1726010 started, 1723210 done, 1723210 succeeded, 0 failed, 0 errored, 0 timeout\nstatus codes: 1723210 2xx, 0 3xx, 0 4xx, 0 5xx\ntraffic: 16.44MB (17239660) total, 1.64MB (1723210) headers (space savings 90.00%), 0B (0) data\n                     min         max         mean         sd        +/- sd\ntime for request:       51us     89.03ms     14.92ms     10.84ms    82.75%\ntime for connect:     7.56ms       1.52s    635.12ms    436.57ms    59.29%\ntime to 1st byte:     9.16ms       1.53s    642.55ms    440.41ms    58.57%\nreq/s           :    1056.13     1560.53     1228.97      128.21    67.14%\n\n```\n\n\n### How to run h2spec:\n\nStart server with \"sbt IO/run\" \n```\n./h2spec http2 -h localhost -p 8443 -t -k You should get:\n\nFinished in 1.4891 seconds\n94 tests, 93 passed, 1 skipped, 0 failed\n```\n\n### How to run test cases:\n\nsbt test\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follls%2Fquartz-h2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follls%2Fquartz-h2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follls%2Fquartz-h2/lists"}