Tactics for Building Background Services in .NET - Kevin Griffin - NDC London 2023

Discover tactics for building robust background services in .NET, including Hangfire, Quartz, and .NET Hosted Services, and learn how to keep your services simple and scalable.

Key takeaways

Key Concepts

  • The speaker is discussing tactics for building background services in .NET
  • He emphasizes the importance of being proud to be a web developer
  • The speaker introduces Hangfire, a .NET library that allows developers to run tasks in the background
  • Background services should be kept simple and separate from the main application
  • Scheduling tasks can be done using Quartz, which provides precise scheduling and timing
  • The speaker highlights the benefits of using .NET Hosted Services, which can manage background services for you
  • He also discusses topics such as magic strings, .NET dependency injection, and UI design
  • The speaker shares real-world experiences of building background services and the challenges they faced
  • He emphasizes the importance of taking feedback and providing information to users

Recommendations

  • Use Hangfire to run tasks in the background
  • Keep background services simple and separate from the main application
  • Use Quartz for precise scheduling and timing
  • Use .NET Hosted Services to manage background services
  • Avoid using magic strings
  • Use .NET dependency injection to manage dependencies
  • Design a simple and user-friendly UI

Takeaways

  • Background services are essential in building robust and scalable applications
  • Hangfire provides a convenient way to run tasks in the background
  • Scheduling tasks requires precise timing and Quartz provides this
  • .NET Hosted Services can manage background services for you
  • Dependency injection and UI design are crucial aspects of building a good application