I've started writing a Tango compatible FastCGI library in D, including the following features:

Access to the four fcgi streams via special Conduits.

Support for plain CGI via the standard Conduits.

Threading, an adaptive thread manager is planned.

Optimized for performance, avoiding unnecessary allocations.

Currently, it's working for my Linux box - Windows is untested but should work, because the library uses the OS_* functions from the original libfcgi (and therefore depends on it). But the I/O model and protocol implementation is done in a much cleaner way, using Tangos Buffer and Conduit techniques.

If this project is accepted, the title should be "FastCGI4D" and description "A Tango compatible FastCGI library for D".

I know, that much should be obvious, but between the documentation here on dsource and what is out on the fastcgi site, it's really not spelled out. I guess I'm too used to heavyweight web-server projects. _________________-- !Eric.t.Anderton at gmail

Okay, I thought it would suffice to describe basic programming for FastCGI in the docs, but the most magic is setting up your web server to use it. I'm going to write some more on the page, if there's time

All 3 examples are servers (for their own), which are contacted by the web server if there's a request for it. The FastCGI application generates a response, mostly the html code (although sending files, etc. is also possible), which the server forwards.

Those 3 basically do the same things, although in different ways. Loop can only answer one request at once.

Thread and Application can handle multiple requests and share much code, but Application is the OOP version and has the advantage, that it creates it's member variables only on thread creation, while using Thread, one must either have one instance for all or do things on every request.

All I/O related objects (like Tango Buffer, Layout and Printer) live on a per-thread basis, and thus if you want high-performance stuff, Application is the one to choose.