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
In TrueLayer/ginepro#39 we discovered that tonic's Channel::balance_channel only does random distribution.
We would like to experiment with enabling other Load implementations in the discovery in tower::Balance, but this requires us to re-implement Connection
Such that it returns a stream of Connection. This would require Connection to be stabilised, but no methods to be exposed apart from Service and Load.
DynamicServiceStream<K: Hash + Eq + Clone> is then just a type alias for this, taking a channel Receiver as the Discover impl (potentially with a .map(Ok) on the stream).
Alternatives
Expose Connection as a fully stable type with stable methods to construct the connection from a hyper connection.
The text was updated successfully, but these errors were encountered:
Would it make sense for ginepro to just use tower balance directly and to implement some of the transport features? I'd like to nix all of the transport module in the future so I am weary of adding new things to it.
I know its not ideal but I think ginepro could be a good place to have a load balanced channel impl of its own that kinda follows what tonic does. I hope in the future I we can 1) make tower easier to config so you can make these changes 2) provide a better thick client that isn't grpc specific but has more config options. Basically extract what we have now but build it better lol
Feature Request
Crates
tonic
Motivation
In TrueLayer/ginepro#39 we discovered that tonic's
Channel::balance_channel
only does random distribution.We would like to experiment with enabling other
Load
implementations in the discovery intower::Balance
, but this requires us to re-implementConnection
Proposal
Make a type that has a generic parameter of
Such that it returns a stream of
Connection
. This would requireConnection
to be stabilised, but no methods to be exposed apart fromService
andLoad
.DynamicServiceStream<K: Hash + Eq + Clone>
is then just a type alias for this, taking a channelReceiver
as theDiscover
impl (potentially with a.map(Ok)
on the stream).Alternatives
Expose
Connection
as a fully stable type with stable methods to construct the connection from a hyper connection.The text was updated successfully, but these errors were encountered: