Open meghuizen opened 3 months ago
Looks indeed interesting, but need to understand its component model first. It seems to me that it's possible to integrate Hangfire with its current capabilities, since Aspire is likely using ASP.NET Core infrastructure, so it is likely to see the logs in Aspire dashboard anyway. But more detailed integration would be useful to have.
We should make this simpler - we should add the ability for Hangfire to simply use a DB on the container provide by aspire. Do do this it needs to be able to install the DB seamlessly:
Hangfire Project: builder.AddSqlServerClient("BackgroundJobsDb");
Aspire:
var sqldbserver = builder.AddSqlServer("DbServer");
var backgroundjobsdb = sqldbserver.AddDatabase("BackgroundJobsDb");
builder.AddProject
This way the Db gets installed on the local development container and initialized with the schema. Then, this simplifies deployment to Azure.
Let's not forget Aspire provides packages for the client too. So all the goodies like OpenTelemetry, Health Checks, and more are expected to be provided out-of-box.
What I think would be a killer combo is having Hangfire integration in Aspire. The scenario I would like to see is that you have Aspire running with multiple Hangfire workers on different projects running in Aspire. The Hangfire dashboard as plugin part of the Aspire dashboard, which will give an overview on all the Hangfire jobs on all the Hangfire workers running in Aspire. Also the telemetry and logging being visible from Aspire.