Some times ago, for fun, I wrote a small C fastcgi wrapper too, for lighttpd in 
my case.
There is less than 1k lines of C, and it's very basic but works.

The idea is to write a page in C, compile it, then load in on-the-fly on a 
fastcgi prefork. Each pre-fork keep the loaded page on memory (or reload it if 
changed). I never benchmarked it, but I found the idea fun.

The code: https://git.maxux.net/cfw/

Example: https://www2.maxux.net/devs/cdev/about.cfw
         https://www2.maxux.net/devs/cdev/about.c

         https://www2.maxux.net/devs/cdev/demo1.cfw
         https://www2.maxux.net/devs/cdev/demo1.c

(See the 'html page source' for some timing report)

(Uriel <ur...@berlinblue.org>) Wed, 19 Sep 2012 05:41:06 +0200:

> CGD runs as a FastCGI wrapper (to be used with nginx or similar web
> server) or as a standalone HTTP server, handing over all requests to a
> given CGI script.
> 
> http://repo.cat-v.org/cgd/
> 
> 
> This is useful to run werc under nginx, or directly without a
> standalone web server.
> 
> CGD is extremely simple, under 50 lines of Go code, much simpler than
> fcgiwrap, and has been tested in production by several members of
> #cat-v.
> 
> 
> Instructions on how to use CGD to host werc with nginx:
> 
> http://werc.cat-v.org/docs/web-server-setup/nginx
> 
> 
> Feedback and patches welcome, as an experiment the CGD repo is hosted
> with github:
> 
> https://github.com/uriel/cgd
> 
> 
> Enjoy
> 
> Uriel
> 


-- 


Reply via email to