Ohh, Rust scores really well on HTTP performance benchmarks!. Got a hunch that after async/await lands it'll be among the nicest things to write too :Dhttps://twitter.com/rustlang/status/1004717197032349697 …
I'd be really interested in seeing how Gotham works out. Personally I think Gotham comes close, but we'll be able to do even better eventually! Dream: for await conn in server { await middleware(&conn)?; await middleware(&conn)?; await router(conn)?; }
-
-
The step in front of the loop would be a sequence of one-off initializers (e.g. setup db connection, rate limiting). All we'd need to do in the loop is pipe it through the middleware. The router is just another piece of middleware, which inside it can have more middleware :D
-
This is pretty much how it works now, will gist you an anonymised snippet of the app I am working on’s router tomorrow when at my machine if you want?
- 11 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.