occlum/demos/grpc/grpc_glibc
2022-07-07 09:34:38 +08:00
..
.gitignore Add gRPC glibc demo and stress test 2022-03-04 11:37:13 +08:00
download_and_install_grpc_glibc.sh Enhance the script of demos to support re-execute and other OS 2022-07-07 09:34:38 +08:00
grpc_client_glibc.yaml Add gRPC glibc demo and stress test 2022-03-04 11:37:13 +08:00
grpc_server_glibc.yaml Add gRPC glibc demo and stress test 2022-03-04 11:37:13 +08:00
prepare_client_server_glibc.sh Enhance the script of demos to support re-execute and other OS 2022-07-07 09:34:38 +08:00
prepare_stress_test_tool.sh Enhance the script of demos to support re-execute and other OS 2022-07-07 09:34:38 +08:00
README.md Add gRPC glibc demo and stress test 2022-03-04 11:37:13 +08:00
run_client_on_occlum_glibc.sh Add gRPC glibc demo and stress test 2022-03-04 11:37:13 +08:00
run_server_on_occlum_glibc.sh Add gRPC glibc demo and stress test 2022-03-04 11:37:13 +08:00
run_stress_test.sh Add gRPC glibc demo and stress test 2022-03-04 11:37:13 +08:00

Run gRPC C++ Client/Server on Occlum

Step 1:

Download, build and install cares, protobuf and gRPC:

./download_and_install_grpc_glibc.sh

Step 2:

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

./prepare_client_server_glibc.sh

Step 3:

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

./run_server_on_occlum_glibc.sh

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

./run_client_on_occlum_glibc.sh

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

Run gRPC stress test by ghz

Step 1:

Prepare the stress test tool:

./prepare_stress_test_tool.sh

Step 2:

Run the demo server which listen on port 50051 on Occlum:

./run_server_on_occlum_glibc.sh

Then you can run the stress test through:

./run_stress_test.sh [-n <total_requests>] [-c <concurrent_workers>]