on master help sign in
hcar received.
commitff0c4c2de4386b453e9cb3f878fcb56b8f087b20 authorKazu Yamamoto <kazu@iij.ad.jp> dateMon 24 Apr 2017, 12:27 (9 years ago) parent0e6f57d
2 files changed+29−35
hcar-wai.tex+22−28 hcar-warp.tex+7−7
hcar-wai.tex+22−28
@@ -1,14 +1,14 @@
11% WAI-KW.tex
2−\begin{hcarentry}[updated]{WAI}
2+\begin{hcarentry}{WAI}
33\label{wai}
44\report{Kazu Yamamoto}%11/16
55\participants{Michael Snoyman, Greg Weber}
66\status{stable}
77\makeheader
88
9−WAI (Web Application Interface) is an application interface
10−between web applications and handlers in Haskell.
11−The \texttt{Application} data type is defined as follows:
9+WAI (Web Application Interface) is an application interface between web
10+applications and handlers in Haskell. The \texttt{Application} data type is
11+defined as follows:
1212
1313\begin{verbatim}
1414type Application
@@ -17,29 +17,22 @@ type Application
1717 -> IO ResponseReceived
1818\end{verbatim}
1919
20−That is, a WAI application takes two arguments: a \texttt{Request} and
21−a function to send a \texttt{Response}.
22−So, the typical behavior of WAI application is
23−processing a request,
24−generating a response and
25−passing the response to the function.
26−
27−Historically speaking, this interface made possible to develop handlers
28−other than HTTP.
29−The WAI applications can run through FastCGI (wai-handler-fastcgi),
30−run as stand-alone (wai-handler-webkit), etc.
31−But the most popular handler is based on HTTP, of course.
32−The major HTTP handler for WAI is Warp which now provides
33−both HTTP/1.1 and HTTP/2. TLS (warp-tls) is also available.
34−New transports such as
35−WebSocket (wai-websocket) and Event Source (wai-extra)
36−can be implemented, too.
37−
38−It is possible to develop WAI applications directly.
39−For instance, Hoogle and Mighttpd2 take this way.
40−However, you may want to use web application frameworks
41−such as Apiary, MFlow, rest, Servant, Scotty, Spock,
42−Yesod, etc.
20+That is, a WAI application takes two arguments: a \texttt{Request} and a
21+function to send a \texttt{Response}. So, the typical behavior of WAI
22+application is processing a request, generating a response and passing the
23+response to the function.
24+
25+Historically speaking, this interface made possible to develop handlers other
26+than HTTP. The WAI applications can run through FastCGI
27+(wai-handler-fastcgi), run as stand-alone (wai-handler-webkit), etc. But the
28+most popular handler is based on HTTP, of course. The major HTTP handler for
29+WAI is Warp which now provides both HTTP/1.1 and HTTP/2. TLS (warp-tls) is
30+also available. New transports such as WebSocket (wai-websocket) and Event
31+Source (wai-extra) can be implemented, too.
32+
33+It is possible to develop WAI applications directly. For instance, Hoogle and
34+Mighttpd2 take this way. However, you may want to use web application
35+frameworks such as Apiary, MFlow, rest, Servant, Scotty, Spock, Yesod, etc.
4336
4437WAI also provides \texttt{Middleware}:
4538
@@ -47,7 +40,8 @@ WAI also provides \texttt{Middleware}:
4740type Middleware = Application -> Application
4841\end{verbatim}
4942
50−WAI middleware can inspect and transform a request, for example by automatically gzipping a response or logging a request (wai-extra).
43+WAI middleware can inspect and transform a request, for example by
44+automatically gzipping a response or logging a request (wai-extra).
5145
5246Since the last HCAR, no major changes were made.
5347
hcar-warp.tex+7−7
@@ -1,5 +1,5 @@
11% Warp-KW.tex
2−\begin{hcarentry}{Warp}
2+\begin{hcarentry}[updated]{Warp}
33\label{warp}
44\report{Kazu Yamamoto}%11/16
55\participants{Michael Snoyman}
@@ -15,19 +15,19 @@ If you are interested, please read ``Implementing HTTP/2 server push'' below.
1515\FurtherReading
1616\begin{compactitem}
1717\item``Warp: A Haskell Web Server''
18− \begin{itemize}
18+ \begin{compactitem}
1919 \item the May/June 2011 issue of IEEE Internet Computing
2020 \item Issue page: \url{http://www.computer.org/portal/web/csdl/abs/mags/ic/2011/03/mic201103toc.htm}
2121 \item PDF: \url{http://steve.vinoski.net/pdf/IC-Warp\_a\_Haskell\_Web\_Server.pdf}
22− \end{itemize}
22+ \end{compactitem}
2323\item ``Warp''
24− \begin{itemize}
24+ \begin{compactitem}
2525 \item The Performance of Open Source Applications
2626 \item HTML: \url{http://www.aosabook.org/en/posa/warp.html}
27− \end{itemize}
27+ \end{compactitem}
2828\item ``Implementing HTTP/2 server push''
29− \begin{itemize}
29+ \begin{compactitem}
3030 \item HTML: \url{http://www.yesodweb.com/blog/2016/07/http2-server-push}
31− \end{itemize}
31+ \end{compactitem}
3232\end{compactitem}
3333\end{hcarentry}