layout: true
--- class: center, middle # Introduction in Polly => ( press > ) https://ignatandrei.github.io/Presentations/pollyprez.html Code at https://ignatandrei.github.io/Presentations/polly.zip --- # Agenda 10. About me 20. Examples of WebAPI calls that need more than Request/ Response 25. What is Polly ? 30. Example : Long Running process 40. Example : Too Many requests / Rate Limiting 50. Example : Timeout with default answer 70. Discussion / Questions ? --- class: center, top # About me ![:img ignat, 10%](ignat.jpg) Andrei Ignat http://msprogrammer.serviciipeweb.ro/ www.ASP.NET forum moderator YouTube 5 minutes .NET and tools : http://bit.ly/5MinTools Book Making Open Source Component : http://bit.ly/NetOpenSourceComponent Book Copy Paste from StackOverflow : https://amzn.to/2PQ8EDc Monthly meetings: https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/ --- class: left, top # Examples of WebAPI calls that need more than Request/ Response 10. Long Running process e.g. export data , having back an ID that identifies the request as complete 20. Too Many requests / Rate Limiting 30. Timeout for the user : need to display cached data e.g. Weather --- class: center, top # What is Polly ? Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. https://github.com/App-vNext/Polly Examples here are with WebAPI, but can be implemented also for others ( retry for faulty database connection) https://thepollyproject.azurewebsites.net/about/ --- class: center, top # Example : Long Running process *WebAPI* : CalculateHistory and History from EmployeeController *Demo* : EmployeeRetryLengthyTasks.CalculateHistoryOld() and EmployeeRetryLengthyTasks.CalculateWithPolly; --- class: center, top # Example : Too Many requests / Rate Limiting *WebAPI* : GetHistoryNOW_LimitedConcurrency from EmployeeController *Demo* : EmployeeRateLimiting.CalculateHistoryOld and EmployeeRateLimiting.CalculateHistoryPolly; --- class: center, top # Example : Timeout with default answer *WebAPI* : GetWeatherForEmp from EmployeeController *Demo* : EmpWeather.GetWeather; --- class: center, top # Questions? Andrei Ignat http://msprogrammer.serviciipeweb.ro/ www.ASP.NET forum moderator YouTube 5 minutes .NET and tools : http://bit.ly/5MinTools Book Making Open Source Component : http://bit.ly/NetOpenSourceComponent Book Copy Paste from StackOverflow : https://amzn.to/2PQ8EDc Monthly meetings: https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/