Implement connectivity API for channels
jtattermusch opened this issue · 3 comments
(as supported by Grpc.Core).
This new .NET 5 feature could be the key for making it possible to support this: dotnet/runtime#1793
The language-agnostic spec:
https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md
Triage Notes: @JamesNK will do a little investigating, but we are likely to be blocked on some limitations of the HttpClient APIs which may not be able to land for 5.0. Putting this in 5.0 for now to track and review as we get more clarity.
I have emulated this behaviour by less granular information, observed by existing communication. If anybody would like to have a look at this implementation just let me know.
My implementation is compatible with https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md. I have emulated only allowed transitions specified by documentation (see table in documentation) and have skipped those transitions that I can not emulate right now (eg. my implementation can not make transitin from READY to IDLE, because I don't track inforamtion if "emulated subchannel" is used or not).
What it gives me? It allowed me to port load balancing from gRPC Java to gRPC dotnet. Moreover, in the future when HttpClient would allow to get even more information I would simply swap emulation extension-points with real "OnEvent" implementation. All existing implementation will stay unbroken.