Hi folks,
With the new library branch, gitit can now run on hack.
From my smoke test, there is about 10% performance penalty.
ab -n 1000 -c 20
http://127.0.0.1:3000/
happstack through hack: 65.85 [#/sec] (mean)
hyena through hack: 69.25 [#/sec] (mean)
barebone gitit: 73.12 [#/sec] (mean)
So the idea is instead of using simpleHTTP to server a ServerPart,
convert that ServerPart to a regular hack app, then use a hack backend
to serve it.
The function to convert a serverPart to an app is in hack-frontend-
happstack, and a hack backend is expected to export a run function
which serves the resulting app.
The benefit is that you have a light-weight web interface that you can
tweak with, and gitit also becomes composable due to the nature of
hack.
The hyena handler on hackage is not complete due to my lack of skill,
i.e. the request body is not preserved, so no form is working, but
pages can be viewed in Gitit with hyena handler, so you can experiment
with this hack idea.
This approach is highly experimental, I only tested it on happstack
and hyena backends.
Sample driver code is here:
http://wiki.github.com/jgm/gitit/gititwithhack
Cheers,
- jinjing