Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > A standard like WSGI for Ruby?

Reply
Thread Tools

A standard like WSGI for Ruby?

 
 
Phil Tomson
Guest
Posts: n/a
 
      09-22-2006
There's a perennial discussion on Reddit about the strengths of Python vs Ruby.

there was mention of WSGI as a web-app standard on Python. here's the quote:

"That's the point, it is a language-wide standard that has been
adopted by the community officialy. It makes it trivial to make a web
application that supports WSGI to run on any server that runs on WSGI.
In Ruby, you look at something like Mongrel and it has to explicitly
add Rails, Camping, Nitro support. In Python, if a server is WSGI,
anything that supports WSGI will run on it. Some frameworks, like
Pylons, have incorporated it throughout the stack to make it trivial
to swap put template systems, ORMs, you name it. Rubyists would do
best to check it out; while it is a very simple standard, it is very
empowering to the web development community. That's why you see so
many frameworks in Python, because frankly they are rather easy to put
together."

Could Ruby benefit from an internal standard like this?

 
Reply With Quote
 
 
 
 
Devin Mullins
Guest
Posts: n/a
 
      09-22-2006
Phil Tomson wrote:
> In Ruby, you look at something like Mongrel and it has to explicitly
> add Rails, Camping, Nitro support. In Python, if a server is WSGI,
> anything that supports WSGI will run on it.

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.

> Some frameworks, like
> Pylons, have incorporated it throughout the stack to make it trivial
> to swap put template systems, ORMs, you name it.

Yeah, that's my (limited) understanding of where WSGI shines. In Ruby,
OTOH, there need to exist m*n adapters between m view libraries and n
controller libraries. I dunno... big whoop. The adapters are, like, 3
lines of code, and there isn't a heck of a lot of demand for Amrita (as
in, not erb) as *is*.

> That's why you see so
> many frameworks in Python, because frankly they are rather easy to put
> together.

Not true. WSGI arose *because* of the so many frameworks, and the
pro-Rails argument that "we don't have to waste time choosing a stack."

> Could Ruby benefit from an internal standard like this?

Muh... I dunno. No?

Devin

 
Reply With Quote
 
 
 
 
khaines@enigo.com
Guest
Posts: n/a
 
      09-22-2006
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(r es)
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

 
Reply With Quote
 
Logan Capaldo
Guest
Posts: n/a
 
      09-22-2006
On Fri, Sep 22, 2006 at 02:44:32PM +0900, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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.
>

I think that was exactly Devin's point. (Is that it's so trivial, Ruby
doesn't need such a standard.)

 
Reply With Quote
 
khaines@enigo.com
Guest
Posts: n/a
 
      09-22-2006
On Fri, 22 Sep 2006, Logan Capaldo wrote:

>> 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.
>>

> I think that was exactly Devin's point. (Is that it's so trivial, Ruby
> doesn't need such a standard.)


Yeah. I was trying to support his point with my example.


Kirk Haines

 
Reply With Quote
 
Logan Capaldo
Guest
Posts: n/a
 
      09-22-2006
On Fri, Sep 22, 2006 at 10:46:32PM +0900, (E-Mail Removed) wrote:
> On Fri, 22 Sep 2006, Logan Capaldo wrote:
>
> >>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.
> >>

> >I think that was exactly Devin's point. (Is that it's so trivial, Ruby
> >doesn't need such a standard.)

>
> Yeah. I was trying to support his point with my example.
>

I'm glad this whole thread is people agreeing!
>
> Kirk Haines


 
Reply With Quote
 
M. Edward (Ed) Borasky
Guest
Posts: n/a
 
      09-22-2006
Logan Capaldo wrote:
> On Fri, Sep 22, 2006 at 10:46:32PM +0900, (E-Mail Removed) wrote:
>> On Fri, 22 Sep 2006, Logan Capaldo wrote:
>>
>>>> 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.
>>>>
>>> I think that was exactly Devin's point. (Is that it's so trivial, Ruby
>>> doesn't need such a standard.)

>> Yeah. I was trying to support his point with my example.
>>

> I'm glad this whole thread is people agreeing!
>> Kirk Haines

>
>

Yes ... I agree

Hey -- a new Rejected Ruby Book Title!!

Ruby Don't Need No Stinkin' WSGI

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
standard libraries don't behave like standard 'libraries' Sriram Srinivasan Python 13 11-12-2009 06:05 PM
Dumb-as-rocks WSGI serving using standard library Ben Finney Python 2 05-22-2006 01:25 PM
object-like macro used like function-like macro Patrick Kowalzick C++ 5 03-14-2006 03:30 PM
WSGI-server in the standard distro? Thomas W Python 0 08-07-2005 04:11 PM
Re: Snakelets and WSGI Robert Brewer Python 2 10-13-2004 10:26 AM



Advertisments