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

[Future] 支持异步submit events #184

Closed
cbqiao opened this issue Sep 26, 2023 · 1 comment
Closed

[Future] 支持异步submit events #184

cbqiao opened this issue Sep 26, 2023 · 1 comment

Comments

@cbqiao
Copy link
Contributor

cbqiao commented Sep 26, 2023

Is your feature request related to a problem? Please describe.
当前scheduler向container发送event使用同步rpc。在 PR 中尝试将rpc修改为异步模式。由于调度发送的event,对于执行顺序有依赖,比如LaunchSourceEvent中,带有windowId,需要严格按照windowId来执行。即使在发送端,已经严格按照顺序将event提交到rpc client。但对于独立的rpc request,不能保证client 端和server端rpc request的数据一致。所以改为异步后导致接收到乱序event,执行不符合预期。在PR 中将rpc恢复回同步模式。

同步模式rpc对影响有非常大影响, 需要等到一个rpc请求返回结果后,才能发送下一个rpc,这样导致scheduler调度发送event被阻塞,影响端到端耗时。
因此从性能考虑,需要将rpc改为异步模式,同时确保发送顺序。

Describe the solution you'd like
使用独立的rpc不能保证有序,在rpc server端可能接收到乱序,如果在一组rpc请求内,允许乱序,而不同组直接通过同步等待,保证严格有序即可。
在scheduler每一轮发送的一组event,对于发给单个worker的event,已经合并到ComposeEvent中,不同event是发给不同的worker的,也即这些event可以允许乱序,在运行时表现为不同worker收到event时间先后顺序不同而已。
当一组event发送完成后,同步等待所有event的响应,直到确认所有event的回应后,才继续执行。

@cbqiao cbqiao changed the title [Future] 支持异步submit pipeline task确保成功 [Future] 支持异步submit events Sep 26, 2023
@pengzhiwei2018
Copy link

done in #185

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

No branches or pull requests

2 participants