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

refactor: replace Tokio with Monoio #1

Merged
merged 1 commit into from
Oct 28, 2024
Merged

refactor: replace Tokio with Monoio #1

merged 1 commit into from
Oct 28, 2024

Conversation

SteveLauC
Copy link
Member

@SteveLauC SteveLauC commented Oct 23, 2024

What does this PR do

This PR is our first step that changes the runtime used by rskafka from Tokio to Monoio, currently, the following items are done:

  • source code can be built

  • unit tests are all passed

    The unit tests of Messenger have been removed bc they need tokio::io::DuplexStream. I tried to port its implementation but failed because Monoio's I/O traits require the implementation of SimplexStream to support concurrent read/write[1], Tokio::io::SimplexStream is basically a bytes::BytesMut, so it cannot support that.

    They can be added back once we have a working version of monoio-duplex

The things that do not work:

  1. TLS support
  2. SOCKS5 proxy
  3. Integration tests
  4. Fuzzy tests
  5. Benchmark

[1]: DuplexStream basically contains 2 SimplexStream, one for read, the other for write. If SimplexStream does not support concurrent read/write, then it needs to be wrapped in a Mutex, then you will have this issue, which is unsolvable, the patch sent in this PR won't work because it changes the state of future, which should never be done.

@SteveLauC SteveLauC changed the title wip refactor: Monoio runtime support Oct 23, 2024
@SteveLauC SteveLauC marked this pull request as draft October 23, 2024 08:44
@SteveLauC SteveLauC marked this pull request as ready for review October 28, 2024 10:31
@SteveLauC SteveLauC changed the title refactor: Monoio runtime support refactor: replace Tokio with Monoio Oct 28, 2024
@SteveLauC SteveLauC merged commit a109ba7 into main Oct 28, 2024
@SteveLauC SteveLauC deleted the refactor/monoio branch October 28, 2024 10:32
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

Successfully merging this pull request may close these issues.

1 participant