ruanwenjun commented on issue #14832:
URL: 
https://github.com/apache/dolphinscheduler/issues/14832#issuecomment-1729854160

   > The design of this OSPP project:
   > 
   > 1. system-generated message can be considered as a kind of 
`ListenerEvent`,  we can add various kinds of events such as 
`ServerDownListenerEvent`, `TaskFailListenerEvent`, and 
`TaskCreateListenerEvent`.
   > 2. add an option for creating a global alert instance. When creating an 
alert instance, user can choose whether it is a global instance. If it is a 
global instance, it will by default receive all system-generated events. If it 
is not global, it will be a regular alert instance and user need to select the 
alarm type (success, failure, all) and bind them to an alert group.
   > 3. event generator: If there exists global alert instance, the global 
events will be generated (in `Api Server` or `Master Server`), and saved into 
database (in a seperate table, suppose `t_ds_listener_event` here). I think 
it's best to check whether there exists global instance before generating 
global events because we have no other ways to determine if users need to 
handle global events, if not, we will do a lot of useless work to process these 
events.
   > 4. event consumer: create a new DaemonThread similar to the 
`AlertBootstrapService` that reads pending events from table 
`t_ds_listener_event`,  retrieves global alert instances, build AlertData and 
the corresponding `AlertChannel`(AlertPlugin) will process the alertInfo. If 
succeeded, delete the event from table(because the number of global events will 
be large, delete directly may be a more suitable option). If failed, update the 
send status.
   
   Basically LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to