The Java gRPC implementation. HTTP/2 based RPC
Go to file
Eric Anderson 080e33effd Align server flags with other languages
There are also no longer any required arguments. The argument processing
flow was changed to match that of the client.
2015-01-16 13:13:57 -08:00
all Adding gradle build for Java grpc 2015-01-08 14:43:21 -08:00
auth Adding gradle build for Java grpc 2015-01-08 14:43:21 -08:00
compiler Make Java codegen ready for open-source. It can be built with the Github HEAD 2015-01-15 13:42:49 -08:00
core Remove traces of gRPC v1 protocol vs gRPC v2 protocol. 2015-01-16 11:03:38 -08:00
examples/src/main Remove Service API from ChannelImpl 2015-01-15 13:42:49 -08:00
integration-testing Align server flags with other languages 2015-01-16 13:13:57 -08:00
lib Export test_service codegen source instead of binary lib 2015-01-08 14:43:21 -08:00
netty Remove traces of gRPC v1 protocol vs gRPC v2 protocol. 2015-01-16 11:03:38 -08:00
okhttp Reimplement test "readStatus" since v2 is here. 2015-01-16 11:03:36 -08:00
stub Remove dependency on guava Lists for initializing list. 2015-01-15 13:42:43 -08:00
testing Adding gradle build for Java grpc 2015-01-08 14:43:21 -08:00
.gitignore Update .gitignore for Gradle 2015-01-16 13:05:01 -08:00
.gitmodules Upgrade OkHttp for Android SNI / NPN fix 2015-01-08 14:43:20 -08:00
LICENSE Initial commit 2015-01-08 14:42:02 -08:00
README.md Add README 2015-01-08 14:43:21 -08:00
build.gradle Adding gradle build for Java grpc 2015-01-08 14:43:21 -08:00
checkstyle.license Adding MOE configuration for grpc_java. 2015-01-08 14:43:02 -08:00
checkstyle.xml Adding MOE configuration for grpc_java. 2015-01-08 14:43:02 -08:00
pom.xml Updating version of gRPC maven build to 0.1.0-SNAPSHOT. 2015-01-08 14:43:20 -08:00
run-test-client.sh Allow killing test server/client 2015-01-08 14:43:18 -08:00
run-test-server.sh Allow killing test server/client 2015-01-08 14:43:18 -08:00
settings.gradle Adding gradle build for Java grpc 2015-01-08 14:43:21 -08:00

README.md

grpc-java

Heres a quick readers guide to the code to help folks get started. At a high level there are three distinct layers to the library: stub, channel & transport.

Stub

The 'stub' layer is what is exposed to most developers and provides type-safe bindings to whatever datamodel/IDL/interface you are adapting. An example is provided of a binding to code generated by the protocol-buffers compiler but others should be trivial to add and are welcome.

Key Interfaces

Stream Observer

Channel

The 'channel' layer is an abstraction over transport handling that is suitable for interception/decoration and exposes more behavior to the application than the stub layer. It is intended to be easy for application frameworks to use this layer to address cross-cutting concerns such as logging, monitoring, auth etc. Flow-control is also exposed at this layer to allow more sophisticated applications to interact with it directly.

Common

Client

Server

Transport

The 'transport' layer does the heavy lifting of putting & taking bytes off the wire. The interfaces to it are abstract just enough to allow plugging in of different implementations. Transports are modeled as 'Stream' factories. The variation in interface between a server stream and a client stream exists to codify their differing semantics for cancellation and error reporting.

Common

Client

Server

Examples

Tests showing how these layers are composed to execute calls using protobuf messages can be found here https://github.com/google/grpc-java/tree/master/integration-testing/src/main/java/com/google/net/stubby/testing/integration