gRPC c++ async server vs sync server

535 views
Skip to first unread message

er.z...@gmail.com

unread,
Aug 16, 2018, 3:27:47 AM8/16/18
to grpc.io
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 ?


Noah Eisen

unread,
Aug 16, 2018, 10:33:06 AM8/16/18
to er.z...@gmail.com, grpc.io
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

--
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 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/f030c64c-18b1-402a-bd01-5e7edbcaf16f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

er.z...@gmail.com

unread,
Aug 16, 2018, 11:00:52 AM8/16/18
to grpc.io
Thanks for your answer.
Reply all
Reply to author
Forward
0 new messages