Skip to content

Add support for compio async runtime #3838

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

Open
vfosnar opened this issue Apr 23, 2025 · 1 comment
Open

Add support for compio async runtime #3838

vfosnar opened this issue Apr 23, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@vfosnar
Copy link

vfosnar commented Apr 23, 2025

I have found these related issues/pull requests

Could relate to the migration from async-std to smol

Description

A better maintained thread-per-core runtime, alternative to monoio, that supports both Linux and Windows.

Source: https://github.com/compio-rs/compio

Prefered solution

Consider implementing it

Is this a breaking change? Why or why not?

Probably not

@vfosnar vfosnar added the enhancement New feature or request label Apr 23, 2025
@abonander
Copy link
Collaborator

Supporting a completion-based runtime would be a significant refactor as all the buffered reads and writes are based around polling. I can imagine how it might look, but that's more work than I'm interested in doing anytime soon.

compio is not even at 1.0 yet, and even at a quick glance there's a number of design decisions I find questionable:

  • the inclusion of a number of very heavyweight optional dependencies in the main crate can cause significant pollution of a project's Cargo.lock which a lot of users might complain about--something we learned about the hard way;
  • both TLS and QUIC being part of the main crate suggests a weird ordering of priorities and prevents those APIs from evolving independently;
  • in that same vein, including so many other crates in the public API is a huge SemVer hazard, especially ones that are explicitly still experimental like h3;
  • a lot of APIs have at most one sentence for documentation, if they have any documentation at all;
  • I can't for the life of me figure out how Dispatcher is meant to be used. It seems like an analogue of tokio::task::JoinSet, but the fact that panics on worker threads can entirely stall it, and that there's no way to spawn a blocking task when the dispatcher is at capacity without busy-waiting, suggests that it maybe needs another design pass or two. It also seems rather redundant since the runtime itself has the normal spawn() and spawn_blocking() methods that don't have these limitations.
  • there's a comprehensive benchmark suite, but I would like to see some actual data from it without having to run it myself.

I can imagine a lot of this would get resolved over time as development continues, but it's also pretty clear that it's just not mature enough to depend upon yet for production software.

I'm also not convinced yet that io-uring is sufficiently faster or more efficient than epoll to justify the switch. Most of the hard data I can find on it is several years out of date, and it seems to depend heavily on the specific workload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants