{"id":31702287,"url":"https://github.com/ollls/qh2grpc-zio","last_synced_at":"2026-02-14T22:32:58.158Z","repository":{"id":318533537,"uuid":"1071678085","full_name":"ollls/qh2grpc-zio","owner":"ollls","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-07T17:58:26.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-07T19:41:13.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-07T17:03:00.000Z","updated_at":"2025-10-07T19:31:08.000Z","dependencies_parsed_at":"2025-10-07T19:41:15.483Z","dependency_job_id":null,"html_url":"https://github.com/ollls/qh2grpc-zio","commit_stats":null,"previous_names":["ollls/qh2grpc-zio"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ollls/qh2grpc-zio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fqh2grpc-zio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fqh2grpc-zio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fqh2grpc-zio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fqh2grpc-zio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollls","download_url":"https://codeload.github.com/ollls/qh2grpc-zio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fqh2grpc-zio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29458747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T21:29:27.764Z","status":"ssl_error","status_checked_at":"2026-02-14T21:28:11.111Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-10-08T21:35:58.500Z","updated_at":"2026-02-14T22:32:58.131Z","avatar_url":"https://github.com/ollls.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qh2grpc-zio\n\nA lightweight gRPC-over-HTTP/2 framework for Scala 3 that implements native gRPC protocol support directly within a ZIO Quartz H2 HTTP/2 server--**without** using Google's standard `ServerBuilder` infrastructure.\n\n## Key Features\n\n- **Native gRPC-over-HTTP/2**: Implements gRPC as HTTP/2 request handlers rather than a separate server stack\n- **Unified Endpoints**: Serve both HTTP/2 and gRPC endpoints with minimal overhead\n- **Compile-Time Safety**: Method discovery using Scala 3 macros for zero runtime reflection\n- **ZIO-Native**: Full integration with ZIO effects and streams\n- **Flexible Backends**: Supports both Java NIO and Linux IO-Uring (kernel 5.1+)\n- **All 4 gRPC Patterns**: Unary, server streaming, client streaming, and bidirectional streaming\n\n## Technology Stack\n\n- **Scala 3.3.3**\n- **ZIO 2.1.16** (functional effect system)\n- **zio-quartz-h2 0.7.1** (HTTP/2 server)\n- **ScalaPB \u0026 zio-grpc 0.6.3** (Protocol Buffers)\n- **SBT 1.10.0** (build tool)\n\n## Quick Start\n\n### Prerequisites\n\n- JDK 11+\n- SBT 1.10.0+\n- `keystore.jks` file with password \"password\" (included in project)\n\n### Running the Server\n\n```bash\n# Start the server (default: HTTPS on localhost:8443)\nsbt run\n\n# Run with different log levels\nsbt \"run --debug\"   # DEBUG level\nsbt \"run --error\"   # ERROR level\nsbt \"run --trace\"   # TRACE level\nsbt \"run --off\"     # Logging OFF\n```\n\nThe server will start on `https://localhost:8443` and serve both HTTP/2 and gRPC endpoints.\n\n### Testing the Server\n\n#### Automated Testing\n\nRun the comprehensive test script that validates all 4 gRPC communication patterns:\n\n```bash\n# In a separate terminal (with server running)\n./test-grpc.sh\n```\n\nThis tests:\n- **Unary to Unary** (`SayHello`)\n- **Unary to Stream** (`LotsOfReplies`)\n- **Stream to Unary** (`LotsOfGreetings`)\n- **Stream to Stream** (`BidiHello`)\n\n#### Manual Testing with grpcurl\n\n**Unary to Unary:**\n```bash\ngrpcurl -v -insecure -proto src/main/protobuf/orders.proto \\\n  -d '{\"name\": \"John\", \"number\": 101}' \\\n  localhost:8443 com.example.protos.Greeter/SayHello\n```\n\n**Server Streaming:**\n```bash\ngrpcurl -v -insecure -proto src/main/protobuf/orders.proto \\\n  -d '{\"name\": \"Alice\", \"number\": 42}' \\\n  localhost:8443 com.example.protos.Greeter/LotsOfReplies\n```\n\n**Client Streaming:**\n```bash\ngrpcurl -v -insecure -proto src/main/protobuf/orders.proto \\\n  -d @ localhost:8443 com.example.protos.Greeter/LotsOfGreetings \u003c\u003cEOF\n{\"name\": \"Bob\"}\n{\"name\": \"Charlie\"}\n{\"name\": \"Dave\"}\nEOF\n```\n\n**Bidirectional Streaming:**\n```bash\ngrpcurl -v -insecure -proto src/main/protobuf/orders.proto \\\n  -d @ localhost:8443 com.example.protos.Greeter/BidiHello \u003c\u003cEOF\n{\"name\": \"Emma\", \"number\": 1}\n{\"name\": \"Frank\", \"number\": 2}\nEOF\n```\n\n## Build Commands\n\n```bash\nsbt compile        # Compile the project\nsbt test           # Run tests\nsbt clean          # Clean build artifacts\nsbt run            # Run the server\n```\n\n## Project Structure\n\n```\nqh2grpc-zio/\n├── src/main/\n│   ├── scala/\n│   │   ├── Run.scala                   # Main application entry point\n│   │   ├── GreeterService.scala        # Example gRPC service\n│   │   └── io/quartz/grpc/             # gRPC integration framework\n│   │       ├── Router.scala            # HTTP/2 to gRPC routing\n│   │       ├── TraitMethodFinder.scala # Compile-time method discovery\n│   │       └── Utils.scala             # Protocol handling utilities\n│   └── protobuf/\n│       └── orders.proto                # Example protobuf definitions\n├── test-grpc.sh                        # Automated test script\n├── build.sbt                           # SBT build configuration\n└── INTRO.md                            # Framework introduction\n```\n\n## How It Works\n\nInstead of running a separate gRPC server (like Netty-based implementations), this framework:\n\n1. **Registers gRPC services as HTTP/2 routes** in the Quartz H2 server\n2. **Uses Scala 3 macros** (`TraitMethodFinder`) to discover service methods at compile time\n3. **Transforms HTTP/2 requests** to gRPC calls with proper metadata and framing\n4. **Handles all 4 gRPC patterns** using ZIO effects and streams\n\nThis approach provides:\n- Lower overhead (no separate server process)\n- Unified configuration and deployment\n- Type-safe method discovery\n- Full ZIO integration\n\n## Documentation\n\n- [INTRO.md](INTRO.md) - Framework introduction and motivation\n- [CLAUDE.md](CLAUDE.md) - Detailed technical documentation\n\n## License\n\nSee license file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follls%2Fqh2grpc-zio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follls%2Fqh2grpc-zio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follls%2Fqh2grpc-zio/lists"}