rest/cgi

From Microformats Wiki
Revision as of 01:20, 9 November 2005 by DrErnie (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SFCGI: Beyond FastCGI?

Currently the optimal way for a web server to invoke a web application is FastCGI. This provides huge performance wins over regular CGI, and has succeeded in eliminating the need for proprietary, language-based web server APIs. FastCGI supported by pretty much every modern webserver, and is recommend by most web development platforms (PHP, Rails, TurboGears, etc.).

The Problem

What's not to love? Well, the one disadvantage FastCGI has relative to CGI is the ability to trivially support scripts. Under CGI, a script could just get the parameters from envars, and read stdin and write stdout. What could be simpler? Now, scripts need to link into a (reasonably complex) library that speaks the FastCGI protocol in order to do anything, which also means they can't be tested from the command-line.

Is there a way to do CGI that is comparable in efficiency to FastCGI, but more script-friendly? A Script-friendly CGI, or Scriptable Fast CGI (SFCGI), if you will?

Is such a thing possible?

Would anyone care even if it were, since FastCGI libraries are readily available?

Alternatives

WSGI
Web Services Gateway Interface
SCGI
A Simple Common Gateway Interface alternative