Install Sample gRPC Services Locally

Updated 3 months ago by Rahul Lahiri

Follow the steps below to set up the example gRPC service provided.

git clone
cd grpc-route-guide/
git checkout -t origin/grpc-route-guide-multi
ls -l

You should see the following files in the directory:

rwxr-xr-x    8 venky.ganti  staff   256 Feb 15 22:12
drwxr-xr-x+ 113 venky.ganti  staff  3616 Feb 15 22:11 ..
drwxr-xr-x   13 venky.ganti  staff   416 Feb 15 22:12 .git
-rw-r--r--    1 venky.ganti  staff    17 Feb 15 22:12 .gitignore
drwxr-xr-x   10 venky.ganti  staff   320 Feb 15 22:38 .idea
-rw-r--r--    1 venky.ganti  staff   780 Feb 15 22:12 load_balancer_service.yaml
drwxr-xr-x    8 venky.ganti  staff   256 Feb 15 22:17 route-guide
drwxr-xr-x    7 venky.ganti  staff   224 Feb 15 22:17 route-guider

The code includes two services, Route-guide and Route-guider. Route-guide calls Route-guider service to get the location details based on the latitude and longitude coordinates.

  • Open the following two projects. We will use IntelliJ but any IDE should be fine. Add route-guide and route-guider as maven projects.
    Mvn install – specify the jdk (java 11)

The maven install will install the protobufs from the files in the project.

  • Run the RouteGuideServer. It will be listening on port 8980, by default.
  • Run the GuiderServer also like we did for the RouteGuideServer. (Note: if these processes were already running you can use lsof -i:8980 or lsof -i:8981 to find the pid and kill them if you want to restart. Or, change the port numbers in code,,

How did we do?