Show HN: Iron, a fast middleware-oriented Rust web server framework
github.com
github.com
Would you be willing to contribute a test implementation to our project [1]?
Unfortunately, I'm not sure if anything in Rust should be considered `production-ready` yet, and I haven't worked with any ORM wrappers in Rust (yet).
I think we could get tests 1 and 6, if you'd be interested. I'll try to get to those soon.
For a hello world in my laptop I can get typically 30k requests with Go, and with mono/httpListener ~10k.
I expected it to be much faster.
Edit: but see https://news.ycombinator.com/item?id=7978299
Also the design of Nginx is sophisticated, because it uses the event io + a thread dispatch design.. (at least it was like this last time i've hacked it) and worth being copyied
That said, the framework itself looks interesting, though the 'iron/alloy/etc' terminology is a little bit of an annoyance.
The 200 is being served as the default of `rust-http`. Static will never serve a 404 - it will only defer to the next middleware, and the docs server is overly simple, so it just goes to default.
When I was testing my now-discontinued framework (widmann) using a very early version of rust-http, I felt lucky when it didn't drop or break on half of the requests. Reliability comes before performance in this regard and Rust is a bit from done. I expect that to develop quickly once the general shape of code is known and people start profiling and optimizing.
A spreadsheet: https://docs.google.com/spreadsheets/d/1-5_4wPPKNBYZ6yuw-rRl... The raw data: https://gist.github.com/cmr/3648bcc6365c1dba83f1
The charts themselves: http://imgur.com/gw1mp40,Hn3929i,h2OQiTh
Software versions:
rustc 0.11.0-pre (44ec28cfac9fa3f738e0e77ccca1d804125fd1dd 2014-07-01 21:26:33 +0000)
go version go1.3 linux/amd64
node v0.10.29
Apache 2.4.9
wrk 3.1.0
Arch Linux, x86_64, CPU: https://gist.github.com/cmr/7cc6df806caff2253667
(A hint for any folks experienced with http - this could be your chance to make lasting mark on the Rust ecosystem!)
We also have session, which works on a HashMap under an Arc, although it isolates the mutable data to a session, instead of sharing it across isolated requests.
I noticed one of the repo's more recent issues was caused by a change upstream. The upstream rust devs seem very accessible, but how often do you encounter these kinds of breaking changes. Acknowledging that rust is pre-1.0, is there any way to stay up to date on these kinds of changes before they hit your app so you aren't blind sided?
Usually we woke up in the morning to everything broken due to changes in the nightly, but it's pretty easy to grep for [breaking change] and work from there. Most changes take moments to fix.
A good way to stay up-to-date is always This Week In Rust, or /r/rust.
A year is a very, very, very long time in software. Why do you suggest that long? I'm curious.