You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Gradle protoc plugin is used for generating and compiling the grpc
codegen. The code organization was changed to match what Gradle expects.
Proto 3 is now required.
If you are comfortable with C++ compilation and autotools, you can specify a
30
+
--prefix for protobuf and use -I in CXXFLAGS, -L in LDFLAGS, LD\_LIBRARY\_PATH,
31
+
and PATH to reference it. The environment variables will be used when building
32
+
grpc-java.
33
+
34
+
Now to build grpc-java itself:
35
+
```
36
+
$ ./gradlew install
37
+
```
38
+
39
+
Navigating Around the Source
40
+
----------------------------
41
+
4
42
Heres a quick readers guide to the code to help folks get started. At a high level there are three distinct layers
5
43
to the library: stub, channel & transport.
6
44
7
-
## Stub
45
+
###Stub
8
46
9
47
The 'stub' layer is what is exposed to most developers and provides type-safe bindings to whatever
10
48
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.
@@ -14,7 +52,7 @@ datamodel/IDL/interface you are adapting. An example is provided of a binding to
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.
20
58
@@ -33,7 +71,7 @@ The 'channel' layer is an abstraction over transport handling that is suitable f
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.
39
77
@@ -53,6 +91,6 @@ The 'transport' layer does the heavy lifting of putting & taking bytes off the w
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/io/grpc/testing/integration
0 commit comments