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

Consider switching ureq for something async (reqwest, hyper) #584

Open
joepio opened this issue Feb 8, 2023 · 0 comments
Open

Consider switching ureq for something async (reqwest, hyper) #584

joepio opened this issue Feb 8, 2023 · 0 comments

Comments

@joepio
Copy link
Member

joepio commented Feb 8, 2023

Anything that fetches something will now block the thread, because I use ureq. We could switch to something like hyper (which btw we're probably depending on pretty soon, anyway #192).

However, introducing async stuff into Atomic-Server warrants at least some more discussion. In issue #12 I basically concluded that we didn't need async, and that it might hurt performance. Async has overhead - that's unavoidable. I'm not sure how bad it is, though.

Also, note that we already have a little bit of async in atomic_lib, in a plugin handler for email.

What happens if we make fetch async

  • get_resouce will become async
  • this is used practically everywhere, so now pretty much everything will become async.

If async is everywhere, is that a problem? I've read that rust devs find async pretty hard, so that means it might become harder to use atomic_lib.

Anyways, I believe async can't be used in traits right now, but this is probably changing soon, as it's already in nightly since november 2022.

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

1 participant