No video

Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET

  Рет қаралды 1,840

Rahul Nath

Rahul Nath

Күн бұрын

Пікірлер: 21
@zdxzxzdxzx6780
@zdxzxzdxzx6780 5 ай бұрын
Very, very important topic. Thanks Rahul!
@RahulNath
@RahulNath 5 ай бұрын
Glad you liked it!
@ChosenHandle
@ChosenHandle 4 ай бұрын
Really nice video on the tooic. Thank you.
@RahulNath
@RahulNath 4 ай бұрын
Glad you enjoyed it!
@juniorzucareli
@juniorzucareli 5 ай бұрын
Excellent video!
@RahulNath
@RahulNath 5 ай бұрын
Thank you very much!
@brycewoods9007
@brycewoods9007 5 ай бұрын
Nice video man. That's was really interesting. Have seen cancellation tokens as an optional parameter to functions all the time but never really saw their purpose.
@RahulNath
@RahulNath 5 ай бұрын
Great to see you here Bryce and glad it was helpful!
@abuzeromohammed3386
@abuzeromohammed3386 5 ай бұрын
Thank you Rahul
@RahulNath
@RahulNath 4 ай бұрын
Glad you liked it Raghad.
@johncerpa3782
@johncerpa3782 5 ай бұрын
Thanks for the video
@RahulNath
@RahulNath 5 ай бұрын
Glad you liked it John!!
@SuriyasankarP
@SuriyasankarP 2 ай бұрын
Hi Sir..First of all it's a great video.. I have one query... I have a main function and that main function has one sub function.. Like Main{ Sub{ Inner 1{ Inner 1.1 } Inner 2{ Inner 2.1} Etcc... } } If I cancel Sub function with cancellation token..all the respective inner function also will cancel and it save resources right?? Or need to pass cancellation token all of the inner function for releasing the resources?? This is my query... If you answer it would be better🙂🫡
@parmarjitesh1979
@parmarjitesh1979 5 ай бұрын
Hi cancellation tokens are not working when calling api from flutter , can you help sir ?
@RahulNath
@RahulNath 5 ай бұрын
Can you provide more details on how you are using it from flutter ? How are you calling cancel on an API?
@parmarjitesh1979
@parmarjitesh1979 5 ай бұрын
I am calling a api endpoint for eg : localhost:5010/odata/CHECKSTOCK?PRODUCTID=123. This request is working fine but when the user checks for multiple times stocks of different product and sometimes user generates a request but cancels it mid-way than the cancellation token is not getting trigged and than iis throws error too many files open and i think some memory leak happens and application gets very low, sir googled all possible ways but couldn't figure it out. if u could throw some light than it will be helpfull @@RahulNath
@ramashankar2750
@ramashankar2750 5 ай бұрын
Using an idempotence along with a state machine do the job.
@RahulNath
@RahulNath 5 ай бұрын
Sorry didn’t understand. Idempotency is an important concept but not sure how that helps here if you are cancelling out in between a chain of process/ functions
@ramashankar2750
@ramashankar2750 5 ай бұрын
@@RahulNath Implementing cancellation token on Mircroservices using Azure functions can be a challenge due to racing/multithreading, we implemented the idempotence for the key under consideration that passes through multiple states (optional) validate/ cancel/ secure/ do/ release/ undo/ queueing/ feedback/ webaudit/ tracker/... to minimise it by responding quickly an seting up state machine to cancel duringthe process of task (10-20 tasks for an Invoice) with a transaction engine (we call it DoProcess) to overcome issues in it. e.g we will hold a E-mail to a vendor for 30 minutes before change of mind by the user. towards cancellation , we learnt over decades users issues. feedback state setsup the cancellation state and engine decides its fate. We needed Speed / Robustness/Diagnostics for support/Lean.
@ramashankar2750
@ramashankar2750 5 ай бұрын
@@RahulNath We do not process the Request immediately but log it and send a feedback to user. Now cancellation becomes easy at any stage with idenmpotence applied (do not know what will fail and get recitified). The queue is processed like 60s/70s era of batch processing replacing the procedures with microservices for maintenance of code, and we use on premise DB in India as companies do not want their data to kept on cloud.
@RahulNath
@RahulNath 5 ай бұрын
@@ramashankar2750 Absolutely using messaging would help solve a lot of these issues. I did mentioning about it in my previous video on CancellationTokens and long running processes. But when you do run into scenarios like this in your API endpoints or other synchronous processing mechanisms it's good to follow these patterns with the token. Thank you for the comment and the call out here 👍
STREAM ZIP Archive FILES | ASP.NET Core Series | .NET on AWS
18:14
Hosting ASP NET on EC2 | .NET ON AWS | AWS ECS | Amazon
20:17
Rahul Nath
Рет қаралды 1 М.
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
女孩妒忌小丑女? #小丑#shorts
00:34
好人小丑
Рет қаралды 78 МЛН
Why is anti-immigration sentiment on the rise in Canada?
13:00
The Guardian
Рет қаралды 1,9 МЛН
NVIDIA Needs to STOP
11:35
Linus Tech Tips
Рет қаралды 1,1 МЛН
Why UK 🇬🇧 is going Bankrupt? : Detailed Economic Case Study
20:37
Think School
Рет қаралды 1,5 МЛН
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 354 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 152 М.
The Most Requested C# Feature is Coming!
11:48
Nick Chapsas
Рет қаралды 45 М.
Forget Controllers and Minimal APIs in .NET!
14:07
Nick Chapsas
Рет қаралды 65 М.
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18