The relationship between WSGI, Flup, fastcgi and web.py
APACHE/LIGHTTPD: Equivalent to a request proxy, according to the configuration, the different requests forwarded to different server processing, such as static file request processing itself, this time it is like a Web server, for fastcgi/ Requests such as Python are forwarded to server/gateway such as flup for processing
Flup: A Web server written in Python, the so-called Server/gateway in CGI, is responsible for accepting APACHE/LIGHTTPD forwarded requests and calling the program you wrote (application), and return the results of application processing to the APACHE/LIGHTTPD
FASTCGI:APACHE/LIGHTTPD a module, although Flup can be used as a standalone Web server, but for browser request processing is generally given to apache/lighttpd processing, and then by apache/ LIGHTTPD forwarded to Flup processing, so you need a thing to connect apache/lighttpd with Flup, this thing is fastcgi, It passes the information requested by the client to Flup and receives the results returned by the Flup through the environment variable and the socket.
web.py: It should be said that you can start to write your Web program with the above, but the problem is that you have to deal with the input and output of the browser, as well as cookies, sessions, templates and other problems, Web.py's role is to help you do these things well, it is called the web framework, another famous is Django, but it is too complicated, web.py almost enough.
WSGI: In addition to Flup Server/gateway outside there are many other people's writing server/gateway, this time will be a problem, if you write a program in Flup, now for various reasons you want to use xdly, This time your program may have to do a lot of painful changes to use xdly server, WSGI is a specification, he standardized flup this service should be how to write, should use what way what parameters call you write the program (application), etc. Of course, but also standardize your program should be how to write, so that, as long as Flup and xdly all comply with WSGI, your program can be used on two, Flup is a WSGI server
The relationship between WSGI, Flup, fastcgi and web.py