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

[ISSUE #4781]management life cycle #4783

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

Ish1yu
Copy link
Contributor

@Ish1yu Ish1yu commented Mar 4, 2024

Fixes #4781

########
UnMergeable!!! its demo
########

Motivation
I found that Events have a large number of components that need to be collectively converted to a certain life cycle at a certain time,
Starting from the top level EventMeshServer, it needs to manage a series of internal related components, such as Acl MetaStorage, while its own life cycle changes, so I want to design an interface that allows these components to have the same method to be invoked at different times of life cycle states. In a way similar to the observer, I managed and bound components at the time of their own life cycle changes, so I implemented this PR, and now the implementation is the top-level, as well as the internal management of components, For example, ACLs are SPI loaded and cannot be modified, but other fixed implementations such as ProducerTopicManager also have many internal lifecycle components that should be modified later and associated with the topmost component
我发现Event有大量需要在某一特定时间共同转换到某一生命周期的组件,从最上层的 EventMeshServer 开始,他需要在自己生命周期变化的同时管理内部关联的一系列组件,如 Acl MetaStorage等,所以我想设计一个接口,让这些组件在不同的生命周期状态的时刻有同样的方法可以被调用,在通过类似观察者的方式,在自己生命周期变化的时刻管理和自己绑定的组件,所以我实现了这个PR,目前实现的是最顶层的,还有组件内部的管理,如 Acl 之类是 SPI 加载的,这种不能修改,但是像其他ProducerTopicManager之类的固定实现,内部也有很多同生命周期的组件,这些后续也应该被修改,并且能关联到最顶层的组件

Modifications
New org/apache/eventmesh/runtime/lifecircle EventMeshLifeCycle. Java is responsible for defining the eventmesh state transition method
New org/apache/eventmesh/runtime/lifecircle AbstractEventMeshComponent. Java implementation EventMeshLifeCycle define life cycle changes involved in the state and the binding of other components
New org/apache/eventmesh/runtime/lifecircle EventMeshComponent. Java eventmesh without switch control components, the implementation of state transition method, state huan rear method
New org/apache/eventmesh/runtime/lifecircle EventMeshSwitchableComponent. Java eventmesh with switch components, in EventMeshComponent increased switch function

Top-level component modification
EventMeshServer
-Acl Components with switches
-MetaStorage Components with switches
-Trace Components with switches
-StorageResource component
-ProducerTopicManager component
-EventMeshAdminBootstrap Component with a switch
-EventMeshGrpcBootstrap component

新增 org/apache/eventmesh/runtime/lifecircle/EventMeshLifeCycle.java 负责定义EventMesh中状态转换方法
新增 org/apache/eventmesh/runtime/lifecircle/AbstractEventMeshComponent.java 实现 EventMeshLifeCycle 定义生命周期变化中涉及的状态和绑定的其他组件
新增 org/apache/eventmesh/runtime/lifecircle/EventMeshComponent.java 没有开关控制的EventMesh组件,具体实现状态转换时的方法,状态装欢后置方法
新增 org/apache/eventmesh/runtime/lifecircle/EventMeshSwitchableComponent.java 带有开关的EventMesh组件,在EventMeshComponent增加了开关功能

顶层组件修改
EventMeshServer
-Acl 带有开关的组件
-MetaStorage 带有开关的组件
-Trace 带有开关的组件
-StorageResource 组件
-ProducerTopicManager 组件
-EventMeshAdminBootstrap 带有开关的组件
-EventMeshGrpcBootstrap 组件

Copy link
Contributor

github-actions bot commented May 3, 2024

It has been 60 days since the last activity on this pull request. I am reaching out here to gently remind you that the Apache EventMesh community values every pull request, and please feel free to get in touch with the reviewers at any time. They are available to assist you in advancing the progress of your pull request and offering the latest feedback.

If you encounter any challenges during development, seeking support within the community is encouraged. We sincerely appreciate your contributions to Apache EventMesh.

@github-actions github-actions bot added the Stale label May 3, 2024
@xwm1992 xwm1992 marked this pull request as draft July 4, 2024 13:27
@github-actions github-actions bot removed the Stale label Jul 4, 2024
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

Successfully merging this pull request may close these issues.

[Enhancement] EventMeshServer subcomponent lifecycle management
1 participant