[Haskell-cafe] HSGI: Haskell Server Gateway Interface

Manlio Perillo manlio_perillo at libero.it
Sat Feb 7 16:52:21 EST 2009

Felix Martini ha scritto:
> Hi Manlio,
> Have you looked at
> http://www.haskell.org/haskellwiki/WebApplicationInterface ?

If you remember, I posted a few messages in the thread where WAI was 

There is a separate channel where we can discuss in detail?
Or should I just use this thread?

> If you
> did is there something in that proposal that you think should be
> changed or is not clear? 

Here are the problems:

1) supported HTTP methods are fixed, since you use a custom data type
2) no support for other possible CGI variables
    (or simply custom variables: I use the environ dictionary to store
    application configuration, and I think it is a great thing).

I think that we should simply have a dictionary
   Map ByteString ByteString

3) No support for optimized file serving, like with WSGI file_wrapper
4) No support for keeping "complex" state (like database connection) in
    the environ.

    I have read some examples with CGI package, where a custom monad
    transformer is used.
    I'm not sure if this solution is flexible and "scalable".
5) I can't find documentation about the type of the response.
    It is rather clear that it is
       (ByteString, [(ByteString, ByteString)], Enumerator)

    but this should be documented somewhere.

There are also few typos:

* Chapter 2:
   "A standardized interface is of no use of no..."
   should be
   "A standardized interface is of no use if no..."

* Chapter 4.2
   "However, if the the amount..."
   should be
   "However, if the amount..."

As a last note: I have some doubts about the name, since gateway is not 
in it ;-).

Regards   Manlio Perillo

More information about the Haskell-Cafe mailing list