Get the source code for this video for FREE → the-dotnet-weekly.ck.page/long-running-tasks Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@Curlack6 ай бұрын
Would really love to see how to implement a cancel button utilizing the CancellationToken. Also monitoring multiple requests from the same button or even keeping it disabled 'till cancelled or completed. Those are the parts I usually croak 😅. Good job dude!
@MilanJovanovicTech6 ай бұрын
Huh, that would've been interesting. Maybe in a future video. The cancellation token would only make sense in the blocking scenario.
@Jamabaiz6 ай бұрын
@@MilanJovanovicTechor in the hangfire job, if it is processing via loop, it could check cancelation token state from singleton service. User could then send request to trigger cancelation token using other endpoint which would inject this singleton service.
@vscode-runaways4 ай бұрын
@@MilanJovanovicTech IMO also in none blocking situations, what if you generate a n report and after a while you decide to cancel the job
@baranacikgoz6 ай бұрын
Excellent video, excellent approach. I love comparisons showing improvements one by one
@MilanJovanovicTech6 ай бұрын
Awesome, glad you enjoyed it 😁
@xaloiqq6 ай бұрын
Nice video. I think it would be a good idea to show the network tab on developer tools to explicitly show request being made in polling and signalR solutions. Keep the good work man :)
@MilanJovanovicTech6 ай бұрын
How didn't I think of that? Darn it... Great idea. Didn't even cross my mind. That's how often I work with Ui stuff 😅
@vscode-runaways4 ай бұрын
Please if you update this video add a Server Side Rendering variant to it, would be nice to see how to update the WebPage than, please also add Cancel Button to the 2nd and 3rd Szenario
@MilanJovanovicTech4 ай бұрын
Great suggestion!
@anasmustafa71886 ай бұрын
nice work, which theme you use for vs it make code cleaner
@MilanJovanovicTech5 ай бұрын
ReSharper
@ZuvielDrama6 ай бұрын
Thanks Milan ❤❤❤
@MilanJovanovicTech6 ай бұрын
Sure thing!
@10Totti6 ай бұрын
Best tutorial!
@MilanJovanovicTech6 ай бұрын
Wow, thanks!
@MarcelPopescu5 ай бұрын
🎯 Key Takeaways for quick navigation: 00:00 *The video demonstrates three implementations for executing long-running background jobs from a Blazor WebAssembly client.* 00:14 *Version 1: A blocking implementation that waits for the entire background job duration, simulating a 10-second delay.* 04:14 *Version 2: An asynchronous implementation using Hangfire to enqueue a background job and polling the server for job status updates.* 08:24 *The client sends a POST request to enqueue the job, receives the job ID, and periodically polls the server for job status until completion.* 12:47 *Version 3: An asynchronous implementation using Hangfire and SignalR for real-time job status updates from the server.* 15:22 *The client establishes a SignalR connection, and the server pushes job status notifications through the SignalR hub.* 17:25 *Version 3 is more complex but optimizes resource utilization by eliminating unnecessary polling requests.* 17:40 *Additional benefits include the ability to retry failed jobs and resume from the last checkpoint.* Made with HARPA AI
@MilanJovanovicTech5 ай бұрын
Pretty cool use case for AI
@shakhriyorakhadov82446 ай бұрын
Milan your thinking images hitting me up😅
@MilanJovanovicTech6 ай бұрын
Oh gosh
@yogij176 ай бұрын
SignalR doesnt work with load balancer
@MilanJovanovicTech6 ай бұрын
Or is hard to configure?
@amitkumdixit6 ай бұрын
It's better to use Hangfire dashboard instead
@MilanJovanovicTech6 ай бұрын
What for?
@coding-in3 ай бұрын
Hi @@MilanJovanovicTech, what's the name feature if we use Quatrz Scheduler? Is it have a feature like that? Thanks for ur every videos!
@DIoxide-ck8uy6 ай бұрын
Hangfire uses a ton of cpu on my dedicated server
@MilanJovanovicTech6 ай бұрын
A lot of polling
@YehorBachurinDev6 ай бұрын
Nice
@MilanJovanovicTech6 ай бұрын
Thanks!
@PankajNikam6 ай бұрын
Is the same possible with Quartz? Thanks for the video.
@MilanJovanovicTech6 ай бұрын
Not really, I haven't found a way to schedule background jobs on-demand with Quartz. Maybe there is and I'm just a noob, so don't take this at face value.
@PankajNikam6 ай бұрын
@@MilanJovanovicTech Someone would be a fool to call you an amateur :) I too didn't find a way to schedule on demand job with it. I thought maybe Milan knows :)
@Wouldntyouliketoknow25 ай бұрын
You can schedule on demand background jobs with "stint". Give it a go, I'd welcome the feedback..