1.grpc的相关知识点,下面先看一遍先
Before you begin
Prerequisites
JDK
: version 7 or higher
Download the example
You’ll need a local copy of the example code to work through this quickstart. Download the example code from our Github repository (the following command clones the entire repository, but you just need the examples for this quickstart and other tutorials):
$ # Clone the repository at the latest release to get the example code:
$ git clone -b v1.13.1 https://github.com/grpc/grpc-java
$ # Navigate to the Java examples:
$ cd grpc-java/examples
Run a gRPC application
From the examples
directory:
-
Compile the client and server
$ ./gradlew installDist
-
Run the server
$ ./build/install/examples/bin/hello-world-server
-
In another terminal, run the client
$ ./build/install/