async streaming server question

60 views
Skip to first unread message

Jeff

unread,
Mar 14, 2019, 3:45:53 PM3/14/19
to grpc.io
Hello all,
I have noticed in my testing of an async server streaming messages to multiple sync clients that the server does not serve all clients uniformly. There are long stretches where the server will write only to one client, and then there are stretches where the server will server clients more evenly. I am using only one completion queue; not sure if using more will help somehow.
Does anyone have any insight into this? All code is in C++. Thanks.

x.pa...@gmail.com

unread,
Mar 17, 2019, 5:22:46 AM3/17/19
to grpc.io
Hello,

Sorry I answer to your question without really answering but it seems that what you are doing is exactly what I want to do (I want to create a chat server for multiple clients and broadcast message of one client to others).
Do you use only one stream or one stream per client (thread) ?
If multiple streams, is it then possible to have a client-thread waiting for a message but having another thread writing on the stream ?

If I succeed I'll see if I face the same issue as you.

Thanks.

Jeff

unread,
Mar 17, 2019, 2:11:16 PM3/17/19
to grpc.io
This forum is a little sad. I posted like 5 reasonable questions and the only dude to reply to me actually replied with more questions of his own. This place is where grpc questions go to die. Anyway man all I can say is follow the examples that they have laid out in there grpc/examples directory after you download the project from git. There examples are rather anemic and their documentation too high level to offer serious insights into how grpc core is functioning and how the wrappers use it to get stuff done, but it is open source so if you have a few weeks you could reverse engineer much of it, in theory. Best of luck.
Reply all
Reply to author
Forward
0 new messages