Skip to content

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

@joepio

Description

@joepio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions