gRPC building server and client

35 views
Skip to first unread message

qplc

unread,
Sep 18, 2018, 6:58:42 AM9/18/18
to grpc.io
HI,

NettyServerBuilder while constructing grpc server:
The primary difference between boss and worker event loop group. What is the role of executor, boss and worker event loop group while constructing NettyServerBuilder?

NettyChannelBuilder while constructing grpc client:
What is the role of executor and event loop group? How are they different from each other?

Does the executor persist same role in building grpc server or client?

Can someone clear above doubts?

Regards,
qplc

Carl Mastrangelo

unread,
Sep 18, 2018, 8:26:30 PM9/18/18
to grpc.io
The boss loop determines which threads can call accept() (in low level networking terminology), while the worker loop does the reads and writes.  They boss loop can be the same as the worker loop. This is the default.

The executor runs the ClientCall.Listener and ServerCall.Listener callbacks .  It is more important to set the executor.  The event loops are more for advanced users, and they require being familiar with Netty.  

Hope this helps!
Reply all
Reply to author
Forward
0 new messages