occlum/demos/golang/grpc_pingpong
2020-09-02 17:06:09 +08:00
..
pingpong Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
.gitignore Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
go.mod Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
ping.go Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
pong.go Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
prepare_ping_pong.sh Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
README.md Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
run_ping_on_occlum.sh Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
run_pong_on_occlum.sh Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00

Use Golang and gRPC with Occlum

This project demonstrates how Occlum enables Golang programs with gRPC calls running in SGX enclaves. The client program invokes a gRPC call with a ping message, and receives a pong message sent by the server program.

Step 1: Build the Golang gRPC application using the Occlum Golang toolchain via

./prepare_ping_pong.sh

Step 2: Run the gRPC server demo on Occlum via

./run_pong_on_occlum.sh

The gRPC server should now start to listen on port 8888 and serve incoming requests.

Step 3: Run the gRPC client demo on Occlum via

./run_ping_on_occlum.sh

After the reply message is received, the latency incurred during a gRPC call will be printed out.