News for hackers. Stuff that matters.
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by zzmp on Wednesday July 02, 2014 @09:54AM (#7976953)
The Iron team is here. Feel free to ask us anything!
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by mercurial on Wednesday July 02, 2014 @11:16AM (#7977432)
Simple question. According to [1], middlewares are cloned for each request. Is there a good built-in way of accessing shared mutable data, such as a connection pool?

1: http://docs.ironframework.io/iron/trait.Middleware.html

Re:Show HN: Iron, a fast middleware-oriented Rust web server... by zzmp on Wednesday July 02, 2014 @01:19PM (#7978201)
We have a middleware for that! You can look at http://github.com/iron/persistent, which does wrap an RWLock in an Arc. It also provides a struct to make your middleware Share, so you can do similar things.

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.

Re:Show HN: Iron, a fast middleware-oriented Rust web server... by eddyb on Wednesday July 02, 2014 @12:50PM (#7978028)
I would guess `Arc<Mutex<T>>`, `Arc<RWLock<T>>` and `Arc<SomeConcurrentContainer>` would all work (cloning them is a ref-count - the handle gets copied, not the contents).
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by jonreem on Wednesday July 02, 2014 @01:18PM (#7978194)
You are looking for https://github.com/iron/persistent, which offers two utility middleware for exactly this.
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by mercurial on Wednesday July 02, 2014 @01:42PM (#7978395)
Very nice, thanks.
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by necaris on Wednesday July 02, 2014 @10:47AM (#7977261)
I've been curious about the HTTP implementation, particularly considering that `rust-http` is in bugfix-only mode and `teepee` is still in design phase. Did you folks build it from scratch?
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by zzmp on Wednesday July 02, 2014 @10:49AM (#7977275)
We built Iron on top of `rust-http`, but we're excited for `teepee` too, and there are a few others popping up as well.
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by bjz_ on Wednesday July 02, 2014 @01:09PM (#7978132)
Are you planning on lending assistance to Teepee? We are kind of in limbo in terms of http right now and it would be a shame for Teepee to turn out to be vapourware :(

(A hint for any folks experienced with http - this could be your chance to make lasting mark on the Rust ecosystem!)

Re:Show HN: Iron, a fast middleware-oriented Rust web server... by chrismorgan on Thursday July 03, 2014 @07:46PM (#7986543)
Teepee is getting back on track now; I just had a few weeks where I was unable to do much with it, but I started designing and developing things again yesterday.
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by necaris on Thursday July 03, 2014 @08:32AM (#7982634)
Not that experienced, but enthusiastic -- does that count ;-)?
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by DomreiRoam on Wednesday July 02, 2014 @11:19AM (#7977457)
Do you plan to support handling XML? I mean XSLT transformation, XPath routing, XQuery?
Re:Show HN: Iron, a fast middleware-oriented Rust web server... by geertj on Wednesday July 02, 2014 @12:28PM (#7977909)
Please don't!