-
Notifications
You must be signed in to change notification settings - Fork 642
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
[Enhancement] EventMeshServer subcomponent lifecycle management #4781
Comments
Welcome to the Apache EventMesh community!! Please make sure to include all the relevant context. If you are interested in contributing to our project, please let us know! Want to get closer to the community?
Mailing Lists:
|
@Pil0tXia im build a demo pr later |
It has been 90 days since the last activity on this issue. Apache EventMesh values the voices of the community. Please don't hesitate to share your latest insights on this matter at any time, as the community is more than willing to engage in discussions regarding the development and optimization directions of this feature. If you feel that your issue has been resolved, please feel free to close it. Should you have any additional information to share, you are welcome to reopen this issue. |
Search before asking
Enhancement Request
I have seen multiple properties of EventMeshServer, such as Acl or MetaStorage, which are actually wrappers for declaring the cycle state of specific services. There are several properties that indicate the current state, such as initialized, started, etc. There are also methods for state transition, such as # init. So, I wonder if it's possible to change these classes to LifeCircle form for management, At that time, there will be a superclass such as AbstractEventMeshInitializerLifeCircle, which implements management of properties such as initiate and calls to # init. Therefore, EventMeshServer only needs to maintain one
我感觉英文有点词不达意
我看到 EventMeshServer 的多个属性,如 Acl 或 MetaStorage 等,其实都是对于具体服务附加声明周期状态的包装,会有几个标志当前状态的属性,如 inited、started等,还有有状态转换的方法如 #init 等,那我想可以不可以把这些类都改成 LifeCircle 形式管理,到时候会有一个比如AbstractEventMeshInitalizerLifeCircle 之类的超类,实现了对于inited等属性等管理和对#init的调用,那么 EventMeshServer 只需要维护一个 LifeCircleList 就可以管理这些对象了
Describe the solution you'd like
`
public abstract class AbstractDemoLifeCircle {
}
`
`
public class Acl extends AbstractDemoLifeCircle {}
`
`
public class EventMeshServer {
...
private List components;
...
public void init() throws Exception {
components.forEach(component -> component .init());
}
}
`
As for the special handling of EventMeshBootstrap, it is completely possible to wait for init before executing the original logic
至于 EventMeshBootstrap 这种特殊处理,完全可以等init之后再执行原逻辑
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: