occlum/demos/grpc
LI Qing f9df83f559 Fix the demo's compiling failure in some cases
Some demos based on CMake may search installed packages out of
Occlum toolchain's directory, this could cause some building
errors sometimes. By setting the $PKG_CONFIG_LIBDIR, we can make
CMake searching for packages in Occlum toolchain's directory only.
2020-04-15 14:14:00 +08:00
..
.gitignore Add gRPC demo 2019-12-13 12:17:55 +00:00
download_and_install_grpc.sh Fix the demo's compiling failure in some cases 2020-04-15 14:14:00 +08:00
download_and_install_openssl.sh Polish gRPC and remote attestation demos 2020-01-23 04:40:54 +00:00
Makefile.patch Add gRPC demo 2019-12-13 12:17:55 +00:00
prepare_client_server.sh Polish gRPC and remote attestation demos 2020-01-23 04:40:54 +00:00
README.md Add gRPC demo 2019-12-13 12:17:55 +00:00
run_client_on_host.sh Polish gRPC and remote attestation demos 2020-01-23 04:40:54 +00:00
run_client_on_occlum.sh Polish gRPC and remote attestation demos 2020-01-23 04:40:54 +00:00
run_server_on_host.sh Polish gRPC and remote attestation demos 2020-01-23 04:40:54 +00:00
run_server_on_occlum.sh Polish gRPC and remote attestation demos 2020-01-23 04:40:54 +00:00

Run gRPC C++ Client/Server on Occlum

Step 1:

Downlaod, build and install openssl into /usr/local/occlum/x86_64-linux-musl/lib:

./download_and_install_openssl.sh

Step 2:

Download, build and install cares, zlib, protobuf and finally gRPC into /usr/local/occlum/x86_64-linux-musl/lib:

./download_and_install_grpc.sh

Step 3:

Prepare the gRPC C++ Hello World sample project, which consists of a client and server:

./prepare_client_server.sh

Then you can see the source code in client and server if you want.

Step 4:

Run the demo server which will listen on port 50051 on occlum:

./run_server_on_occlum.sh

or on host:

./run_server_on_host.sh

Then you can invoke gRPC service by running client in a different terminal on occlum:

./run_client_on_occlum.sh

or on host:

./run_server_on_host.sh

And you will see the "Greeter received: Hello world" in the client side output.