Am Freitag, 12. Oktober 2018 22:53:15 UTC+2 schrieb Arpit Baldeva: > > Feel free to take a look at this thread - > https://groups.google.com/d/topic/grpc-io/T9u2TejYVTc/discussion > > I attached a C++ implementation of the RouteGuide Async server there. That > code avoids lot of boiler plate and integrates nicely with any threading > architecture you want. The code was written more than 1 year ago. I have a > variation of that (mostly for hooking up our custom application) but the > fundamentals are the same (meaning that sample code works in production). > > Thanks for posting, I had found this already and took a great deal of info from it. Gotta say though, as much as I like the neat sync interface of gRPC, the async variant comes as a bit of a disappointment to me. Specifically the Next() function. The way I see it, the system already knows the type of call coming in, as it obviously instantiates the correct call object fitting to the RequestMyMethod() call. Why it chooses to discard that type information entirely and hand out a void * without any hint is beyond me. Some kind of gRPC inherent mechanism to know the type seems imperative to me. Perhaps an easy to use base class for the calls? If you excuse my criticism, looking at the code now, I can barely see the advantage of using gRPC at all. I have multiple other interfaces in my system that use pure protobuf request and response objects and send them over all kinds of interfaces. For the network services I have used sync gRPC on top because it gave me a nice interface and the method resolution. Without these advantages, I might as well go for a plain old beast or asio async socket and send protobuf objects back and forth.
Still, thanks for your help tackling this! Stephan -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. 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/49ae9d8b-b455-41be-8812-b6296d4a8265%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
