Giter VIP home page Giter VIP logo

polly-samples's Introduction

Polly-Samples

Polly logo

This repository provides sample implementations of using the Polly library in a .NET application.

The intent of this project is to help newcomers kick-start the use of Polly within their own projects.

The samples demonstrate the policies in action, against faulting endpoints.

Projects

The solution contains three applications and one class library:

flowchart LR
    console{{PollyTestClientConsole}}
    wpf{{PollyTestClientWPF}}
    lib>PollyDemos]
    api[/PollyTestWebApi\]

    console -- uses --> lib
    wpf -- uses --> lib
    lib -- invokes --> api
Loading

Demos

General information

  • The demos run against an example 'faulting server'.
    • To simulate failure, the dummy server rejects more than 3 calls in any five-second period.
  • Be sure to read the <summary> at the top of each demo.
    • This explains the intent of that demo, and what resilience it adds to its handling of the calls to the 'faulting server'.
  • Sometimes the <summary> also highlights what this demo doesn't achieve, which is often picked up in the following demo.
  • Explore the demos in sequence for best understanding.

Sequence

# Description Link
00 No strategy Code
01 Retry N times Code
02 Wait and retry N times Code
03 Wait and retry N times, N big enough to guarantee success Code
04 Wait and retry forever Code
05 Wait and retry with exponential back-off Code
06 Wait and retry nesting circuit breaker Code
07 Wait and retry chaining with circuit breaker by using Pipeline Code
08 Fallback, Retry, and CircuitBreaker in a Pipeline Code
09 Fallback, Timeout, and Retry in a Pipeline Code
10 Without isolation: Faulting calls swamp resources,
also prevent good calls
Code
11 With isolation: Faulting calls separated,
do not swamp resources, good calls still succeed
Code
12 Hedging in latency mode Code
13 Hedging in fallback mode: retry only Code
14 Hedging in fallback mode: retry with fallback Code
15 Hedging in parallel mode Code
16 Entity Framework with retry N times Code

Want further information?

Slide decks

View the slides presented at NDC, DevIntersections and other conferences.

You are welcome to use and adapt this presentation for not-for-profit presentations of Polly to co-workers, user groups and similar, subject to the condition that references to the .NET Foundation, App-vNext and the individual members of the Polly team are retained.

polly-samples's People

Contributors

joelhulen avatar peter-csala avatar dependabot[bot] avatar dreisenberger avatar reisenberger avatar martincostello avatar eugeneogongo avatar kabua avatar bjartwolf avatar renato04 avatar vincent0060 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.