Hi,
Recently, I have been looking into the sync and async api of gRPC (C++) and how to choose between them for my usage. While gRPC has excellent documentation and examples overall, I found this area a bit lacking. So I had to go through a lot of past forum posts (and post some myself) for gaining insights on the subject. I am attaching a doc here that details the difference between the two model. People might find useful when trying to make their decision.
In addition, I implemented a set of classes that makes working with async API on server a bit easier from application code point of view. The example/test code I found would often ignore the error handling or do streaming calls in a way that hardly resembles how you might do things in your application. I realize the importance of existing example code as it is simple to start with however I feel a more complex example is also warranted. Using those utility classes, I went ahead and implemented the routeguide server example in a fully async fashion. So I am attaching that code as well in the hope that it is something other people can benefit from. May be it could become part of example code in gRPC codebase?
The code is commented as much as I deemed necessary. I have also stress tested it with multiple threads from the client and abrupt client process exit. I am also attaching the client stress test code but that bit isn’t substantially different from the existing example code around client (apart from adding some threading stuff).
Thanks.
--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/DuBDpK96B14/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/e3409785-154c-4530-b6dc-78ca3f0d9520%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.