Skip to content

flipkart-incubator/grpc-jexpress

Repository files navigation

grpc-jexpress

Developer friendly container for writing gRPC services using grpc-java, called GJEX - for Grpc Java Express.

Provides following features:

  • Transparent gRPC runtime startup alongwith Jetty for dashboard/administration
  • Guice module support to integrate gRPC service implementations with the gRPC runtime
  • Metrics support - e.g. @Timed annotations to publish to JMX
  • YAML based configuration support for gRPC service implementations
  • Component Lifecycle (Start(), Stop()) support via Service interface
  • Health Check - ability to add any number of deep Health Checks
  • Custom web resources for enabling Control Path, Administration actions
  • Filters - ability to add any number of Filters to gRPC stub method implementations
  • Validation - using Hibernate Validator
  • Distributed Tracing - using opentracing and the openzipkin implementation
  • Concurrent execution, Circuit breaking using Hystrix and Dispatch-Compose through a FutureDecorator API
  • Deadlining for APIs - ability to specify execution timeouts for gRPC stubs at service end
  • Task/Upstream request retries using Hedged Requests as described here
  • Tool recommendations for testing

Distribution

GJEX builds are distributed via the Clojars community maintained repository for open source libraries. Add the following repository to your build system to access releases builds - e.g for Maven :

<repository>
    <id>clojars</id>
    <name>Clojars repository</name>
    <url>https://clojars.org/repo</url>
</repository>

Releases

Release versions are documented on the releases page. You can also refer to clojars page for the release versions

Clojars Project Clojars Project

More details on Distribution Binaries

Building

You may also build GJEX from source. To build, clone this repository and run:

$ git clone https://github.com/flipkart-incubator/grpc-jexpress.git
$ cd grpc-jexpress
$ ./gradlew clean build publishToMavenLocal

Examples

To run the hello world example with GJEX extensions, run:

$ ./gradlew runHelloWorldServer

The gRPC Server, hosted gRPC services and the Jetty server status will be displayed in the console. By attaching an MBeans explorer like JConsole, one can inspect method-level execution metrics for the gRPC services.

And in a different terminal window run:

$ ./gradlew runHelloWorldClient

Documentation

Refer to the wiki for documentation.