Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4: RequestLog with streaming results #302

Closed
benjchristensen opened this issue Sep 1, 2014 · 5 comments
Closed

1.4: RequestLog with streaming results #302

benjchristensen opened this issue Sep 1, 2014 · 5 comments
Milestone

Comments

@benjchristensen
Copy link
Contributor

Now that we support an Observable we can have a stream of results. The RequestLog currently will mark SUCCESS for each onNext rather than the terminal event.

Everything behaves fine for scalar responses, just need to fix it for a use case where the Observables returns more than 1 value.

@benjchristensen benjchristensen added this to the 1.4 milestone Sep 1, 2014
@mattrjacobs mattrjacobs removed this from the 1.4 milestone Dec 19, 2014
@benjchristensen benjchristensen removed this from the 1.4 milestone Dec 19, 2014
@mattrjacobs mattrjacobs added this to the 1.4.0-RC7 milestone Dec 19, 2014
@mattrjacobs
Copy link
Contributor

The plan here is to add 2 new states to the HystrixRequestLog: EMIT and FALLBACK_EMIT. These represent the construct() and resumeWithFallback() methods invoking onNext().

Some possible new RequestLog strings:
[EMITx10, SUCCESS]
[EMITx3, FAILURE]
[EMITx4, FAILURE, FALLBACK_EMITx3, FALLBACK_SUCCESS]
[EMITx1, FAILURE, FALLBACK_EMITx10, FALLBACK_FAILURE]

@mattrjacobs
Copy link
Contributor

One question which I'm not sure about is if we want these new event types in the RequestLog of a HystrixCommand. It doesn't give any info, as we will always see an onNext/onCompleted pair (EMIT/SUCCESS) together.

But it also feels a little strange to special-case this.

My initial inclination is to only present these events for HystrixObservableCommand, both to preserve the RequestLog as-is for this case, and because it's not especially meaningful

@benjchristensen
Copy link
Contributor Author

I agree it should not be on the existing HystrixCommand, only ObservableCommand.

@mattrjacobs
Copy link
Contributor

To make this concrete, here are some sample request logs for HystrixObservableCommand. HystrixCommand request logs are unchanged, as described above.

  • TestCommandWithMultipleValues[EMITx3, SUCCESS][30ms]
  • TestPartialSuccess[EMITx3, FAILURE][39ms]
  • TestPartialSuccessWithFallback[EMITx3, FAILURE, FALLBACK_EMITx4, FALLBACK_SUCCESS][39ms]

@mattrjacobs
Copy link
Contributor

Done in #604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants