[Web-SIG] [Python-Dev] Adding wsgiref to stdlib
Ian Bicking
ianb at colorstudy.com
Tue May 2 17:53:51 CEST 2006
Luke Arno wrote:
> I don't pipe up much but dispatch has been on my
> mind for a while as I have been working on this:
>
> http://lukearno.com/projects/selector/
>
> I think dispatching is best left as an (obvious) exercise
> to the reader. What dispatching makes sense, what
> metaphor or technique should be applied, is situational.
I don't think the idea is obvious to readers. Prefix dispatching is
also unique, in that it's the only kind of dispatching that can be
represented fully in conventional WSGI (without other environ keys);
though host matching also pretty much works.
Prefix matching also doesn't compete very actively with other
dispatching techniques. It's not enough to build a framework on, it
represents a technique that already exists in lots of web servers
> When I see other WSGI servers requiring a list of
> prefix/app pairs in their init signature, I am put off.
>
> The server's job is to translate HTTP (or SCGI, FCGI,
> etc.) to WSGI. Just do that.
This isn't being proposed as part of the server, just as a tool in
wsgiref. It's up to the user to use the dispatcher together with the
server. It's part of other servers,
> To me WSGI is not just the freedom of frameworks
> interoperating, but the freedom _from_ frameworks.
> The stack can be unbundled and I can pick the the
> best thing for my needs at each layer, à la carte.
This is still unbundled. I think that including an unbundled dispatcher
actually can help encourage more unbundled dispatchers outside of the
standard library.
Without a prefix dispatcher available and easily referenced in the
documentation, I think people will see wsgiref as incomplete and silly,
because it's ingrained in people that the web server does dispatching.
Another problem is if they don't use WSGI/CGI conventions for what
prefix dispatching implement on their own, which means that they won't
be as compatible with other webservers and environments.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Web-SIG
mailing list