Difference between revisions of "Web/Servers"

From HaskellWiki
< Web
Jump to navigation Jump to search
m (Added infobox)
(Remove out-of-date information, provide a link to the entry about the Snap framework, and add some minor things.)
 
(16 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
[[Category:Web|*]]
 
[[Category:Web|*]]
 
{{Web infobox}}
 
{{Web infobox}}
  +
  +
== happstack-server ==
  +
  +
happstack-server contains a low-level HTTP backend, and high-level functions for routing requests, examining request data, and generating responses. happstack-server is part of the Happstack framework, but can be used as an independent entity. The low and high level portions of the server are not cleanly separated into different packages, so it is not the best choice if you only need a low-level backend.
  +
  +
{| class="wikitable"
  +
! License
  +
| BSD3
  +
|-
  +
! Author:
  +
| Happstack team, HAppS LLC
  +
|-
  +
! Maintainer:
  +
| Happstack team <happs@googlegroups.com>
  +
|-
  +
! Home page:
  +
| http://happstack.com
  +
|-
  +
! Documentation:
  +
| http://happstack.com/docs
  +
|-
  +
! Package & repositories
  +
| [http://hackage.haskell.org/package/happstack-server Hackage]
  +
|}
   
 
== Hyena ==
 
== Hyena ==
Line 6: Line 30:
 
Hyena is a simple web application container that can be used to run Haskell web applications behind more robust web servers like Apache.
 
Hyena is a simple web application container that can be used to run Haskell web applications behind more robust web servers like Apache.
   
  +
{| class="wikitable"
'''License''' BSD3
 
  +
! License
  +
| BSD3
  +
|-
  +
! Author
  +
| Johan Tibell <johan.tibell@gmail.com>
  +
|-
  +
! Maintainer
  +
| Johan Tibell <johan.tibell@gmail.com>
  +
|-
  +
! Announcement
  +
| [http://www.haskell.org/pipermail/haskell-cafe/2009-June/063058.html Haskell Cafe]
  +
|-
  +
! Package & repositories
  +
| [http://hackage.haskell.org/package/hyena Hackage] - [http://github.com/tibbe/hyena Github]
  +
|}
   
  +
== Snap Server ==
'''Author:''' Johan Tibell <johan.tibell@gmail.com>
 
   
  +
Part of the [https://wiki.haskell.org/Web/Frameworks#Snap Snap framework], the Snap HTTP server is similar to Hyena in that it provides a very fast low level web server.
'''Maintainer:''' Johan Tibell <johan.tibell@gmail.com>
 
   
  +
The Snap HTTP server is a high performance web server library written in Haskell. Together with the snap-core library upon which it depends, it provides a clean and efficient Haskell programming interface to the HTTP protocol.
'''Announcement''': http://www.haskell.org/pipermail/haskell-cafe/2009-June/063058.html
 
   
  +
SSL support can be enabled via a compile-time flag.
'''Package & repositories'''
 
   
  +
For more information or to download the latest version, you can visit the Snap project website at http://snapframework.com/.
* Hackage: http://hackage.haskell.org/package/hyena
 
* Github: http://github.com/tibbe/hyena
 
   
  +
{| class="wikitable"
== Snap Server ==
 
  +
! License
  +
| BSD3
  +
|-
  +
! Author
  +
| James Sanders, Gregory Collins, Doug Beardsley
  +
|-
  +
! Maintainer
  +
| snap@snapframework.com
  +
|-
  +
! Package & repositories
  +
| [http://hackage.haskell.org/package/snap-server Hackage] - [http://github.com/snapframework/snap-server Github]
  +
|}
  +
  +
== Spock ==
  +
  +
Spock is a lightweight Haskell web framework inspired by Ruby's Sinatra. It provides a full toolbox including everything to get a quick start into web programming using Haskell.
  +
  +
{| class="wikitable"
  +
! License
  +
| BSD3
  +
|-
  +
! Author:
  +
| Alexander Thiemann
  +
|-
  +
! Maintainer:
  +
| Alexander Thiemann, et al
  +
|-
  +
! Home page:
  +
| https://www.spock.li/
  +
|-
  +
! Documentation:
  +
| http://happstack.com/docs
  +
|-
  +
! Package & repositories
  +
| [http://hackage.haskell.org/package/Spock Hackage] - [https://github.com/agrafix/Spock Github]
  +
|}
  +
  +
== Warp ==
  +
  +
The fastest Haskell web server, targeting the WAI [[Web/Framework_Interfaces]]
  +
  +
{| class="wikitable"
  +
! License:
  +
| BSD3
  +
|-
  +
! Author:
  +
| Michael Snoyman <michael@snoyman.com>
  +
|-
  +
! Maintainer:
  +
| Michael Snoyman <michael@snoyman.com>
  +
|-
  +
! Announcement:
  +
| http://docs.yesodweb.com/blog/announcing-warp
  +
|-
  +
! Package & repositories
  +
| [https://hackage.haskell.org/package/warp Hackage] - [http://github.com/yesodweb/wai Github]
  +
|}
  +
  +
Example:
   
  +
<haskell>
Part of the Snap framework, the Snap server is similar to Hyena in that it provides a very fast low level web server. From the Hackage package:
 
  +
{-# LANGUAGE OverloadedStrings #-}
  +
  +
import Network.Wai
  +
import Network.Wai.Handler.Warp
  +
import Network.HTTP.Types (status200)
  +
import Blaze.ByteString.Builder (copyByteString)
  +
import qualified Data.ByteString.UTF8 as BU
  +
import Data.Monoid
  +
  +
main = do
  +
let port = 3000
  +
putStrLn $ "Listening on port " ++ show port
  +
run port app
  +
  +
app req respond = respond $
  +
case pathInfo req of
  +
["yay"] -> yay
  +
x -> index x
  +
  +
yay = responseBuilder status200 [ ("Content-Type", "text/plain") ] $ mconcat $ map copyByteString
  +
[ "yay" ]
  +
  +
index x = responseBuilder status200 [("Content-Type", "text/html")] $ mconcat $ map copyByteString
  +
[ "<p>Hello from ", BU.fromString $ show x, "!</p>"
  +
, "<p><a href='/yay'>yay</a></p>\n" ]
   
  +
</haskell>
This is the first developer prerelease of the Snap framework. Snap is a simple and fast web development framework and server written in Haskell. For more information or to download the latest version, you can visit the Snap project website at http://snapframework.com/.
 
   
  +
== mighttpd / mighttpd2 ==
The Snap HTTP server is a high performance, epoll-enabled, iteratee-based web server library written in Haskell. Together with the snap-core library upon which it depends, it provides a clean and efficient Haskell programming interface to the HTTP protocol.
 
   
  +
High performance web server to handle static files and CGI on WAI/warp. Reverse proxy functionality is also provided to connect web applications behind.
Higher-level facilities for building web applications (like user/session management, component interfaces, data modeling, etc.) are planned but not yet implemented, so this release will mostly be of interest for those who:
 
   
  +
Its performance is comparable to that of nginx written in C (according to the Monad.Reader article linked below).
* need a fast and minimal HTTP API at roughly the same level of abstraction as Java servlets, or
 
   
  +
(Initial version of mighttpd didn't use WAI/warp.)
* are interested in contributing to the Snap Framework project.
 
   
  +
{| class="wikitable"
'''License:''' BSD3
 
  +
! License:
  +
| BSD3
  +
|-
  +
! Author:
  +
| Kazu Yamamoto <kazu@iij.ad.jp>
  +
|-
  +
! Maintainer:
  +
| Kazu Yamamoto <kazu@iij.ad.jp>
  +
|-
  +
! Announcement:
  +
| https://themonadreader.wordpress.com/2011/10/26/issue-19/
  +
|-
  +
! Package & repositories
  +
| [https://hackage.haskell.org/package/mighttpd2 Hackage] - [http://www.mew.org/~kazu/proj/mighttpd/ Homepage]
  +
|}
   
  +
== second-transfer ==
'''Author:''' James Sanders, Gregory Collins, Doug Beardsley
 
   
  +
Low level web server library built for experimentation and tuning regarding the
'''Maintainer:''' snap@snapframework.com
 
  +
HTTP/2 protocol.
   
'''Package & repositories'''
 
   
  +
{| class="wikitable"
* Hackage: http://hackage.haskell.org/package/snap-server
 
  +
! License:
* Github: http://github.com/snapframework/snap-server
 
  +
| BSD3
  +
|-
  +
! Author:
  +
| Alcides Viamontes E. <a.viamontes.esquivel@gmail.com>
  +
|-
  +
! Maintainer:
  +
| Alcides Viamontes E. <a.viamontes.esquivel@gmail.com>
  +
|-
  +
! Package & repositories
  +
| [https://hackage.haskell.org/package/second-transfer Hackage] - [https://www.httptwo.com/second-transfer/ Homepage]
  +
|}

Latest revision as of 08:40, 2 July 2017

Haskell Web Development

Software:
Servers - Libraries - Frameworks
Deploy - Cloud
Interfaces to frameworks
Databases and Persistence
Testing and Verification
Content Management

Community & Research:
Forums and Discussion
Literature (research, talks and blogs)
Existing Haskell web applications
Ongoing projects and ideas

happstack-server

happstack-server contains a low-level HTTP backend, and high-level functions for routing requests, examining request data, and generating responses. happstack-server is part of the Happstack framework, but can be used as an independent entity. The low and high level portions of the server are not cleanly separated into different packages, so it is not the best choice if you only need a low-level backend.

License BSD3
Author: Happstack team, HAppS LLC
Maintainer: Happstack team <happs@googlegroups.com>
Home page: http://happstack.com
Documentation: http://happstack.com/docs
Package & repositories Hackage

Hyena

Hyena is a simple web application container that can be used to run Haskell web applications behind more robust web servers like Apache.

License BSD3
Author Johan Tibell <johan.tibell@gmail.com>
Maintainer Johan Tibell <johan.tibell@gmail.com>
Announcement Haskell Cafe
Package & repositories Hackage - Github

Snap Server

Part of the Snap framework, the Snap HTTP server is similar to Hyena in that it provides a very fast low level web server.

The Snap HTTP server is a high performance web server library written in Haskell. Together with the snap-core library upon which it depends, it provides a clean and efficient Haskell programming interface to the HTTP protocol.

SSL support can be enabled via a compile-time flag.

For more information or to download the latest version, you can visit the Snap project website at http://snapframework.com/.

License BSD3
Author James Sanders, Gregory Collins, Doug Beardsley
Maintainer snap@snapframework.com
Package & repositories Hackage - Github

Spock

Spock is a lightweight Haskell web framework inspired by Ruby's Sinatra. It provides a full toolbox including everything to get a quick start into web programming using Haskell.

License BSD3
Author: Alexander Thiemann
Maintainer: Alexander Thiemann, et al
Home page: https://www.spock.li/
Documentation: http://happstack.com/docs
Package & repositories Hackage - Github

Warp

The fastest Haskell web server, targeting the WAI Web/Framework_Interfaces

License: BSD3
Author: Michael Snoyman <michael@snoyman.com>
Maintainer: Michael Snoyman <michael@snoyman.com>
Announcement: http://docs.yesodweb.com/blog/announcing-warp
Package & repositories Hackage - Github

Example:

{-# LANGUAGE OverloadedStrings #-}
 
import Network.Wai
import Network.Wai.Handler.Warp
import Network.HTTP.Types (status200)
import Blaze.ByteString.Builder (copyByteString)
import qualified Data.ByteString.UTF8 as BU
import Data.Monoid
 
main = do
    let port = 3000
    putStrLn $ "Listening on port " ++ show port
    run port app
 
app req respond = respond $
    case pathInfo req of
        ["yay"] -> yay
        x -> index x
 
yay = responseBuilder status200 [ ("Content-Type", "text/plain") ] $ mconcat $ map copyByteString
    [ "yay" ]
 
index x = responseBuilder status200 [("Content-Type", "text/html")] $ mconcat $ map copyByteString
    [ "<p>Hello from ", BU.fromString $ show x, "!</p>"
    , "<p><a href='/yay'>yay</a></p>\n" ]

mighttpd / mighttpd2

High performance web server to handle static files and CGI on WAI/warp. Reverse proxy functionality is also provided to connect web applications behind.

Its performance is comparable to that of nginx written in C (according to the Monad.Reader article linked below).

(Initial version of mighttpd didn't use WAI/warp.)

License: BSD3
Author: Kazu Yamamoto <kazu@iij.ad.jp>
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
Announcement: https://themonadreader.wordpress.com/2011/10/26/issue-19/
Package & repositories Hackage - Homepage

second-transfer

Low level web server library built for experimentation and tuning regarding the HTTP/2 protocol.


License: BSD3
Author: Alcides Viamontes E. <a.viamontes.esquivel@gmail.com>
Maintainer: Alcides Viamontes E. <a.viamontes.esquivel@gmail.com>
Package & repositories Hackage - Homepage