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

Slot chain SPI should target slot itself rather than the entire builder #316

Closed
jialianglinjl opened this issue Dec 19, 2018 · 1 comment · Fixed by #411
Closed

Slot chain SPI should target slot itself rather than the entire builder #316

jialianglinjl opened this issue Dec 19, 2018 · 1 comment · Fixed by #411
Assignees
Labels
kind/enhancement Category issues or prs related to enhancement.

Comments

@jialianglinjl
Copy link
Contributor

jialianglinjl commented Dec 19, 2018

Issue Description

Type: feature request

Describe what happened (or what feature you want)

Due to the fact that the order between slots in slot chain is essential, currently Sentinel make SlotChainBuilder as the slot chain SPI so that users can implement their own builder, where they can arrange the order between slots. But this introduce complexity for users to arrange the builder when there are many external slots from other dependency.

Describe what you expected to happen

The ideal approach is to make the slot itself as the SPI interface so that users only need to care about their own slot, rather than the global chain. But due to the fact that the order between slots in slot chain is essential, we have to provide a @Order annotation for users so that they can arrange the order with the annotation. And the default slots of Sentinel (e.g. StatisticSlot) should have their own unique order respectively.

@sczyh30 sczyh30 changed the title Slotchain注册的时候,应该只关心自己,而不需要知道别人 Slot chain SPI should target slot itself rather than the entire builder Dec 19, 2018
@sczyh30 sczyh30 added the kind/enhancement Category issues or prs related to enhancement. label Dec 19, 2018
@sczyh30 sczyh30 self-assigned this Dec 19, 2018
@jialianglinjl jialianglinjl added the help wanted Extra attention is needed label Jan 7, 2019
@tigerMoon
Copy link
Contributor

Maybe I can have a try. its more like filter chain.

as I see.
user can define custom Slot, and order in the slot chain, then register to the SlotChain, and SlotChain.getNext() indexed with order.

NodeSelectorSlot, StatisticSlot, ClusterBuilderSlot are the basic type, and others are custom type.

we provide SlotRegister that only custom type slot allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants