SlideShare a Scribd company logo
1 of 12
Download to read offline
BACKGROUND PROCESSING
WITH HANGFIRE
PROOF OF CONCEPT
2019/MAY
WHAT IS BACKGROUND PROCESSING
• Long running tasks that doesn't require user interaction;
• Reliable; Resilient; Transparent; Persistant;
• Sometimes can be really complex;
• Examples:
• Invoices generation at the end of month;
• Monthly/weekly reporting;
• Regular mailings;
• KPIs processing.
AS THE PRODUCT EVOLVES,
PROCESSING GROWS
• Reallycommon, and even more in SaaS;
• Jobs require monitoring.
If you keep adding more jobs, after some
time, you’ll run into a scenario that it can’t be
manuallymonitoredanymore;
BACKGROUND JOBS FRAMEWORKS
HARD TO CHOOSE ONE
• https://github.com/fluentscheduler/FluentScheduler (1.6k stars)
• https://github.com/HangfireIO/Hangfire (4.7k stars)
• https://github.com/brthor/Gofer.NET (0.2k stars)
• https://github.com/jamesmh/coravel (0.7k stars)
• https://github.com/leosperry/Chroniton (0.15k stars)
• https://github.com/quartznet/quartznet/ (3.2k stars)
• We are not going to jump inside
each one, nor to discuss the
pros/cons of all background job
schedulers.
• or the newest .NET Core IHostedService.
• or maybe you can use Sql Server Agent
to make API requests and forget
everything that I’ve said so far.
HANGFIRE
MONITORING UI
FEATURES
• Easyto setup;
• Persistent storage - Sql Server, Postgre, MongoDb or Redis (reduce latency to minimum);
• Scale as you grow: Single process, Separated Services/Servers or Web Farm;
• Multiple queues; Degree of parallelism;
• Support for cancellation tokens;
• All included: Automatic retries, exceptions, application shutdowns or even unexpected process
terminations
• There are dozens of extensions available on Github (some of them are really useful);
• IoC Containers (https://www.hangfire.io/extensions.html#ioc-containers)
... AND IS OPEN-SOURCE
BUT THERE’S A PAID VERSION
HANGFIRE.RECURRINGJOBS EXTENSION
HANGFIRE.CONSOLE EXTENSION
Hangfire documetation:
• https://www.hangfire.io/
• https://medium.com/@qwe16165850/scheduler-in-net-core-2-1-hangfire-tutorial-aca4ae4274a6
• https://codeburst.io/schedule-background-jobs-using-hangfire-in-net-core-2d98eb64b196
Hangfire extensions used (https://www.hangfire.io/extensions.html):
• Hangfire.Console (https://github.com/pieceofsummer/Hangfire.Console)
• Hangfire.RecurringJobExtensions (https://github.com/icsharp/Hangfire.RecurringJobExtensions)
REFERENCES

More Related Content

Similar to 2019-05 Andritz Talks: Background Processing using Hangfire

Similar to 2019-05 Andritz Talks: Background Processing using Hangfire (20)

Agile and Lean Software Development
Agile and Lean Software DevelopmentAgile and Lean Software Development
Agile and Lean Software Development
 
Visual paradigm-leaflet
Visual paradigm-leafletVisual paradigm-leaflet
Visual paradigm-leaflet
 
Leaflet14 1
Leaflet14 1Leaflet14 1
Leaflet14 1
 
Accelerate User Driven Innovation [Webinar]
Accelerate User Driven Innovation [Webinar]Accelerate User Driven Innovation [Webinar]
Accelerate User Driven Innovation [Webinar]
 
Agifall - Combining Waterfall and Agile Development Process for Digital and S...
Agifall - Combining Waterfall and Agile Development Process for Digital and S...Agifall - Combining Waterfall and Agile Development Process for Digital and S...
Agifall - Combining Waterfall and Agile Development Process for Digital and S...
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Requirements the Last Bottleneck
Requirements the Last BottleneckRequirements the Last Bottleneck
Requirements the Last Bottleneck
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at Atlassian
 
Cloud Love Conference: Kubernetes is awesome, but...
Cloud Love Conference: Kubernetes is awesome, but...Cloud Love Conference: Kubernetes is awesome, but...
Cloud Love Conference: Kubernetes is awesome, but...
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
 
NRB - LUXEMBOURG MAINFRAME DAY 2017 - Compuware DevOps presentation
NRB - LUXEMBOURG MAINFRAME DAY 2017 - Compuware DevOps presentationNRB - LUXEMBOURG MAINFRAME DAY 2017 - Compuware DevOps presentation
NRB - LUXEMBOURG MAINFRAME DAY 2017 - Compuware DevOps presentation
 
NRB - BE MAINFRAME DAY 2017 - Compuware Dev Ops
NRB - BE MAINFRAME DAY 2017 - Compuware Dev OpsNRB - BE MAINFRAME DAY 2017 - Compuware Dev Ops
NRB - BE MAINFRAME DAY 2017 - Compuware Dev Ops
 
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
 
Measure and Increase Developer Productivity with Help of Serverless at Server...
Measure and Increase Developer Productivity with Help of Serverless at Server...Measure and Increase Developer Productivity with Help of Serverless at Server...
Measure and Increase Developer Productivity with Help of Serverless at Server...
 
Agile in real life
Agile in real lifeAgile in real life
Agile in real life
 
Afganistan Culture Shock
Afganistan Culture ShockAfganistan Culture Shock
Afganistan Culture Shock
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Everyone is a project manager. You can too!
Everyone is a project manager. You can too!Everyone is a project manager. You can too!
Everyone is a project manager. You can too!
 
DevOpsDays Rockies - Living in a Hybrid World
DevOpsDays Rockies - Living in a Hybrid WorldDevOpsDays Rockies - Living in a Hybrid World
DevOpsDays Rockies - Living in a Hybrid World
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

2019-05 Andritz Talks: Background Processing using Hangfire

  • 2. WHAT IS BACKGROUND PROCESSING • Long running tasks that doesn't require user interaction; • Reliable; Resilient; Transparent; Persistant; • Sometimes can be really complex; • Examples: • Invoices generation at the end of month; • Monthly/weekly reporting; • Regular mailings; • KPIs processing.
  • 3. AS THE PRODUCT EVOLVES, PROCESSING GROWS • Reallycommon, and even more in SaaS; • Jobs require monitoring. If you keep adding more jobs, after some time, you’ll run into a scenario that it can’t be manuallymonitoredanymore;
  • 4. BACKGROUND JOBS FRAMEWORKS HARD TO CHOOSE ONE • https://github.com/fluentscheduler/FluentScheduler (1.6k stars) • https://github.com/HangfireIO/Hangfire (4.7k stars) • https://github.com/brthor/Gofer.NET (0.2k stars) • https://github.com/jamesmh/coravel (0.7k stars) • https://github.com/leosperry/Chroniton (0.15k stars) • https://github.com/quartznet/quartznet/ (3.2k stars) • We are not going to jump inside each one, nor to discuss the pros/cons of all background job schedulers. • or the newest .NET Core IHostedService. • or maybe you can use Sql Server Agent to make API requests and forget everything that I’ve said so far.
  • 7. FEATURES • Easyto setup; • Persistent storage - Sql Server, Postgre, MongoDb or Redis (reduce latency to minimum); • Scale as you grow: Single process, Separated Services/Servers or Web Farm; • Multiple queues; Degree of parallelism; • Support for cancellation tokens; • All included: Automatic retries, exceptions, application shutdowns or even unexpected process terminations • There are dozens of extensions available on Github (some of them are really useful); • IoC Containers (https://www.hangfire.io/extensions.html#ioc-containers)
  • 8. ... AND IS OPEN-SOURCE BUT THERE’S A PAID VERSION
  • 11.
  • 12. Hangfire documetation: • https://www.hangfire.io/ • https://medium.com/@qwe16165850/scheduler-in-net-core-2-1-hangfire-tutorial-aca4ae4274a6 • https://codeburst.io/schedule-background-jobs-using-hangfire-in-net-core-2d98eb64b196 Hangfire extensions used (https://www.hangfire.io/extensions.html): • Hangfire.Console (https://github.com/pieceofsummer/Hangfire.Console) • Hangfire.RecurringJobExtensions (https://github.com/icsharp/Hangfire.RecurringJobExtensions) REFERENCES