-
Notifications
You must be signed in to change notification settings - Fork 17
Wiring gRPC service
Regunath B edited this page Jun 25, 2018
·
6 revisions
This is done using Guice and extensions provided by GJEX as demonstrated in examples:
- Create a separate Gradle or Maven project for the new service.
- Generate the gRPC stubs using grpc-java
- Implement the concrete service, making use of GJEX extensions like - Configuration, Metrics etc. as seen in GreeterService
- Implement a Guice module to configure the gRPC service and its dependencies - such as a custom configuration. See HelloWorldModule and Service YAML file
- Implement a GJEX Application class that wires the gRPC service Module with the GJEX runtime. For e.g. HelloWorldApplication
- Build the project and run the GJEX Application, for e.g. HelloWorldApplication. With Gradle, this can be packaged as an executable. See examples build.gradle