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

API review for Service Discovery #789

Closed
danmoseley opened this issue Nov 13, 2023 · 5 comments
Closed

API review for Service Discovery #789

danmoseley opened this issue Nov 13, 2023 · 5 comments

Comments

@danmoseley
Copy link
Member

danmoseley commented Nov 13, 2023

Proposal: dotnet/aspnetcore#53715

@TimHess
Copy link

TimHess commented Nov 15, 2023

Has there been any planning or experimentation around providing a common interface for use with service registries that allow or even require the client to register, or is this feature expected to be limited in scope to the discovery side only?

Example registries would include at least Consul and Eureka

@codymullins
Copy link

@danmoseley is there any existing documentation around the Service Discovery API? This would be useful to have in situations where the client (e.g. Blazor WASM) needs to exchange the service name with the actual endpoint URL.

@danmoseley
Copy link
Member Author

@codymullins missed your comment sorry. @ReubenBond can describe what we have and what we plan.

@ReubenBond ReubenBond self-assigned this Nov 29, 2023
@ReubenBond
Copy link
Member

ReubenBond commented Nov 29, 2023

@TimHess good question. We considered it and decided that we would not add a common service registration interface in the initial release. It would be worthwhile to explore the idea, though, so if you'd like to open an issue with requirements and a proposal, that would be greatly appreciated.

@codymullins Aside from the API doc comments, there are the package READMEs and the conceptual docs: https://learn.microsoft.com/en-us/dotnet/aspire/service-discovery/overview

For your specific scenario, resolving backend services from a Blazor WASM app, you likely need some way to propagate the configuration to the Blazor WASM app. Aspire uses environment variables to configure service discovery. You can also use appsettings.json, which Blazor WASM loads from wwwroot (docs: https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/configuration?view=aspnetcore-8.0). The abovementioned README shows how you can configure service discovery in your appsettings.json file in this section: https://github.com/dotnet/aspire/tree/main/src/Microsoft.Extensions.ServiceDiscovery#resolving-service-endpoints-from-configuration. I hope that helps.

@davidfowl
Copy link
Member

Putting this in preview4

@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants