Hello all,<div><br></div><div>I&#39;d like to announce the first release of the Web Application Interface package[1]. The WAI is a common protocol between web server backends and web applications, allowing application writers to target a single interface and have their code run on multiple server types.</div>

<div><br></div><div>There are two previous implementations of the same idea: the Network.Wai module as implemented in the Hyena package, and Hack. Some distinguishing characteristics of the<span style="background-color:rgb(255, 255, 255)"> wai package include:</span></div>

<div><br></div><div>* Unlike Hack, this does not rely upon lazy I/O for passing request and response bodies within constrained memory.</div><div>* Unlike Hyena, the request body is passed via a &quot;Source&quot; instead of Enumerator, so that it can easily be converted to a lazy bytestring for those who wish.</div>

<div>* Unlike both, it attempts to achieve more type safety by have explicit types of request headers, response headers, HTTP version and status code.</div><div>* It also removes any variables which are not universal to all web server backends. For example, scriptName has been removed, since it has no meaning for standalone servers.</div>

<div><br></div><div>This package also contains separate modules for conversions to and from Sources and Enumerators.</div><div><br></div><div>I am also simultaneously releasing two other packages: web-encodings 0.2.4[2] includes a new function, parseRequestBody, which directly parses a request body in a WAI request. It handles both URL-encoded and multipart data, and can store file contents in a file instead of memory. This should allow dealing with large file submits in a memory-efficient manner. You can also receiv<span style="background-color:rgb(255, 255, 255)">e the file contents</span> as a lazy bytestring.</div>

<div><br></div><div>Finally, wai-extra 0.0.0 [3] is a collection of middleware and backends I use regularly in web application development. On the middleware side, there are five modules, including GZIP encoding and storing session data in an encrypted cookie (ClientSession). On the backend side, it includes CGI and SimpleServer. The latter is especially useful for testing web applications, though some people have reported using it in a production environment. All of the co<span style="background-color:rgb(255, 255, 255)">de is directly ported fr</span>om previous packages I had written against Hack, so they are fairly well tested.</div>

<div><br></div><div>As far as stability, I don&#39;t expect the interface to change too drastically in the future. I am happy to hear any suggestions people have for moving forward, but expect future versions to be mostly backwards compatible with this release. Also, future versions will respect the Package Versioning Policy[4].</div>

<div><br></div><div>Thanks to everyone who contributed their input.</div><div><br></div><div>Michael</div><div><br></div><div>[1] <a href="http://hackage.haskell.org/package/wai" target="_blank">http://hackage.haskell.org/package/wai</a></div>

<div>[2] <a href="http://hackage.haskell.org/package/web-encodings" target="_blank">http://hackage.haskell.org/package/web-encodings</a></div><div>[3] <a href="http://hackage.haskell.org/package/wai-extra" target="_blank">http://hackage.haskell.org/package/wai-extra</a></div>

<div>[4] <a href="http://www.haskell.org/haskellwiki/Package_versioning_policy" target="_blank">http://www.haskell.org/haskellwiki/Package_versioning_policy</a></div>