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

Rename tower::steer? #544

Open
olix0r opened this issue Jan 22, 2021 · 4 comments
Open

Rename tower::steer? #544

olix0r opened this issue Jan 22, 2021 · 4 comments
Milestone

Comments

@olix0r
Copy link
Collaborator

olix0r commented Jan 22, 2021

The name steer is pretty unintuitive. Personally, it makes me think of cattle.

Perhaps we can rename it to something more concrete/descriptive in the next breaking release?

@olix0r olix0r added this to the 0.5 milestone Jan 22, 2021
@davidpdrsn
Copy link
Member

I've also thought about steer a bit. Not sure its very useful atm due to all the services having to be the same type. Unless users are cool with boxing of course.

At Embark I've made a simple Multiplex<S1, S2> middleware that routes requests between two services. Since it only accepts two services they don't have to be the same type. I'm using that to send GET /metrics to one service, GET /health/(live|ready) to another, and all other requests to a catch all 404 Not Found service. It still requires that all services are ready before sending requests but at least it doesn't require boxing.

@rrichardson
Copy link

I agree that the name isn't terribly helpful. I was looking for a "router" type Service in the listing in the Tower docs, and didn't find one, because it was named Steer. I didn't actually notice it until later when I was grepping through code.

Steering the topic slightly (ha) .... My recommendation for Steer would be to move it to documentation, and replace it with a dynamic Service that mimicks Balance's ability to use a Discover for routes. If static routes are desired, then one can use the ServiceDiscoveryList.

I have implemented such a service, (I unoriginally named it "Router") I'd be happy to submit the code, but it would probably take some tweaks from a Tower expert to make the types more friendly.

@akshayknarayan
Copy link
Contributor

See also prior discussion here: #426 (comment)

@hawkw
Copy link
Member

hawkw commented Mar 11, 2022

Do we want to address this for 0.5?

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

No branches or pull requests

5 participants