Skip to content

Investigate the use of ResilienceStrategy<T> as core abstraction #1454

@martintmk

Description

@martintmk

Currently, the Polly V8 core is based around non-generic ResilienceStrategy. The reasoning behind this is detailed here.

I would like to investigate the possibility of the core to be based around generic ResilienceStrategy<T>.

One major benefit it would bring is that we would not be able to combine unsupported strategies. For example, combining ResilienceStrategy<string> with ResilienceStrategy<double> which is allowed now on the lower-level although not by public API.

The idea is that non-generic resilience strategies will be just simple wrapper over ResilienceStrategy<object>. The public API will stay virtually unchanged. The only difference is that custom strategies will now derive from ResilienceStrategy<T> instead of ResilienceStrategy.

I am also curious about the performance impact of this change and how difficult it will be to combine non-reactive with reactive strategies. Based on this experiment we may decide to switch to generic core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8Issues related to the new version 8 of the Polly library.

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions