Hangfire: Rag Dhiman
Hangfire: Rag Dhiman
Rag Dhiman
@ragdhiman
Background Job
Some .Net code which needs to be run in the
background because running it on the main thread is
not appropriate; Due to its nature or due to a specific
requirement.
Hangfire
Is an open-source framework that helps you to create,
process and manage your background jobs in a reliable
way.
Demo
Hangfire
- Without
- With
Course Overview
Hangfire Server
3. Fetch next
Hangfire Client
2. Return to a
caller
4. Perform in
background
1. Create a job
Job Storage
Installing Hangfire
Route Delivery Application
- ASP.Net MVC web application
Demo
- Generates delivery schedules based on:
- Drivers
- Customers
- Deliveries
- Optimization request to generate
delivery schedules (long running task)
Route Delivery Application
Drivers Driver
UnitOfWork
Customers Customer
Hangfire Hangfire
Client Server Hangfire
Storage
Hangfire Integration
Single Process
Application
Hangfire Job
Storage Hangfire Application
Web Garden
Web Application 1
Hangfire Application
Web Application N
Hangfire Job
Storage
Hangfire Application
Web Farm
Web Application 1
Hangfire Application
Server 1
Web Application N
Hangfire Job
Storage DB Server
Hangfire Application
Server N
Separate Service
Application
Hangfire Web
Client Application
Windows Service
Hangfire Job
Storage
Hangfire Server
Separate Server
Hangfire Web
Client Application
App Server
Windows Service
Hangfire Job
Storage DB Server
Hangfire Server
Backend Server
Hangfire Pro
Batch jobs
Chaining batches
Complex workflows
Support Redis storage
Performance counters
Summary Hangfire features
Hangfire architecture
Installing Hangfire
Hangfire integration
Hangfire Pro