Open smolchanovsky opened 2 years ago
So.. correct me if i'm wrong. Implementation of this feature required an additional optional package like "NClient.ServiceDiscovery" with... i dunno.. something class fit to the next signature
interface IServiceRegistryProvider {
Task DiscoverAsync (IHostProvider hostProvider); //basically scan all instances of remote service (or maybe just read all IPs from config, etc..)
Task<IResponseContext<TRequest, TResponse>> ExecuteAsync<TRequest, TResponse>(IRequest request, IResiliencePolicy<TRequest, TResponse>? resiliencePolicy, CancellationToken cancellationToken = default); // execute request after load balance process and define most fit instance of remote service.
}
And... we should inject as an optional that class to transport layer somehow.
If serviceRegistryProvider is not null then use it
Am I right? I think logic for discovery any instances of remote sevices could be too tangled, so we musn't make this component is required.
Well.. I think I'll take this after hostProvider
@smolchanovsky
There are two issues (#436 and #438) here that look like they could be combined with #448 and current issue in one new pkg on the code layer and "epic" on the task layer.
I would like to be able to implement the client-side service discovery pattern.