Hi friends, and well wishes to anyone reading this post.

I'm currently working to instrument some kind of logging / tracing on the 
client side for our GRPC requests.

I've been reading this proposal 
<https://github.com/grpc/proposal/blob/master/L5-node-client-interceptors.md> 
and would like to level set some of my understandings so far.

So first--  the nature of a *client unary interceptor*, as I understand it, 
is that we can add modifications such as injecting client metadata before 
the request is sent to the server. 

The proposal mentions such things as "inbound" and "outbound" operations. 

*Question 1*: When a GRPC call is being made, are there two streams being 
opened? Outbound being the stream opened because of the request sent BY the 
client, and Inbound being the stream opened to *return* the result by the 
server? 

So, the listener methods such as `onReceiveMetadata(metadata, next)` are 
"inbound" in that sense? And it is correct to say that by the time we 
receive these inbound operations, whatever processing that is done within 
the function call is "done", and we are just intercepting the entirety of 
the response as it comes in?

*Question 2:* At the time of a call being made by the client, we can pass 
in interceptors like so: 
```
client.myCall(message, { interceptors: [interceptor] });
```
Is there a practical example for how someone might want to pass in a list 
of interceptors when a call is made? 

*Question 3:* In a scenario where the client thinks it sent a message, but 
the server never receives / acknowledges the request, what happens? (Maybe 
network went down because of network gremlins), would the pipe close with a 
stream timeout of `DEADLINE_EXCEEDED` error code? 

*Question 4:* Similar to this question, 
<https://github.com/grpc/grpc-go/issues/3492> in the scenario where the 
stream is not closed but the message is never received by the client- a way 
to "triage" this would be to add timers earlier in the interceptor stack, 
and see that the listener method "onRecieveMessage()" for example, was 
never called.

Feedback, pointers, and links towards any extra reading would all be 
appreciated!

Thanks,
Rachel
 




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/f739dff2-c37d-478a-a499-ff79a8640c05n%40googlegroups.com.

Reply via email to