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

(question/comment) HystrixCommand instead of HystrixObervableCommand ? #17

Closed
ghost opened this issue Jul 16, 2015 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Jul 16, 2015

Hi,

According to this thread Netflix/Hystrix#805 and for my own understanding, wouldn't it be more adequate to rely on HystrixCommands (instead of HystrixObservableCommands) in BookDbCommands, therefore leveraging the thread isolation from Hystrix (instead of using Ratpack execControl) since all commands are blocking?

I'm not sure I'm clear, but I'd like to have your insights on this!

Thanks,
BQ.

@ghost ghost changed the title (question/comment) (question/comment) HystrixCommand instead of HystrixObervableCommand ? Jul 16, 2015
@danveloper
Copy link
Member

Hi @bquenin great question, thanks for asking!

We want to ensure that the blocking commands are scheduled using Ratpack's execution model so that the request lifecycle is properly maintained. Additionally, Ratpack takes extra measures to ensure that resources are utilized very effectively, so introducing another thread pool into the mix will only cause contention.

For RxJava (which Hystrix uses), Ratpack provides a scheduler, allowing observables to use the execution. This means that the steps taking prior to and after the blocking calls are made on the execution's computation thread pool, giving the most efficient resource utilization.

@ghost
Copy link
Author

ghost commented Jul 17, 2015

ok, thanks for the clarification. I wasn't sure if both were equivalent or not.
I'll mimic your example then :)

@rhart
Copy link
Member

rhart commented Oct 2, 2015

This looks like it can be closed. Please re-open if not

@rhart rhart closed this as completed Oct 2, 2015
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