I'm trying to find the actual value-add here. This feels like TPL but with more steps. Why do we need to serialize the jobs through a Channel ? Couldn't we just do Task.Run and let the runtime take care of scheduling our work?
You have no control over concurrency/scheduling, have to manage scoping, error handling, etc. TPL/Threads add to much low level noise to the logic. Like you could easily blow up the thread pool depending on what you are doing, where a channel based implementation would just deal with spillover and not affect the other threads. You can easily capture scoped services that are disposed by the time the thread executes -…
Fast and observable background job processing for .NET
11–20 of 26 posts
Re: Fast and observable background job processing for .NET
#12This seems to be a thin abstraction over Channels, I'd probably prefer to use Channels directly in almost all cases. I really like Channels for in-memory queues like this, they're very nice and it's easy to make everything parallel. But if you need more than this you usually need persistence, and then you need something else entirely.
Re: Fast and observable background job processing for .NET
#13I'm trying to find the actual value-add here. This feels like TPL but with more steps. Why do we need to serialize the jobs through a Channel ? Couldn't we just do Task.Run and let the runtime take care of scheduling our work?
You have no control over concurrency/scheduling, have to manage scoping, error handling, etc. TPL/Threads add to much low level noise to the logic. Like you could easily blow up the thread pool depending on what you are doing, where a channel based implementation would just deal with spillover and not affect the other threads. You can easily capture scoped services that are disposed by the time the thread executes -…
https://learn.microsoft.com/en-us/dotnet/api/system.threadin...
Re: Fast and observable background job processing for .NET
#14This seems to be a thin abstraction over Channels, I'd probably prefer to use Channels directly in almost all cases. I really like Channels for in-memory queues like this, they're very nice and it's easy to make everything parallel. But if you need more than this you usually need persistence, and then you need something else entirely.
It is a thin abstraction over Channels, and that’s by design. What it adds is graceful shutdown handling, OpenTelemetry integration, timeout support, and simple configuration. I kept needing those pieces in almost every project, so wrapping them up into a small reusable library felt worthwhile.
Re: Fast and observable background job processing for .NET
#15Re: Fast and observable background job processing for .NET
#16If you are running a web service, does this provide any advantages to BackgroundService? https://learn.microsoft.com/en-us/aspnet/core/fundamentals/h...
Re: Fast and observable background job processing for .NET
#17This seems to be a thin abstraction over Channels, I'd probably prefer to use Channels directly in almost all cases. I really like Channels for in-memory queues like this, they're very nice and it's easy to make everything parallel. But if you need more than this you usually need persistence, and then you need something else entirely.
It is a thin abstraction over Channels, and that’s by design. What it adds is graceful shutdown handling, OpenTelemetry integration, timeout support, and simple configuration. I kept needing those pieces in almost every project, so wrapping them up into a small reusable library felt worthwhile.
Re: Fast and observable background job processing for .NET
#18How is it different from hangfire?
Hangfire is primarily a job scheduler. It is designed for running jobs at specific times or intervals, and it persists jobs in a database so they survive restarts. It comes with a dashboard, retries, and a lot of infrastructure around long‑term job management. That makes it powerful, but also heavier in terms of setup and overhead. BusyBee is focused on lightweight background processing. Everything is in‑memory, with…
Re: Fast and observable background job processing for .NET
#19I'm trying to find the actual value-add here. This feels like TPL but with more steps. Why do we need to serialize the jobs through a Channel ? Couldn't we just do Task.Run and let the runtime take care of scheduling our work?
I wish TPL Dataflow was more known.