Description
Course info
Rating
(81)
Level
Beginner
Updated
Jul 10, 2015
Duration
1h 14m
Description

By the end of this course you’ll know how to effectively and easily handle temporary transient errors in applications and provide great user experiences by creating more robust and resilient applications that don’t interrupt the user unnecessarily. Transient errors such as temporary network connectivity problems or fleeting database problems can cause more users to report errors and more error log entries that can waste valuable developer time. In this course, we learn how to use the open source .NET Polly library to automatically retry operations rather than failing on the first exception.

About the author
About the author

With over 15 years experience, Jason Roberts is a Microsoft .NET MVP, freelance developer, and author.

More from the author
Working with Files and Streams in C#
Intermediate
3h 13m
Oct 12, 2018
Error Handling in C# with Exceptions
Intermediate
1h 37m
Aug 6, 2018
More courses by Jason Roberts
Section Introduction Transcripts
Section Introduction Transcripts

Introducing Polly
Hi, I'm Jason Roberts from Pluralsight. Welcome to this course on Creating Better User Experiences and More Robust Applications with Polly. In this module we're going to introduce the open-source Polly library. So in this module we're going to start off by seeing some of the reasons why we might want to use Polly in the first place. And we'll see how, when we're using Polly we can actually improve the end user experience of our applications. We'll see some example scenarios where we might want to use Polly, and also the platforms that Polly supports and how we go and install it. We'll learn about the different exception handling strategies that Polly gives us. And finally we'll get an overview of the logical steps we need to take when we want to use Polly.

Using the Retry Forever and Retry Policies
Hi, welcome back. In this module we're going to dig in to how we use the Retry Forever and Retry policies that Polly provides us. So in this module we're going to start off by getting a high-level overview of the Retry Forever policy and this simply retries our action over and over again with no maximum upper limit. We'll see how we can install Polly from NuGet. And then how we can replace our manual retry code that we developed in the previous module with the Retry Forever policy. We'll learn that we can optionally execute an action every time we get a failure and retry in Polly. And we'll learn what happens when we get a different exception thrown to the one that we've configured Polly to handle. Finally we'll get a high-level overview of the Retry policy and we'll see how we can use it in code. The Retry policy, unlike the Retry Forever policy, allows us to specify a maximum upper limit on the number of retries that Polly will make.

Using the Wait and Retry and Circuit Breaker Policies
Hi, welcome back to this final module. In the previous module we saw how to use the Retry Forever and the Retry policies. In this module we're going to learn how to use the Wait and Retry policy and also the Circuit Breaker policy. So we'll kick off this module with a high-level overview of the Wait and Retry policy and we'll learn how we can specify that we want to wait for specific timespans between each retry of our code. We'll also learn that rather than specifying specific timespans, we can also define a function to calculate the wait times between each retry. Next we'll get an overview of the Circuit Breaker policy and we'll see that this policy operates a little bit differently from the other ones. And once we've got this high-level overview, we'll head over to Visual Studio and we'll see how we can use it in code. We'll finish up this module by seeing some of the additional features we can use when defining policies. Such as the ability to handle multiple exceptions or refine the exceptions that we're handling by using predicates.