The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
|
10 years ago | |
---|---|---|
.. | ||
android | 10 years ago | |
src/main/java/ex/grpc | 10 years ago | |
README.md | 10 years ago | |
javatutorial.md | 10 years ago | |
pom.xml | 10 years ago | |
run_greeter_client.sh | 10 years ago | |
run_greeter_server.sh | 10 years ago |
README.md
gRPC in 3 minutes (Java)
BACKGROUND
For this sample, we've already generated the server and client stubs from helloworld.proto.
PREREQUISITES
-
- this is needed to install Netty5, a dependency of gRPC, and to build this sample
INSTALL
1 Clone the gRPC Java git repo
$ cd <path/to/your/working_dir>
$ git clone https://github.com/grpc/grpc-java
2 Install gRPC Java, as described in How to Build
$ # from this dir
$ cd grpc-java
$ # follow the instructions in 'How to Build'
3 Clone this repo, if you've not already done so.
$ cd <path/to/your/working_dir>
$ git clone https://github.com/grpc/grpc-common
$ cd grpc-common/java # switch to this directory
4 Build the samples
$ # from this directory
$ mvn package
TRY IT!
- Run the server
$ # from this directory
$ ./run_greeter_server.sh &
- Run the client
$ # from this directory
$ ./run_greeter_client.sh