The async model give the application code full control over threading. Sync can handle multiple requests in parallel, yes, but they are serviced from a gRPC thread pool.
If you want finer control over threading, then async is the better model to use On Thu, Aug 16, 2018 at 12:27 AM <[email protected]> wrote: > I new to gRPC. I don't get the differences between sync and async server. > > In gRPC C++ example on [github][2]. The distinction in async and sync > isn't obvious. > > - According to this [question][1] and with my test, sync gRPC server can > handle parallele request. > - And in the asynchronous example the `server.Run();` is blocking. > > So What's the difference between both ? > > [1]: > https://stackoverflow.com/questions/45486733/simultaneous-grpc-clients-sync-async-server > [2]:https://github.com/grpc/grpc/tree/master/examples/cpp/helloworld > > -- > 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/f030c64c-18b1-402a-bd01-5e7edbcaf16f%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/f030c64c-18b1-402a-bd01-5e7edbcaf16f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPYwnkhdEVxfLzGrP-x6Z2zLmzZVM0FiJFe%2BEAGmOqS6JgMLKA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
