Skip to content
/ akka-grpc Public

A platform to build and run apps that are elastic, agile, and resilient. SDK, libraries, and hosted environments.

License

Notifications You must be signed in to change notification settings

akka/akka-grpc

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c528b90 · Feb 27, 2024
Feb 16, 2024
Feb 27, 2024
Mar 14, 2023
Jun 30, 2023
Nov 1, 2023
Feb 27, 2024
Oct 17, 2023
Oct 17, 2023
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Mar 14, 2023
Nov 14, 2022
Jul 26, 2023
Mar 8, 2021
Nov 28, 2022
Jun 30, 2023
Oct 27, 2020
Oct 2, 2023
Oct 24, 2023
Oct 2, 2023
Nov 3, 2023
Nov 1, 2023

Repository files navigation

akka-grpc

Support for building streaming gRPC servers and clients on top of Akka Streams.

This library is meant to be used as a building block in projects using the Akka toolkit.

Documentation

Project Status

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 Akka 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 Akka 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.

General overview

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, akka-grpc can generate:

  • Model classes (using plain protoc for Java or scalapb for Scala)
  • The API (as an interface for Java or a trait for Scala), expressed in Akka Streams Sources
  • On the server side, code to create an Akka HTTP route based on your implementation of the API
  • On the client side, a client for the API.

Project structure

The project is split up in a number of subprojects:

  • codegen: code generation shared among plugins
  • runtime: run-time utilities used by the generated code
  • sbt-plugin: the sbt plugin
  • scalapb-protoc-plugin: the scalapb Scala model code generation packaged as a protoc plugin, to be used from gradle
  • interop-tests

Additionally, 'plugin-tester-java' and 'plugin-tester-scala' contain an example project in Java and Scala respectively, with both sbt and Gradle configurations.

Compatibility & support

Support for Akka gRPC is available via the Lightbend Subscription

License

Akka gRPC is licensed under the Business Source License 1.1, see LICENSE.