occlum/demos/golang/grpc_pingpong
2021-04-16 09:34:26 +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 Update golang version to 1.16.3 2021-04-16 09:34:26 +08:00
ping.go Update golang version to 1.16.3 2021-04-16 09:34:26 +08:00
pong.go Update golang version to 1.16.3 2021-04-16 09:34:26 +08:00
prepare_ping_pong.sh Update golang version to 1.16.3 2021-04-16 09:34:26 +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 Fix golang grpc and local attestation demo to align with occlum 0.16.0 2020-09-20 10:39:54 +08:00
run_pong_on_occlum.sh Fix golang grpc and local attestation demo to align with occlum 0.16.0 2020-09-20 10:39:54 +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.