Git Product home page Git Product logo

Comments (4)

dmfutcher avatar dmfutcher commented on May 24, 2024 1

Hey @agersant

Agree there's no need for async here. Happy to review a PR replacing reqwest entirely.

from rustfm-scrobble.

dmfutcher avatar dmfutcher commented on May 24, 2024 1

Released in v1.1.0. Thanks for again for sorting this out @agersant!

from rustfm-scrobble.

agersant avatar agersant commented on May 24, 2024

Tangentially related to this issue. I noticed that because of its reliance on reqwest, rustfm-scrobble has quite a large dependency tree which pulls all sorts of crates from the async ecosystem.

This can be problematic for two sets of users:

  • Users trying to keep their own dependencies minimal.
  • Users with dependencies relying a different version of hyper. Not breaking per-se, but building TWO versions of hyper and friends can bloat builds a lot.

I am going to start working on a version of rustfm-scrobble using a more minimal (blocking) HTTP client like ureq. Which forms of this contribution would you be interested in?

A. As a full replacement for reqwest
B. Behind a feature-gate, keeping reqwest as the default
C. Not interested at all

Thanks!

Edit: I forgot to mention why I think there is little value in having this crate being part of the async ecosystem.

  1. Async is useful to scale beyond a few hundred concurrent requests. Programs using rustfm-scrobble to make this many requests at the same time are most likely a very small niche, compared to programs who operate on behalf of a user.
  2. Async frameworks have some form of block_on() method to handle long blocking operations without compromising their scheduling. This makes it possible to use synchronous code in an async context. But the opposite is not true: there is no working with async without tokio or async-std.

from rustfm-scrobble.

agersant avatar agersant commented on May 24, 2024

Thanks!

from rustfm-scrobble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.