You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICT, this implies that at present the server has no universal built-in way to detect when an RPC completes, regardless of reason. Thus resource cleanup cannot occur.
Per discussion in #1117 (comment) that there was a proposal to add a done signal and a settled signal. One I believe would always fire, and the other only on success. (As an aside, I'll share that the naming of those signals is not intuitive. Maybe settled and success would have been better?)
My concern is that without a mechanism for detecting doneness in all cases, resource cleanup will be very hard for developers, and they'd have to make their own try/catch wrappers... and that still might pose challenges if an interceptor crashes out of their control.
For reference, gRPC has discussed this in the past, and they made the overall decision that there's only one signal, which fires regardless of how the RPC ends: grpc/grpc-node#2771
I like the gRPC approach because it's simple and catches the most important usecase (cleanup).
I'd propose that before v2 leaves beta we either:
ensure that we've added both signals to all contextes -- which will cost more overhead -- , or
mirror gRPC behavior (aka, your v1 behavior) and only provide one signal that always fires. if people want special behavior (success-only signals), then they can write an interceptor themselves?
Thanks!
The text was updated successfully, but these errors were encountered:
In the changelog of v2.0.0-beta.1 I saw:
AFAICT, this implies that at present the server has no universal built-in way to detect when an RPC completes, regardless of reason. Thus resource cleanup cannot occur.
Per discussion in #1117 (comment) that there was a proposal to add a
done
signal and asettled
signal. One I believe would always fire, and the other only on success. (As an aside, I'll share that the naming of those signals is not intuitive. Maybesettled
andsuccess
would have been better?)My concern is that without a mechanism for detecting doneness in all cases, resource cleanup will be very hard for developers, and they'd have to make their own try/catch wrappers... and that still might pose challenges if an interceptor crashes out of their control.
For reference, gRPC has discussed this in the past, and they made the overall decision that there's only one signal, which fires regardless of how the RPC ends: grpc/grpc-node#2771
I like the gRPC approach because it's simple and catches the most important usecase (cleanup).
I'd propose that before v2 leaves beta we either:
Thanks!
The text was updated successfully, but these errors were encountered: