Skip to content

trueaywee/grpc_playground

 
 

Repository files navigation

grpc_playground

Objective

A relatively trivial example to:

  • Build a C++ project that uses gRPC.
  • By means of cmake, in a cross-platform way.
  • Gather and protoc-compile all the .proto files.
  • Build all the *.cc sources into the respective targets.
  • Employ a Makefile to have the "IDE" Vi-friendly with :mak.
  • Also, use googletest, from C5T/current, to test the above.

Usage

From an Ubuntu shell, just make should do the job. Run Debug/test_{smoke,add,mul} tests to confirm:

git clone https://github.com/dkorolev/grpc_playground.git && \
(cd grpc_playground; make && ./Debug/test_smoke && ./Debug/test_add)

Also, from Ubuntu, "opening" the CMakeLists.txt file with QT Creator should work too.

Finally, on Windows, "Open Folder" should work with the respective folder.

Caveats

First and foremost: The first "build" is slow, as it needs to:

  • Fetch ~300MB of gRPC code, and
  • Build this very gRPC code.

After this stage is done, the further builds (one-line changes) are quick.

Further Work

  • A Docker Container to build the above code.
  • With a pre-fetched, and perhaps pre-built gRPC.
  • Integrated with this repo via a GitHub action.
  • Performance tests.
  • And maybe compare performance of gRPC services across languages (C++ vs. JVM vs. Go).

Credits

About

C++ gRPC + cmake = <3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 69.8%
  • CMake 16.6%
  • Makefile 11.1%
  • Dockerfile 2.5%