Giter VIP home page Giter VIP logo

polly-samples's Introduction

Polly-Samples

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

About the numbered demos

Background

  • The demos run against an example 'faulting server' (also within the solution). To simulate failure, this dummy server rejects more than 3 calls from the same IP 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 it achieves (in relation to the dummy 'faulting server').
  • Sometimes the <summary/> also highlights what this demo doesn't achieve - often picked up in the following demo. Explore the demos in sequence, for best understanding.

Sequence

  • Demo 00 shows behaviour calling the faulting server every half-second, with no Polly policies protecting the call.
  • Demos 01-04 show various flavors of Polly retry.
  • Demos 05-06 show retry combined with Circuit-Breaker.
  • Demo 07 shows the Polly v5.0 PolicyWrap for combining Retry and CircuitBreaker.
  • Demo 08 adds Polly v5.0 Fallback, making the call protected (in a PolicyWrap) by a Fallback, Retry, Circuitbreaker.
  • Demo 09 shows the Polly v5.0 Timeout policy for an overall call timeout, in combination with Fallback and WaitAndRetry.

To run the demos

  • To start the dummy server, start PollyTestApp.
  • Be sure the port number for the dummy server in PollyTestClient\Configuration.cs matches the port on which PollyTestApp has started on your machine (in the previous step).
  • To run a demo, uncomment the demo you wish to run in PollyTestClient\program.cs. Then start PollyTestClient.

Want further information?

  • Any questions about the operation of the demos, ask on this repo; any questions about Polly, ask at Polly.
  • For full Polly syntax, see Polly.
  • For deeper discussions of transient fault-handling and further Polly patterns, see the Polly wiki

Slide deck from DevIntersections presentation

View the slides presented at the April 2016 DevIntersections Polly demo by Carl Franklin.

polly-samples's People

Contributors

joelhulen avatar dreisenberger avatar reisenberger avatar

Watchers

James Cloos 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.