-
Notifications
You must be signed in to change notification settings - Fork 251
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
How Traits can be composed in order? #235
Comments
Interesting idea! Could you create and link a PR with the schematic for this |
Sure, I'm glad to give one |
Is this field meant to be a hint to simplify implementations? The only problem with this is that the trait resource is discoverable by users or tools, and this piece of information isn't really helpful to users or tools. |
We discussed about this inconvenience before. Basically traits implementation needs an easy to communicate with the runtime platform implementation. Probably putting the coordination information in the user facing Trait spec is not ideal. But I feel we need to have a standard or suggested way to make the coordination simple. Or this question will be asked by other OAM implementor. |
I strongly agree with and support this feature. Based on my experience and feedback, our OAM users have two common use cases for ordering between trait and component:
|
@xiang90 just to clarify, because I'm hearing a couple different things here, you're saying this is a contract in the trait definition with the runtime implementation. That appears to be what @wonderflow is aiming for as well in #236 - a convenient place to store ordering information, rather than in some look-up table within an implementation. While I agree it could be convenient for a runtime to be able to read the start-up order right from the trait spec, I think it would be awfully inconvenient if it turned out the start-up order defined by the trait didn't work for a particular runtime implementation. Start up order is runtime specific information. It's conceivable that two different runtime implementations may prefer different startup ordering for the same trait definition. The trait definition itself must be platform-agnostic. @hongchaodeng it sounds like you might be saying something slightly different. You mention use cases for OAM users. Are you referring to end-users (app developers and operators) being able to control the start-up order of a trait? If so, that's a different discussion. It would be a change in the Application Configuration where an end-user applies the trait. I'm curious if there are specific cases when an app operator would need to control the start-up ordering for traits. I don't know of any. |
It's neither. It is third party trait builders who just submit traits to the platforms.
I think that's the key difference in our mental models -- whether runtime specific or not. But I actually think that this is also a good idea. Because this will simplify the OAM design and provide more flexibility in extension points. |
Yeah, I agree start-up order should leave to runtime platform implementation. Let me close this issue. |
Now in rudr, we have implementation to manage whether the trait manager need to execute trait before Component create/modify/delete or after.
So I suggest we add field like
stage
in Trait to define the compose order.The text was updated successfully, but these errors were encountered: