The Best Way to Implement Long Running Tasks in .NET - Hangfire, Blazor, SignalR

Published: 24 May 2024
on channel: Milan Jovanović
13,813
593

Get the source code for this video for FREE → https://the-dotnet-weekly.ck.page/lon...
☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code:   / milanjovanovic  

How do you implement a long-running task in .NET? Let's say you're generating a complicated report, and the report generation takes a long time. You could try a blocking approach, where the UI waits for the report generation to complete. However, this isn't a great user experience. A better approach would work asynchronously. You would send a request to start the report generation process. Then, you need a way to check the report status. We can implement this by polling or letting the server notify us when it's ready.

Join my weekly .NET newsletter:
https://www.milanjovanovic.tech

Read my Blog here:
https://www.milanjovanovic.tech/blog

Chapters
0:00 Blocking report generation - V1
4:11 Background job for report generation - V2
14:45 Background job + SignalR approach - V3


Watch video The Best Way to Implement Long Running Tasks in .NET - Hangfire, Blazor, SignalR online, duration hours minute second in high quality that is uploaded to the channel Milan Jovanović 24 May 2024. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 13,813 times and liked it 593 visitors.