Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side service discovery #450

Open
smolchanovsky opened this issue Jul 23, 2022 · 3 comments
Open

Client-side service discovery #450

smolchanovsky opened this issue Jul 23, 2022 · 3 comments

Comments

@smolchanovsky
Copy link
Member

I would like to be able to implement the client-side service discovery pattern.

@Kingmidas74
Copy link
Member

Kingmidas74 commented Sep 3, 2022

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.

@Kingmidas74
Copy link
Member

Well.. I think I'll take this after hostProvider

@Kingmidas74 Kingmidas74 self-assigned this Sep 15, 2022
@Kingmidas74
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants