From c776ce785f3a35059b6da451cec4d6aac943f185 Mon Sep 17 00:00:00 2001 From: Paul Grosu Date: Wed, 7 Dec 2016 01:08:55 -0500 Subject: submit --- chapter/1/gRPC.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'chapter/1/gRPC.md') diff --git a/chapter/1/gRPC.md b/chapter/1/gRPC.md index 7d9cd34..76a285b 100644 --- a/chapter/1/gRPC.md +++ b/chapter/1/gRPC.md @@ -80,7 +80,7 @@ One will notice that there is a number associated with each field element in the A 2 48 69 ``` -Thus the language had to be updated to support gRPC and the development of a service message with a request and a response definition was added for version version 3.0 of Protocol Buffers. The updated implementation would look as follows {% cite HelloWorldProto %}: +Thus the language had to be updated to support gRPC and the development of a service message with a request and a response definition was added for version version 3.0.0 of Protocol Buffers. The updated implementation would look as follows {% cite HelloWorldProto %}: ``` // The request message containing the user's name. @@ -100,7 +100,7 @@ service Greeter { } ```

- Figure 4: Protocol Buffer version 3.0 representing a message data-structure with the accompanied RPC definition. + Figure 4: Protocol Buffer version 3.0.0 representing a message data-structure with the accompanied RPC definition.

Notice the addition of a service, where the RPC call would use one of the messages as the structure of a Request with the other being the Response message format. @@ -171,13 +171,30 @@ The connection can be asynchronous and bi-directionally streaming so that data i The Transport Layer performs the retrieval and placing of binary protocol on the wire. For gRPC-Java has three implementations, though a user can implement their own: Netty, OkHttp, and inProcess. -

3... gRPC Java

+

3.5 gRPC Java

The Java implementation of gRPC been built with Mobile platform in mind and to provide that capability it requires JDK 6.0 to be supported. Though the core of gRPC is built with data centers in mind - specifically to support C/C++ for the Linux platform - the Java and Go implementations are two very reliable platform to experiment the microservice ecosystem implementations. -

3... Downloading gRPC Java

+

3.5.1 Downloading gRPC Java

-The easiest way to download the gRPC-Java implemenation is by performing the following command: +The easiest way to download the gRPC-Java implementation is by performing the following command: + +``` +git clone -b v1.0.0 https://github.com/grpc/grpc-java.git +``` + +Next compile on a Windows machine using Gradle using the following steps - and if you are using any Firewall software it might be necessary to temporarily disable it while compiling gRPC-Java as sockets are used for the tests: + +``` +cd grpc-java +set GRADLE_OPTS=-Xmx2048m +set JAVA_OPTS=-Xmx2048m +set DEFAULT_JVM_OPTS="-Dfile.encoding=utf-8" +echo skipCodegen=true > gradle.properties +gradlew.bat build -x test +cd examples +gradlew.bat installDist +```

3... Hello World Demonstration

-- cgit v1.2.3