468,268 Members | 1,732 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

CGI vs WSGI

Dear all,

what is the difference? Middleware?

I'm wondering because the only variables I ever needed were PATH_INFO,
REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should
be available from CGI, too.

Thanks.

Jul 4 '07 #1
3 4237
On Jul 4, 2:49 pm, tuom.lar...@gmail.com wrote:
Dear all,

what is the difference? Middleware?
Yes, and also the fact that you have a large choice of WSGI web
frameworks to choose
from. CGI looks so much 20th century ... ;)
Michele Simionato
Jul 4 '07 #2
tu*********@gmail.com wrote:
I'm wondering because the only variables I ever needed were PATH_INFO,
REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should
be available from CGI, too.
CGI starts up a new process for every request, using stdin/stdout for
passing information. I believe WSGI can do that, but I believe it can
also do in-process requests (think mod_python, only with a Python web
server), external process requests (think FastCGI or LRWP), etc.

I could certainly be mistaken, it's been a while since I looked into any
of it.

- Josiah
Jul 4 '07 #3
tu*********@gmail.com a écrit :
Dear all,

what is the difference? Middleware?

I'm wondering because the only variables I ever needed were PATH_INFO,
REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should
be available from CGI, too.

Thanks.
WSGI is intented as a gateway between a web server and a long-running
python application. Which means you don't have to launch a new Python
interpreter, import libs, parse config, connect to the database etc etc
for each and every request.

Also, it's (IMHO) much more usable than CGI.
Jul 4 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Thomas W | last post: by
2 posts views Thread by Ben Finney | last post: by
1 post views Thread by seberino | last post: by
11 posts views Thread by Gregory Piñero | last post: by
7 posts views Thread by Ben Finney | last post: by
2 posts views Thread by Adam Atlas | last post: by
8 posts views Thread by Ron Garret | last post: by
37 posts views Thread by Michele Simionato | last post: by
4 posts views Thread by inhahe | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.