[Haskell-cafe] RFC: A standardized interface between web servers
and applications or frameworks (ala WSGI)
manlio_perillo at libero.it
Sun Apr 13 10:21:42 EDT 2008
Johan Tibell ha scritto:
> Good day hackers,
> The Python community have been successful in standardizing an
> interface between web server and applications or frameworks resulting
> in users having more control over their web stack by being able to
> pick frameworks independently from web servers, and vice versa. I
> propose we try to do the same for Haskell. I've written half a draft
> for a Haskell version of Python's PEP 333 . If you're interested in
> taking part in this effort please read through the Python spec first
> (as it is way more complete and you can understand this proposal
> better by reading it, I've skipped some important issues in my first
> draft) and then go read the Haskell spec .
I'm very interested, thanks for the effort.
> I'm particularly
> interesting in feedback regarding:
> * Doing in this way won't work as it violates HTTP/CGI spec part X, Y
> and Z (the Python spec takes lots of things from the CGI spec
> including naming and semantics).
> * My server/framework could never provide/be run under this interface.
> * This interface has bad performance by design.
> * Using a different set of data types would work better.
I'm not yet an Haskell expert, however one of the great feature of WSGI
is that the environ is a Python dictionary.
This means that the user can add new keys/values in it.
I'm using this feature, in my WSGI implementation for Nginx (and in a
mini framework I'm writing) to store user configuration in the
environment, and to cache the result of the parsing of request headers.
I'm not sure if this make sense in Haskell.
> The spec needs to be extended to cover all the corners of HTTP. Some
> parts need to be motivated better. It is easier for me to motivate
> things if people would tell me what parts are badly motivated.
> Note: I'm open to a complete rewrite if needed. I'm not wedded to the
> current design and/or wording. In fact parts of the wording is
> borrowed from the Python spec. The parts with bad grammar are all
> 1. http://www.python.org/dev/peps/pep-0333/
> 2. http://www.haskell.org/haskellwiki/WebApplicationInterface
> -- Johan
More information about the Haskell-Cafe