{"id":17992629,"url":"https://github.com/apache/pekko-grpc","last_synced_at":"2025-03-26T01:31:24.643Z","repository":{"id":65251257,"uuid":"559858662","full_name":"apache/pekko-grpc","owner":"apache","description":"Apache Pekko gRPC","archived":false,"fork":false,"pushed_at":"2025-03-11T00:17:05.000Z","size":4045,"stargazers_count":44,"open_issues_count":28,"forks_count":18,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-03-17T12:21:45.650Z","etag":null,"topics":["grpc","java","pekko","pekko-http","reactive","reactive-streams","rpc","scala","streaming"],"latest_commit_sha":null,"homepage":"https://pekko.apache.org/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2022-10-31T08:45:17.000Z","updated_at":"2025-03-15T02:00:29.000Z","dependencies_parsed_at":"2023-11-19T18:29:04.055Z","dependency_job_id":"964087d8-cbde-4207-a45a-2d773b55f8a1","html_url":"https://github.com/apache/pekko-grpc","commit_stats":null,"previous_names":["apache/pekko-grpc"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpekko-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpekko-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpekko-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpekko-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/pekko-grpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245571814,"owners_count":20637403,"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","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":["grpc","java","pekko","pekko-http","reactive","reactive-streams","rpc","scala","streaming"],"created_at":"2024-10-29T20:08:48.726Z","updated_at":"2025-03-26T01:31:24.054Z","avatar_url":"https://github.com/apache.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Pekko gRPC\n\nSupport for building streaming gRPC servers and clients on top\nof Apache Pekko Streams.\n\nThis library is meant to be used as a building block in projects using the Pekko\ntoolkit.\n\n## Documentation\n\n- [Pekko gRPC reference](https://pekko.apache.org/docs/pekko-grpc/current/) documentation \n\n## Project Status\n\nThis library is ready to be used in production, but API's and build system plugins are still expected to be improved and [may change](https://pekko.apache.org/docs/pekko/current/common/may-change.html).\n\nThe API on both sides (Client and Server) is a simple Pekko Streams-based one.\n\nThe client side is\ncurrently implemented on top of [io.grpc:grpc-netty-shaded](https://mvnrepository.com/artifact/io.grpc/grpc-netty-shaded),\nwe plan to replace this by just [io.grpc:grpc-core](https://mvnrepository.com/artifact/io.grpc/grpc-core) and [Pekko HTTP](https://pekko.apache.org/docs/pekko-http/current/).\n\nAs for performance, we are currently relying on the JVM TLS implementation,\nwhich is sufficient for many use cases, but is planned to be replaced with\n[conscrypt](https://github.com/google/conscrypt) or [netty-tcnative](https://netty.io/wiki/forked-tomcat-native.html).\n\n## General overview\n\ngRPC is a schema-first RPC framework, where your protocol is declared in a\nprotobuf definition, and requests and responses will be streamed over an HTTP/2\nconnection.\n\nBased on a protobuf service definition, pekko-grpc can generate:\n\n* Model classes (using plain protoc for Java or scalapb for Scala)\n* The API (as an interface for Java or a trait for Scala), expressed in Pekko Streams `Source`s\n* On the server side, code to create a Pekko HTTP route based on your implementation of the API\n* On the client side, a client for the API.\n\n## Project structure\n\nThe project is split up in a number of subprojects:\n\n* codegen: code generation shared among plugins\n* runtime: run-time utilities used by the generated code\n* sbt-plugin: the sbt plugin\n* scalapb-protoc-plugin: the scalapb Scala model code generation packaged as a protoc plugin, to be used from gradle\n* [interop-tests](interop-tests/README.md)\n\nAdditionally, 'plugin-tester-java' and 'plugin-tester-scala' contain an example\nproject in Java and Scala respectively, with both sbt and Gradle configurations.\n\n## Compatibility \u0026 support\n\nIf used with JDK 8 prior to version 1.8.0_251 you must add an ALPN agent.\nSee the note in the [Akka HTTP docs](https://doc.akka.io/docs/akka-http/10.1/server-side/http2.html#application-layer-protocol-negotiation-alpn-).\n\n## Building from Source\n\n### Prerequisites\n- Make sure you have installed a Java Development Kit (JDK) version 8 or later.\n- Make sure you have [sbt](https://www.scala-sbt.org/) installed.\n- [Maven](https://www.baeldung.com/install-maven-on-windows-linux-mac) is needed for tasks related to building and testing Maven plugin support.\n- [Gradle](https://gradle.org/) is needed for tasks related to building and testing Gradle plugin support. We have `gradlew` scripts that will install the right version of Gradle and run the gradle tasks using it.\n- [Graphviz](https://graphviz.gitlab.io/download/) is needed for the scaladoc generation build task, which is part of the release.\n\n### Running the Build\n- Open a command window and change directory to your preferred base directory\n- Use git to clone the [repo](https://github.com/apache/pekko-grpc) or download a source release from https://pekko.apache.org (and unzip or untar it, as appropriate)\n- Change directory to the directory where you installed the source (you should have a file called `build.sbt` in this directory)\n- `sbt compile` compiles the main source for project default version of Scala (2.12)\n    - `sbt +compile` will compile for all supported versions of Scala\n- `sbt test` will compile the code and run the unit tests\n- `sbt testQuick` similar to `test` but when repeated in shell mode will only run failing tests\n- `sbt package` will build the jars\n    - the jars will built into target dirs of the various modules\n    - for the the 'runtime' module, the jar will be built to `runtime/target/scala-2.12/`\n- `sbt publishLocal` will push the jars to your local Apache Ivy repository\n- `sbt publishM2` will push the jars to your local Apache Maven repository\n- `sbt docs/paradox` will build the docs (the ones describing the module features)\n     - `sbt docs/paradoxBrowse` does the same but will open the docs in your browser when complete\n     - the `index.html` file will appear in `target/paradox/site/main/`\n- `sbt unidoc` will build the Javadocs for all the modules and load them to one place (may require Graphviz, see Prerequisites above)\n     - the `index.html` file will appear in `target/scala-2.13/unidoc/`\n- `sbt sourceDistGenerate` will generate source release to `target/dist/`\n- The version number that appears in filenames and docs is derived, by default. The derived version contains the most git commit id or the date/time (if the directory is not under git control). \n    - You can set the version number explicitly when running sbt commands\n        - eg `sbt \"set ThisBuild / version := \\\"1.0.0\\\"; sourceDistGenerate\"`  \n    - Or you can add a file called `version.sbt` to the same directory that has the `build.sbt` containing something like\n        - `ThisBuild / version := \"1.0.0\"`\n     \n#### Maven plugin\n- the Maven plugin is built using sbt\n- Build the Maven plugin and not its version number because the tests need the version number\n- You can test the Maven plugin by changing directory into the `plugin-tester-java` dir\n    - `mvn -Dpekko.grpc.project.version=\u003cversion\u003e pekko-grpc:generate compile`\n- You can run the equivalent Scala tests by changing directory into the `plugin-tester-scala` dir\n    - `mvn -Dpekko.grpc.project.version=\u003cversion\u003e pekko-grpc:generate scala:compile`\n\n#### Gradle plugin\n- the Gradle plugin is built using gradle\n- The gradle plugin will automatically derive the version of the artifact from sbt.\n  - In other words sbt is the source of truth when it comes to deriving the version\n- You can test the Gradle plugin by change directory into the `plugin-tester-java` dir\n  - `./gradlew clean test -Dpekko.grpc.project.version=\u003cversion\u003e`\n- You can run the equivalent Scala tests by changing directory into the `plugin-tester-scala` dir\n  - `./gradlew clean test -Dpekko.grpc.project.version=\u003cversion\u003e`\n\n## License\n\nPekko gRPC is Open Source and available under the Apache 2 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fpekko-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fpekko-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fpekko-grpc/lists"}