-
Notifications
You must be signed in to change notification settings - Fork 187
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
支持 Monoio 作为可选的 Runtime #3
Comments
Happy to be assigned this if you've not found anyone else. I had a look through the source and the task doesn't look too bad. Even in the dependencies, it doesn't look like there are many calls to Tokio runtime specific code. |
Wow! Great you would like to help! |
I've done most of the preliminary work so that you can enable a feature flag and the runtime will swap. It currently continues to use non runtime specific Tokio components where possible (eg. AsyncRead/AsyncWrite). The feature is currently blocked as there are several instances where a |
@ThaddeusTreloar Hello, sorry for the late reply, I'm busy refactoring the |
I'm eager about this feature |
@PureWhiteWu sorry for the silence, I have been busy over the holiday season. |
@PureWhiteWu let me know if I should move that question to the motore repository. |
@ThaddeusTreloar @PureWhiteWu looking forward to having monoio being used here too! pls show the example hello_grpc_tls with h2 using monoio. thx |
Feature Request
Crates
影响所有的 crate。
Motivation
Monoio 是一个主要基于 io-uring 的 thread-per-core 的 runtime,在 thread-per-core 场景下性能很好。
支持 Monoio 作为可选的 runtime 可以使得我们的部分场景的用户获得巨大的性能提升,如 Proxy 场景用户和存储场景用户。
Proposal
首先,我们希望用户能够以较低的成本来在两个 Runtime 之间切换,例如使用 feature 的方式。我们可以定义两个 feature,如
runtime-monoio
和runtime-tokio
。接着,我们希望能够尽可能提高可维护性,因此我们可以把一些 runtime 相关的逻辑,抽象出来一个独立的包,例如叫做
volo-rt
,统一放到这个包里维护,并在其它 crate 中复用。最后,我们需要找到所有直接依赖 tokio 的地方,改成依赖
volo-rt
或者通过条件编译改成 monoio 的方案。要注意,有一些依赖库可能会直接依赖 tokio。
Alternatives
另一种可选的方案是,以牺牲一定性能为代价,尝试使用 monoio-compact 来兼容 Tokio。该方案可行性仍然待讨论。
The text was updated successfully, but these errors were encountered: