pegasas commented on issue #15330: URL: https://github.com/apache/dolphinscheduler/issues/15330#issuecomment-1871819435
My current design is as below:
```
┌─────────────────────┬────────────────────┬────────────────────┬────────────────────────┬───────────────────────────────┐
│ │ │ │
│ │
│ UI │ API │ DB │
Registry │ Master │
│ │ │ │
│ │
├─────────────────────┼────────────────────┼────────────────────┼────────────────────────┼───────────────────────────────┤
│ │ │ │
│ │
│ ┌─────────────┐ │ ┌─────────────┐ │ ┌─────────────┐ │
│ ┌─────────────────────────┐ │
│ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ User ├───┼──►│ Create ├──┼──►│ Trigger
├──┼──────────Pull──────────┼──► TriggerTaskThreadPool │ │
│ │ │ │ │ Trigger │ │ │ │ │
│ │ │ │
│ └─────┬───────┘ │ └─────────────┘ │ └─────────────┘ │
│ └───────────┬─────────────┘ │
│ │ │ │ │
│ │ │
│ │ │ ┌─────────────┐ │ ┌─────────────┐ │
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ └─Push──────┼──►│ Request ├──┼──►│ Schedule
◄──┼────────────────────────┼──────────────┘ │
│ │ │ │ │ │ │ │
│ │
│ │ └─────────────┘ │ └─────┬───────┘ │
│ │
│ │ │ │ │
│ │
│ │ │ │ │
│ ┌────────────────────────┐ │
│ │ │ │ │
│ │ │ │
│ │ │
└──────────┼────────────────────────┼───► SchedulerApi │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ └───────────┬────────────┘ │
│ │ │ │
│ │ │
│ │ │ ┌─────────────┐ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ Command
◄──┼────────────────────────┼───────────────┘ │
│ │ │ │ │ │
│ │
│ │ │ └─────┬───────┘ │
│ │
│ │ │ │ │
│ │
│ │ │ │ │
│ │
│ │ │ │ │
│ ┌─────────────────────────┐ │
│ │ │ │ │
│ │ │ │
│ │ │
└──────────┼────────────────────────┼─►MasterSchedulerBootStrap │ │
│ │ │ │
│ └─────────────────────────┘ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
│ │ │ │
│ │
└─────────────────────┴────────────────────┴────────────────────┴────────────────────────┴───────────────────────────────┘
```
- API, TriggerController, TriggerService: CURD Trigger, Create new Trigger
Instance(which currently is correspond to Schedule/Command in DB)
- Start a `TriggerTaskExecutorThreadPool` in master, which should align with
logic task executor
+ For push trigger, directly accept request from api(or any other signal
from master) and directly create trigger_instance into DB
+ For pull trigger, it should be handled as a poll task with priortity &
timeout. I suggest to put it into master due to we may not wants user create
complex IO logic in trigger.
- Scheduler takes trigger instance for scheduling, which could be scheduled
by master host & priortity.
--
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]
