Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

wai slides

  • Loading branch information...
commit 2468ca51a742a5ad5b19ef902bffc8f10c05a439 1 parent 7898aac
@astro astro authored
Showing with 44 additions and 2 deletions.
  1. +44 −2 index.html
View
46 index.html
@@ -17,7 +17,7 @@
<!-- Custom style -->
<style type="text/css">
- .cover {
+ .cover, h1, h2, h3, h4 {
text-align: center;
}
.speakers {
@@ -785,7 +785,7 @@
<h2>Space Profiling</h2>
<pre>% ./prof1 1e6 +RTS -K256M -hy -i0.01
% hp2ps -c prof1.hp</pre>
- <img src="prof2-hy.svg"/>
+ <img src="prof1-hy.svg"/>
<p class="note">Auch: GHC Core output</p>
</div>
<div class="slide">
@@ -943,6 +943,48 @@
return ()
in loop 0</pre>
</div>
+<div class="slide">
+ <h2>WAI: Web Application Interface</h2>
+ <pre class="sh_haskell">Network.Wai> :i Application
+type Application =
+ Request -> ResourceT IO Response</pre>
+ <pre class="sh_haskell">Network.Wai> :i Middleware
+type Middleware = Application -> Application</pre>
+ <pre class="sh_haskell">Network.Wai.Middleware.Autohead> :t autohead
+autohead :: Network.Wai.Middleware
+Network.Wai.Middleware.Gzip> :t gzip
+gzip :: GzipSettings -> Network.Wai.Middleware</div>
+</div>
+<div class="slide">
+ <h2>WAI Request &amp; Response</h2>
+ <pre class="sh_haskell">Prelude Network.Wai> :i Request
+data Request
+ = Request {requestMethod :: Method,
+ httpVersion :: HttpVersion,
+ rawPathInfo :: ByteString,
+ rawQueryString :: ByteString,
+ serverName :: ByteString,
+ serverPort :: Int,
+ requestHeaders :: RequestHeaders,
+ isSecure :: Bool,
+ remoteHost :: SockAddr,
+ pathInfo :: [Text],
+ queryString :: Query,
+ requestBody :: Source (ResourceT IO) ByteString,
+ vault :: Vault}</pre>
+ <pre class="sh_haskell">Prelude Network.Wai> :i Response
+data Response
+ = ResponseFile Status ResponseHeaders FilePath (Maybe FilePart)
+ | ResponseBuilder Status ResponseHeaders Builder
+ | ResponseSource Status ResponseHeaders (Source (ResourceT IO) (Flush Builder))</pre>
+</div>
+<div class="slide">
+ <h2>WAI: Motivation</h2>
+ <img src="preliminary-warp-cross-language-benchmarks.png"/>
+ <p>
+ <a href="http://www.yesodweb.com/blog/2011/03/preliminary-warp-cross-language-benchmarks">www.yesodweb.com/blog/2011/03/preliminary-warp-cross-language-benchmarks</a>
+ </p>
+</div>
<!--
* Yesod:
 * Conduits (astro) (15 min)
Please sign in to comment.
Something went wrong with that request. Please try again.