[Seaside] Blackfoot

Göran Krampe goran at krampe.se
Thu Sep 11 08:08:07 UTC 2008


Hi folks!

Last night I came to milestone 0.001 in a small hobby project I decided to
call Blackfoot (for no apparent reason). It is:

- A replacement for KomHttpServer aimed at primarily serving the needs of
Seaside *in Squeak* (not other Smalltalks). But also other web solutions
in Squeak.

- *Not* a fullblown web server like Kom but rather an implementation using
SCGI (Simple CGI from the Python folks). Like FastCGI but mucho simpler.

- Clean, lean and mean code base. I am creating this as a standalone
package (no dependency on TcpService nor DynamicBindings) with BF-prefixed
classes. I want code to be readable and hackable.

- For Dynamically scoped variables I will use the Seaside Notification
pattern (simple and nice).

- It uses regular SocketStream at the bottom and a listen loop more or
less like in Kom/WAListener etc.

- It will not do virtualhosts, file serving, the whole mod-stack that Kom
has etc etc.

...ok, so what is the tantalizing result that I need to have in order to
make such a post? :) Last night I did a quick and dirty benchmark using ab
on a "hello world"-handler. It did nothing but returning 22 bytes "as a
HttpResponse". So far I also use the existing HttpResponse so that code
may very well be optimizable too. I compared with Kom and came roughly up
with these two positives:

- Blackfoot serves around 2x the speed for such small requests. On my
small laptop I got 750 req/sec, while Kom gave about 350. When I removed
all header parsing I got 1000 - so header parsing is still a hefty part of
the story for such small requests. Note that I have not done any bigger
payloads yet.

- Blackfoot serves *much* more consistently. Kom had awful "max" values,
especially when cranking up number of clients.

So it looks promising. Oh, I used Cherokee 0.8.1 as webserver - very nice
and very fast little bugger! :) Other possible alternatives with existing
SCGI implementations are Lighttpd, Nginx and of course Apache.

Will get back when I have something that works with Seaside examples.

regards, Göran



More information about the seaside mailing list