about grpc's architecture

61 views
Skip to first unread message

Tao Wang

unread,
Apr 12, 2021, 6:29:27 PM4/12/21
to grpc.io
Hi,

I am trying to look into the source code of grpc. Is there any suggestion or documentation on gRPC's threading model or network model?

Lidi Zheng

unread,
Apr 12, 2021, 6:40:53 PM4/12/21
to Tao Wang, grpc.io
Here's a thorough talk about gRPC internals: gRPC Deep Dive – Sree Kuchibhotla & Jayant Kolhe, Google https://www.youtube.com/watch?v=S7WIYLcPS1Y

On Mon, Apr 12, 2021 at 3:29 PM Tao Wang <tao.wa...@gmail.com> wrote:
Hi,

I am trying to look into the source code of grpc. Is there any suggestion or documentation on gRPC's threading model or network model?

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/30946a1c-4a19-4307-9ca0-ebe5ae551ca9n%40googlegroups.com.

Tao Wang

unread,
Apr 13, 2021, 5:12:29 PM4/13/21
to grpc.io
Thanks for the link. The architecture of c core is quite clear. Where do you recommend to start with the source code?

Tao Wang

unread,
Apr 15, 2021, 4:58:04 PM4/15/21
to grpc.io
I started looking into cpp helloworld example (mostly from client side). Basically, client creates a channel and associated filter first (at this time, the connection is not established) and does a unary RPC.

It seems to be confusing to me that when does client truly connects with the server side.

I traced down to https://github.com/grpc/grpc/blob/master/src/core/lib/surface/call.cc#L630 but still can not figure out (1) when the real connection is initialized (2) when resolver and load balancer comes into place.

BTW, how does the grpc threading model works generally, it seems that a lot operations are done in the main thread by using exec_ctx.

Any suggestion will be appreciated. Thanks!

Sanjay Pujare

unread,
Apr 15, 2021, 5:36:57 PM4/15/21
to Tao Wang, grpc.io
Reply all
Reply to author
Forward
0 new messages