-
Notifications
You must be signed in to change notification settings - Fork 92
Support async Hyper #40
Comments
@abonander |
It still works with Hyper 0.10 and below. I am working on a version that supports asynchronous requests but I'm not sure if I want to publish it as a separate crate or what. I can make everything work in the same crate and it can share a lot of code, which is a big plus. The downside is that, to support two different versions of Hyper I will have to move one to a separate crate. I was actually thinking of just moving all integrations to a separate crate, in fact. This is what I've been thinking:
|
cool, i thought about that too, i had started a toy project for that
is this really necessary? if anyone needs legacy support they can just use an old version of multipart, also that's why we use SemVer.
why not call it "multipart-hyper"? 1. async is an essential part of the "new" hyper, so it shouldn't be part of the name 2. the implementation agnostic stuff is already in the multipart crate |
The issue with having legacy users "just use an old version" is that they won't get any performance improvements or bugfixes, or backwards-compatible API improvements, without an additional effort to backport them. With all unstable public dependencies relegated to the Alternately, it could be
Because the point isn't specific crate integrations, it's support for the paradigm. Any future async HTTP crates should be easy to integrate even if they have a callback-style API instead of a futures-based one. One of the conveniences I plan to provide for the asynchronous API is some sort of background file loader since blocking operations shouldn't occur within event loops, and that could be shared by all asynchronous integrations. Also, because I don't want to publish separate crates for every integration. Nickel is a special-case for reasons outlined in #72. |
yeah, but you could just let them use an "older" SemVer-version and backport feature (i don't know how as i assume the code for async and sync is very different)/fix bugs for that version (say 1.x being the async version and 0.x the sync; and on the dev side sync branch for the 0.x/sync version and master branch for the 1.x/async part). Also they wouldn't need to "upgrade" to another crate.
ok, so "mutlipart" would contain some shared code which can be used for the async and the sync crate.
Ok |
1.x can't be the async version as it would still expose public dependencies that are not yet 1.x ( What code I intend to share between async and sync is still up in the air. They would mostly just use type definitions from the main crate and maybe some internals, but otherwise would be mostly independent. I could just create a new crate entirely built around asynchronous HTTP, that was the original idea. It's seeming simpler at this point. |
This might necessitate creating a new crate architected around async requests.
The text was updated successfully, but these errors were encountered: