shuttle icon indicating copy to clipboard operation
shuttle copied to clipboard

[Improvement]: Bump shuttle-tower service to hyper 1.1.0

Open sentinel1909 opened this issue 1 year ago • 1 comments

Describe the improvement

The shuttle-tower service is dependent on hyper 0.14. It would be nice to bump it to hyper 1.1, so that the shuttle-tower service is up to date and ready for the future.

I tried fiddling about this evening, but didn't get far.

The hyper::Server struct is leveraged to build a connection on which to share the Tower service. Hyper 1.1 has removed Server, in favour of eventually incorporating it into the hyper-util crate. The hyper docs provide a server example in which a loop is used to continually listen on a connection and pass the incoming stream to a handler function which is converted to a service using hyper::service_fn.

I'm unclear how to modify this in the context of Shuttle.

I will continue to think, just thought I'd open an issue and start a discussion.

Duplicate declaration

  • [X] I have searched the issues and this improvement has not been requested before.

sentinel1909 avatar Jan 11 '24 05:01 sentinel1909

Screenshot 2024-01-24 at 19 02 28

As far as i think, we have to do something like this, not sure I might be wrong too, but I will try after getting docker and setting up project with newer version.

Also serve_connection function takes IO and Service Function as a argument, not sure how to pass those two.

This implementation is only to show thinking process, not final code snippet : )

dhruvdabhi101 avatar Jan 24 '24 13:01 dhruvdabhi101