Gitit can run on hack

7 views
Skip to first unread message

jinjing

unread,
Jun 23, 2009, 3:45:00 PM6/23/09
to gitit-discuss
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



John MacFarlane

unread,
Jun 23, 2009, 4:40:49 PM6/23/09
to gitit-...@googlegroups.com
+++ jinjing [Jun 23 09 12:45 ]:

Great work!

Isn't there a fastcgi backend for hack? This might make it easier for
people to use gitit on shared hosting...

John

Jinjing Wang

unread,
Jun 23, 2009, 4:55:14 PM6/23/09
to gitit-...@googlegroups.com
There is an fcgi backend written by Michael Snoyman, someone
interested can check its compatibility with this approach?

http://github.com/snoyberg/hack-handler-fastcgi/tree/master
--
jinjing
Reply all
Reply to author
Forward
0 new messages