tower icon indicating copy to clipboard operation
tower copied to clipboard

Document the library

Open carllerche opened this issue 7 years ago • 2 comments
trafficstars

This is a meta issue tracking concepts that should be included as part of the documentation.

  • [ ] Graceful shutdown (#32).
  • [ ] poll_ready -> Err (#43).
  • [ ] Back pressure (#112).
  • [ ] Use Service + Clone to allow moving an inner service into a response future.
  • [ ] Implement Service for Arc<MyType> to get around &mut requirement.
  • [ ] End to end testing (example).
  • [ ] Client shims (#65).
  • [ ] Full stack examples (#126).

carllerche avatar Dec 11 '17 19:12 carllerche

Regarding “Implement Service for Arc<MyType> to get around &mut requirement“, could this be done using arbitrary self types, or am I misunderstanding something?

davidbarsky avatar Apr 04 '19 20:04 davidbarsky

Improving the general documentation around Tower is something I would like to drive. I have seen several cases on Twitter and Reddit where people say that Tower seems cool but they don't really understand it. I also remember thinking the same thing when I first came to Tower.

I'm very open to suggestions about how to do this but my current plan is:

  1. Make sure all middlewares have examples in the docs. Trying to figure out how to use something from the types alone can be hard.
  2. Add examples of how to put all the pieces together and build an HTTP server and client with hyper. Our current number of examples isn't impressive 😅
  3. Write a guide similar to Tonic's helloworld guide that explains how to build a middleware from scratch.
  4. Link to the Tower deep dive stream I did some months ago. Several people have mentioned this helped them understand the concepts better.

I don't imagine we can get all this done before Tower 0.5 so don't think it should block that release.

davidpdrsn avatar May 08 '21 12:05 davidpdrsn