Pollynator - part of Polly.ContribA Code Fix for creating implementations of interfaces, using the Polly library for resilience (e.g. handling timeouts, retry logic, etc.). Created with, and tested with, Visual Studio 2017 (should also support Visual Studio 2015 - requires testing). For more information regarding Polly, please refer to https://github.com/App-vNext/Polly Why Pollynator?I architect 'cloud scale' solutions, and find Polly indispensable for providing resilience and graceful handling of application or infrastructure services that are either unavailable, or temporarily unresponsive due to high load. Polly allows implementation of patterns such as Circuit Breaker, to allow the application to degrade without collapsing, perhaps by making certain features unavailable (e.g. email confirmations, new registrations) while allowing the user to continue to work with the rest of the feature set. I tend to use technologies such as DocumentDB, Redis, Elasticsearch, and wrapping every call to these client libraries would involve considerable, potentially error-prone, hand coding. I am a fan of code generation, and saw the benefit of creating a means to create 'resilient' copies of the third-party libraries (and my own libraries), through the use of Roslyn based code generation. As a result, Pollynator follows the decorator pattern, by creating a delegated implementation of an interface, passing the actual execution of the method to Polly. If interfaces change, the code can simply be regenerated, in seconds. |