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

http client/server library for may #24

Open
alkis opened this issue Jan 15, 2018 · 7 comments
Open

http client/server library for may #24

alkis opened this issue Jan 15, 2018 · 7 comments
Labels

Comments

@alkis
Copy link
Contributor

alkis commented Jan 15, 2018

What's the recommended library for http client/server for may? If none exists perhaps this should be top priority to increase adoption?

@Xudong-Huang
Copy link
Owner

Xudong-Huang commented Jan 16, 2018

well, currently there is not much http clients/severs that implemented on top of MAY. I just publish may_minihttp which is ported from tokio_minihttp

And for the hyper porting is ready to use without change the code that depends on hyper thread module. But I don't think the performance is at it's best due to the outdated implementation of 0.10.x branch.

I'd like to see more adoptions based on MAY, we need time and patience

@alanhoff
Copy link
Contributor

Since most of the frameworks/clients out there are attached to specific network libraries, I would recommend to create ones that relay on Write + Read streams. It would be useful for Rust's ecosystem in geral and compatible with MAY.

And as mentioned before, patience. IMO is better to do it right than fast.

@alkis
Copy link
Contributor Author

alkis commented Jan 16, 2018

Yes underlying libraries should not depend on specific transports but as you say on some abstract streams. Websocket already has https://github.com/snapview/tungstenite-rs/ so it works naturally. Aren't there enough pieces of http (http + httpparse crates) to make a similar library for http?

@alanhoff
Copy link
Contributor

Yup, Rust already have all pieces that we need. Shouldn't be too complicate to join native-tls, a http parser and the http crate into a library that operates over a generic stream.

@alkis
Copy link
Contributor Author

alkis commented Jan 16, 2018

That's what I was thinking as well. And if such a library exists it will benefit may massively. Right now may provides the ease of doing async programming but the most common task (http client) is not covered with a decent library. Anyone with enough time to start hacking on one? :D

@Xudong-Huang
Copy link
Owner

Xudong-Huang commented Jan 16, 2018

Write a http client on top of May is not too complicated. I'd like to impl wrk-rs with such a client library. I was using hyper_may to do so, but the performance can not compare withwrk

@Xudong-Huang
Copy link
Owner

I start the may_http project. It's in a very beginning stage. So far the performance of simple hello world is better than latest hyper branch which is based on future. I welcome anybody to contribute the project. The code logic is simple and straight forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants