Netflix / ocelli

Apache License 2.0
53 stars 28 forks source link

Re-implement backup request using transformer #79

Closed elandau closed 9 years ago

elandau commented 9 years ago

Re-implement the backup request strategy as a transformer so it can more easily be integrated into request processing using standard RxJava This approach will also let us get rid of the Executor interface.

For example,

BackupRequestRetryStrategy strategy = BackupRequestRetryStrategy.builder()
                 .withTimeoutMetric(Metrics.quantile(0.90))
                 .withIsRetriablePolicy(somePolicyThatReturnsTrueOnRetriableErrors)
                 .build();

RxNetty.newHttpClient().createGet("http://localhost:9999/hello")
     .compose(strategy)
     .subscribe(responseHandler)