Boost PC performance: How more available memory can improve productivity
Hang fire
1.
2. An easy way to perform background processing in .NET and
.NET Core applications.
NoWindows Service or separate process required.
Easy way to perform fire-and-forget, delayed and recurring
jobs inside ASP.NET applications.
Provides a unified programming model to handle background
tasks in a reliable way
Run them on shared hosting, dedicated hosting or in cloud.
3. Requirements
.NET Framework 4.5
Persistent storage (listed below)
Newtonsoft.Json library ≥ 5.0.1
Hangfire is available as a NuGet package.
install it using the NuGet Package Console window:
PM> Install-Package Hangfire
4. Supports all kind of background tasks
Short-running and long-running
CPU intensive and I/O intensive
One shot and recurrent.
5. FIRE-AND-FORGET
These jobs are executed only once and almost immediately after they fired.
DELAYED
Delayed jobs are executed only once too, but not immediately – only
after the specified time interval.
RECURRING
Recurring jobs fired many times on the specified CRON schedule.
CONTINUATIONS
Continuations are executed when parent job has been finished.
6. BATCHES
Batch is a group of background jobs created atomically.
BATCH CONTINUATIONS
Batch continuation is fired when all background jobs in a parent
batch finished.
BACKGROUND PROCESS
Use them when a background processes run continuously through
out the lifetime of an application.
7.
8.
9.
10. Easy to setup.
NoWindows Service, noWindows Scheduler, no separate applications
required.
Background jobs are created in a persistent storage
Auto handling exception
Can use Hangfire on different machines to get more processing power
with no configuration
synchronization is performed automatically.
You don't need to perform manual storage clean-up – Hangfire keeps it
as clean as possible and removes old records automatically.
Notas del editor
Currently the following storages are supported:
he client will create the jobs and control is return to the caller after hangfire serailizes json format and saves it to the storage. The application pools and server can restarted as it is maintained in a persistent storage, the jobs will be surive after the server/application restarts. The hangfire server will process the background jobs with a decidated background thread, it will fetch the jobs from the storage and starts process based on the job type.