Overview
What is the pros and cons using gRPC with C++ in 2023?
Ramblings from the Viking who run the Cafe at the end of the universe.
Why am I writing this series? It happens that I want to use gRPC in my upcoming DNS server.
I have used gRPC in the past - with great pain. This time around I looked at some examples and made kind of an implementation - but I realized it was crap. To add injury to insult, there were simply too many things I did not know or understand properly to fix it. So I decided to spend some time to play with gRPC to get a better understanding.
It's said that you don't truly understand something until you can explain it to somebody else. That's my motivation to write this series of articles.
It's my hope that somebody, one day, might find it useful. The almost total lack of in-depth articles and blog posts about asynchronous gRPC for C++ suggest that either I'm a bit slow, or it's not used very much. At least not with streaming in one or both directions. That's a shame. gRPC is an awesome tool to build both massively scalable servers and fast micro-services in C++!
Note that the articles on this page are listed chronologically, oldest first.
What is the pros and cons using gRPC with C++ in 2023?
In the first iteration, we will deal with a traditional RPC call; it takes one input argument and returns one output value.
In the first iteration, we will deal with a traditional RPC call; it takes one input argument and returns one output value.
In this iteration of the server, we add incoming or outgoing streams of requests or replies. We are not yet ready to take on the bi-directional stream.
In this iteration of the client, we add incoming or outgoing streams of requests or replies. We are not yet ready to take on the bi-directional stream.
Here we implement all four operations, including the bidirectional stream rpc method RouteChat(). We also add more abstractions to minimize the code required for each request.
Here we implement all four operations, including the bidirectional stream rpc method RouteChat(). We re-use the abstractions we created in the previous article.
Here we will look into how to use the newer - and much nicer - callback interface.
Here we implement all four operations using the newer - and much nicer - callback interface.
Here we implement all four operations as actual - usable - methods with event-callbacks.
Here we implement a client using QT 6.8 with an interactive QML UI!