From: khaines@... Date: 2006-09-22T14:44:32+09:00 Subject: Re: A standard like WSGI for Ruby? On Fri, 22 Sep 2006, Devin Mullins wrote: > Well, part of that is mindshare. Consider that the Nitro, IOWA authors wrote > the Mongrel adapters themselves (for the most part). In this case you could > call the Mongrel API the Ruby version of WSGI. At the end of the day, the IOWA/Mongrel integration is a trivial thing, and something like WSGI could hardly make it easier than it already is without imposing design decisions on me. Here it is: def process(req, res) Thread.current[:worker] = true unless handle_file(req, res) request = Iowa::Request::Mongrel.new(req) response = Iowa.handleConnection request ::Iowa::InlineClient.new(request,response).print(res) end end That's the core of it. Not hard. IOWA already has an established precedent regarding what a request object looks like, so with something like WSGI, I'd either have to realign the request object expectation to whatever it provided, or I'd have to write a simple Iowa::Request::WSGI just like the Iowa::Request::Mongrel to take the request and apply it to the shape the application expects. And it's really no big deal. Maybe I'm failing to understand what WSGI really is because right now I don't see how it would help me. Kirk Haines