Simple applications to learn gRPC with C++. The server interface is built into a separate library, used by both the server and the clients. Contains both synchronous and asynchronous examples as well as server streaming support.
lotr
- application hosting gRPC services.lotr-proto
- library with the gRPC interface.sync-client
- application with the most basic synchronous client.async-client
- asynchronous application with streaming support.utils
- library with some common types.cmake
- some CMake helpers.presentation
- slides describing the gRPC concepts used.
We use the Conan package manager to get the required third parties,
such as gRPC
, boost
and fmt
.
We need python to use conan.
python3 -m venv penv
source penv/bin/activate
pip install -r requirements.txt
Install the external libraries.
./install_deps.sh
Build all applications
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../deps/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8
and run the server
./bin/lotr
and the clients
./bin/sync-client
./bin/async-client
Game on!