Two Dashboards in one Web application
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 354
Description
I have the need to include two Orleans Dashboards in one single Web Application (separate hosting). Each dashboard is supposed to display information from a different silo (both silos are different applications doing different stuff).
I was able to do this in v.8.2.0, using old OrleansDashboard library. I simply wrote a wrapper that is able serve two different clients and mapped two endpoints in my Startup.cs, like this:
```
public void ConfigureServices(IServiceCollection services)
{
...
services.AddTransient(c => c.GetRequiredService().GetClient());
services.AddServicesForSelfHostedDashboard(options => { options.HideTrace = true; });
...
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
var wrapper = app.ApplicationServices.GetRequiredService();
wrapper.SwitchToSilo1Client();
app.Map("/Utils/Silo1Dashboard", m =>
{
m.UseOrleansDashboard(new OrleansDashboard.DashboardOptions { Port = 8080 } );
});
wrapper.SwitchToSilo2Client();
app.Map("/Utils/Silo2Dashboard", m =>
{
m.UseOrleansDashboard(new OrleansDashboard.DashboardOptions { Port = 8081 } );
});
...
}
```
Unfortunately, I have no clue how to do this in 10.0 using Microsoft.Orleans.Dashboard package.
I was able to configure my silos to serve the dashboard data. But I do not know what do do with my Web App. Old extension methods are gone. New extension methods are tied to IClientBuilder.
I found this example for separate dashbord hosting:
https://github.com/dotnet/orleans/blob/main/playground/DashboardSeparateHost/README.md
But I do not see the way to extend it in any way to handle two clients and two dashboards.
Could anyone help me out?
Contributor guide
Research direction
Start with the DashboardSeparateHost README and the Microsoft.Orleans.Dashboard extension methods tied to IClientBuilder. Compare that setup with the two endpoint mappings and client switching shown in Startup.cs. Done means one web application can expose two dashboard paths, each displaying data from its corresponding silo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100