-
Notifications
You must be signed in to change notification settings - Fork 352
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
refactor crates for better api stability #301
Conversation
15dd837
to
e494729
Compare
I feel
I don't feel the need to separate local-waker and local-channel too. As if we remove the useless timeout service and move dispatcher to actix-http where it belongs. actix-utils would only depends on |
The point of this change is to give better stability guarantees. Simply put, exposing tokio-util v0.6 items in actix-utils via dispatcher will not do because it is post v1. That said, I can provide further reasoning to your points.
Granted, this could also be solved by moving dispatcher to -http but then it would not be useful anywhere else. It could easily be useful for other purposes. Plus having it in -codec means we can break change whenever and move it if that's obviously a good choice in future.
Yes, I think I agree with this point; that would make -utils a leaf crate which is good. |
The thing about In actix we don't use this pattern for dispatch future because In actix-web we don't expose any type that can be In In So basically dispatcher is almost not useful anywhere but if it's needed it mostly would couple with |
And indeed, the point of this repo is that there are no parts explicitly bound to using the HTTP protocol. The dispatcher here is useful exactly because WebSockets is not HTTP but is a much simpler TCP based protocol. Given you feel strongly about this, we can move the dispatcher into either it's own crate or, more likely, into -http. |
I believe websocket is on top of http right? The current usage of websocket through actix-util dispatcher is to use a double frame like I feel the dispatcher is used for other protocols like mqtt and amqp that Nikolay has transfered away from actix repos. They have their own service types and codec which are non exist anymore in actix repos. |
This is my argument for not constraining a generic dispatcher to -http. But it's not an immediate concern, for sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
PR Type
Refactor / Semver improvement
PR Checklist
Overview
LocalWaker
has own crate: local-waker.We want to reduce the number of 0.x items in the public API of stable crates like actix-web. Therefore, having some stable Ready futures is important for when/if futures crates have a version bump this year.
Dep tree of actix-net is now this: