Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vision of the WG(@aturon):
- https://rust-lang-nursery.github.io/wg-net/web-foundations/
- There are a lot of crates for working with web, but no one has looked at the big-picture.
- Eg: Making sure various crates fit well, standardized interfaces, locating missing features.
- General feeling of production users of rust-web is that the ecosyste is immature. Hard to figure out what the pieces even are, let alone how to put it together.
- Compounded by async-rust flux.
- Goal: Improve state of affairs, while being very open and collaborative.
- Vision document: focused on what's feasable for the rest of the year
- Two related efforts: "Top down", "Bottom up"
- Top Down:
- Building a web framework (Tide) based almost entirely on external crates
- A way to drive overall work, set up clear needs and have a useful artifact at the end.
- Strive to build all new functionality in re-usable crates which are not specific to the framework
- Use this as a way to standardize on interface and make specific recommendations on what crates to use, etc.
- Plan on writing this as a small book in addition to the framework itself.
- This will go through each aspect of web development and explain the ecosystem around it.
- Bottom up:
- Discovering and trying to use existing crates, and writing small experiments and examples
- Driven in part by surveys and community-provided examples and requests.
- These two should come together at some point, but currently are separate efforts
- By the end of 2019,there should be significantly more documentation and guidance around rust-web.
- A lot of improvements should have been made in the crates used in the ecosystem.
- Have a new framework built.
- Questions:
- How to avoid confusion with adding a new framework?
- Tower is for a general abstraction for services.
- Idea is to use Tower to build Tide
- Make a distinction between providing a service vs a full fledged framework.
- Want to contribute to crates like tower-service, hyper, http, url etc.
- Rocket, Gotham, warp, tower-web are existing frameworks and Tide will be adding to the list.
- Hopefully, by doing this in a component-driven way, we can help all those frameworks share more code.
- (@rolf) looks like we are looking for some core abstraction(s) to settle on.
- Status of Tide/How to participate(@aturon):
- Fundamental parts of a framework need to be built (Before external crates can be used).
- A start on a blog series:
- (+Rising Tide: building a modular web framework in the open )
- Trying to outline the goals of a web framework in general.
- Take a look at those fundamental pieces.
- First two: The service abstraction and routing:
- Service abstraction:
- Service abstraction is what @rolf was alluding to.
- What rack provides in the ruby world.
- A general way of saying: "A function that consumes requests and produces responses."
- Can be pretty subtle.
- Goal: Decouple web app/frameworks from web servers.
- Most frameworks in rust use hyper directly.
- actix is the exception which uses its own server.
- With the service abstraction, a "many-to-many" relationship possible between servers which consume underlying protocol and frameworks which can help you write services.
- Different from the Service trait in hyper.
- Should ideally exist in a standalone crate
- @seanmonstar: effort already exists:
- generalizing hyper into the http crate and tower-service to be the rack/wsgi/servlet of rust.
- @aturon: get the WG more involved and get community buy-in on standardizing.
- Once this abstraction exists, a framework is a fancy way of writing services.
- Helps factor out HTTP and other concerns.
- Routing:
- Note: some frameworks like warp don't need routing as a separate concern.
- Many possible approaches.
- @seanmonstar: 2) Document the "canonical" approaches that fit rust well. 3) Choose one of them for Tide and build it such that it can be shared.
- Routing is opinionated. At the same time there are already a couple of clear "styles".
- The implementation can be standardized.
- (@aturon) these are the pieces put together so far. Working on a blog series. Hoping that this exploration and documentation can be done in an open way from the start.:
- First steps: a bunch of digging and will be writing thoughts.
- Hoping that after the first couple of posts, to get more people involved.
- Will be opening issues for some of these questions.
- Will be looking for collaborators.
- For now, just let me know if you're interested.
- (@Carl Lerche): pushing on BufStream to standardize the body:
- Combo of Service, http Request/Response/BufStream is going to be tower-http
- BufStream is moving to tokio-buf
- Once this work is done, work will start at integrating tower and these traits in hyper and warp
- tower-web also includes a middleware trait to push on those concepts.
- Working with actix
- If warp + actix move to Tower that makes the ecosystem.
- (@thramp): It is pretty useful to have a separate function that handles the routing logic, while a separate function is responsible for the actual request handling.
- (@aturon): Hope to use the WG to drive help from the community for these topics.
- Micro projects(@yoshyawuyts):
- Tracking issue for the bottom up work:
- https://github.com/rust-lang-nursery/wg-net/issues/45 :
- Come up and implement small projects in order to improve the status quo around web rust.
- Activity has slowed down somewhat recently.
- Not sure if the idea behind it was explained well.
- Can the wg-net blog draw more attention to the effort?
- Can quest issues help?
- Crowd sourcing the kinds of examples people would like to see in the web space.
- Idea for a blog post: explain the effort nd ask for both crowdsourcing of examples and for participation in implementing them.
- Survey (@yoshyawuyts):
- It'd be great to have a survey to ask people how folks are using rust for web programming.
- Not sure where to start.
- @rolf: how many people can be reached by the survey?
- @aturon: the rust survey hits 5k people every year. CLI WG survey got at least several hundred.
- @rolf: making easy to fill with checkboxes and radio buttons instead of free form answers will help gather a lot of information.:
- What are the pain points?
- Figure out people's experiences.
- What modules they use, what they think is good, what they think is less good.
- Open a new issue for a general web survey.
- Blog posts (@yoshyawuyts):
- We have some posts in works.
- Do these posts go on the web-net website or personal websites?
- WG website.
- Talk to framework authors about their frameworks.
- Create tracking issue:
- Discuss good questions and get authors involved.
- Newsletter(@yoshyawuyts):
- Date for shared newsletter confirmed: 12 September.
- Posting to internals.rust-lang.org
- Tracking issue: https://github.com/rust-lang-nursery/wg-net/issues/51
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement