Author: Shampoo with rejoice, Douban Http://www.douban.com/note/13508388/
Relationship between wsgi, flup, FastCGI, and Web. py2008-06-21 00:14:24
Apache/Lighttpd: it is equivalent to a request proxy. According to the configuration, different requests are forwarded to different servers for processing. For example, static file requests are handled by themselves. In this case, it is like a web server, forward requests such as FastCGI and python to the server/gateway such as flup for processing.
Flup: A web server written in Python, the so-called server/gateway in CGI. It is responsible for receiving requests forwarded by Apache/Lighttpd and callingProgram(Application), and return the results processed by the application to Apache/Lighttpd
FastCGI: a module of Apache/Lighttpd. Although flup can be used as an independent web server, the processing of browser requests is generally handled by Apache/Lighttpd, then Apache/Lighttpd forwards it to flup for processing. In this way, you need something to associate Apache/Lighttpd with flup. This is FastCGI, it sends the client request information to flup through environment variables and socket and receives the results returned by flup.
Web. PY: you can write your web program with the above content, but the problem is that you have to handle the input and output of the browser by yourself, there are also cookie, session, templates and other issues, Web. the role of Py is to help you do all of this work well. It is called Web framework. Another famous one is Django, but it feels too complicated, Web. py is enough.
Wsgi: In addition to flup server/gateway, there are many other users writing server/gateway. This may cause problems. If you write a program on flup, now you have to use xdly for various reasons. At this time, your program may have to make a lot of painful modifications to use xdly server. wsgi is a specification, he standardized how to write the flup service, how to use it, and how to call the program (Application) You wrote. Of course, he also standardized how your program should be written, in this case, as long as both flup and xdly comply with wsgi, your program can be used on both of them. flup is a wsgi
Server
------------------------------------------- The words of the good beast: I checked the day of the Niang and Gu Ge, and finally I saw this most clearly. Good.