rest/cgi: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
Obsoleted by [http://rubyforge.org/projects/mongrel/ Mongrel]
= SFCGI: Beyond FastCGI? =
= SFCGI: Beyond FastCGI? =



Revision as of 22:12, 31 May 2006

Obsoleted by Mongrel

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