druid icon indicating copy to clipboard operation
druid copied to clipboard

RPC building block: future hook for repetitive queries

Open leventov opened this issue 7 years ago • 8 comments

Generified idea of #7231. A lot of Druid nodes do RPC to each other with idempotency expectations. If one query is already in-flight, another query can just wait for the same Future.

I've once implemented similar functionality here in an ad-hoc manner: https://github.com/metamx/druid/commit/772bd29adb829cb5c09eb233ed3bf93209c2a456#diff-b246e418901d237662b3363cdc950d13R118

We can build something generic and allow to use it in a declarative manner, for example, a static utility that accepts a lambda and creates a hook.

leventov avatar Apr 01 '19 13:04 leventov

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 20 '19 20:06 stale[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

stale[bot] avatar Jul 04 '19 21:07 stale[bot]

Still sounds like a good idea.

gianm avatar Jul 04 '19 21:07 gianm

This issue is no longer marked as stale.

stale[bot] avatar Jul 04 '19 21:07 stale[bot]

This issue is no longer marked as stale.

stale[bot] avatar Jul 04 '19 21:07 stale[bot]

@leventov , @gianm , I believe request caching https://github.com/Netflix/Hystrix/wiki/How-it-Works#RequestCaching can be helpful in solving this.

On a different note, we should consider using Hystrix library which helps control interactions between distributed services by adding latency tolerance and fault tolerance logic improving overall system resiliency. https://github.com/Netflix/Hystrix/wiki

Hystrix provides a number of patterns to improve system resiliency - Sync/Async executions, Command groups/thread pools, Request collapsing/caching etc etc. https://github.com/Netflix/Hystrix/wiki/How-To-Use https://github.com/Netflix/Hystrix/wiki/How-it-Works

sashidhar avatar Jul 06 '19 19:07 sashidhar

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

stale[bot] avatar Apr 11 '20 19:04 stale[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

stale[bot] avatar May 09 '20 19:05 stale[bot]