grpc_cb
grpc_cb copied to clipboard
How to implement a chat application using grpc in c++?
Hello, it is really amazing to meet your repo!!! I have been thinking about one way to implement a chat application(both server and multiple clients) using GRPC in c++, in which once the server receives a message from one of the clients, it should push the message to all of the other clients, who will show the message in its own window. That means the clients should listen/monitor the message from the server, and show the message in the window once receiving it, which means one way like callback for the incoming message is needed here.
However, GRPC doesn't support the callback mechanism, It troubles me a lot. So I turn to the Internet and found that. many people mentioned that the bidirectional streaming RPC which supported by GRPC should be used as one way to achieve this, and I found this tutorial on youtube: https://www.youtube.com/watch?v=5tmPvSe7xXQ&feature=youtu.be&t=1843 (begins at around 30:00), it tells me how to implement a chat application in Java, but are there any ways to implement a chat application like that in C++?
In another word, is there exists one way to implement the observer pattern using GRPC in C++?
If you do know about how, please reply to me. Thanks!
See example RouteGuide.RouteChat().