Support for building streaming gRPC servers and clients on top of Apache Pekko Streams.
This library is meant to be used as a building block in projects using the Pekko toolkit.
This library is ready to be used in production, but API's and build system plugins are still expected to be improved and may change.
The API on both sides (Client and Server) is a simple Pekko Streams-based one.
The client side is currently implemented on top of io.grpc:grpc-netty-shaded, we plan to replace this by just io.grpc:grpc-core and Pekko HTTP.
As for performance, we are currently relying on the JVM TLS implementation, which is sufficient for many use cases, but is planned to be replaced with conscrypt or netty-tcnative.
gRPC is a schema-first RPC framework, where your protocol is declared in a protobuf definition, and requests and responses will be streamed over an HTTP/2 connection.
Based on a protobuf service definition, pekko-grpc can generate:
SourcesThe project is split up in a number of subprojects:
Additionally, ‘plugin-tester-java’ and ‘plugin-tester-scala’ contain an example project in Java and Scala respectively, with both sbt and Gradle configurations.
gradlew scripts that will install the right version of Gradle and run the gradle tasks using it.build.sbt in this directory)sbt compile compiles the main source for project default version of Scala (2.13)sbt +compile will compile for all supported versions of Scalasbt test will compile the code and run the unit testssbt testQuick similar to test but when repeated in shell mode will only run failing testssbt package will build the jarsruntime/target/scala-2.13/sbt publishLocal will push the jars to your local Apache Ivy repositorysbt publishM2 will push the jars to your local Apache Maven repositorysbt docs/paradox will build the docs (the ones describing the module features)sbt docs/paradoxBrowse does the same but will open the docs in your browser when completeindex.html file will appear in target/paradox/site/main/sbt unidoc will build the Javadocs for all the modules and load them to one place (may require Graphviz, see Prerequisites above)index.html file will appear in target/scala-2.13/unidoc/sbt sourceDistGenerate will generate source release to target/dist/sbt "set ThisBuild / version := \"1.0.0\"; sourceDistGenerate"version.sbt to the same directory that has the build.sbt containing something likeThisBuild / version := "1.0.0"plugin-tester-java dirmvn -Dpekko.grpc.project.version=<version> pekko-grpc:generate compileplugin-tester-scala dirmvn -Dpekko.grpc.project.version=<version> pekko-grpc:generate scala:compileplugin-tester-java dir./gradlew clean test -Dpekko.grpc.project.version=<version>plugin-tester-scala dir./gradlew clean test -Dpekko.grpc.project.version=<version>Pekko gRPC is Open Source and available under the Apache 2 License.