Re: twisted

Blake Winton <blake-dlUKtbW3TlBcVw/[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Steven Armstrong wrote:
> CGI        >> /pyblosxom/web/pyblosxom.cgi
> WSGI_CGI   >> /pyblosxom/web/pyblosxom_wsgi.cgi
> twisted    >> /pyblosxom/web/pyblosxom.tac
> mod_python >> /pyblosxom/web/wsgi_app.py

I'm a little confused as to how this last one is set up.  I can see that 
the WSGI_CGI uses the application from wsgi_app, but I sort of expected 
some code like:
         from wsgiref.handlers import ModPythonHandler
         from wsgi_app import application

         ModPythonHandler().run(application)
in the mod_python case...

(Keeping in mind that most of my confusion stems from my inexperience in 
this area, and not because your code is necessarily confusing.)

And while I'm here asking dumb questions, is it possible to run the 
twisted service along with other services on the same port?  Does it 
integrate nicely with other twisted services trying to run on port 8080, 
or do we need a new port for every twisted service?

> Where WSGI_CGI, twisted and mod_python all run the same program, namely
> wsgi_app.py. They all use server dependant wrappers/connectors to setup
> a WSGI compliant environment. Read the source for further infos and
> dependencies.

Okay, so, are we agreed that we can remove the pyblosxom.cgi, as it 
should be logically equivalent to pyblosxom_wsgi.cgi?  (And browsing 
through the source, they look _extremely_ similar, which worries me as a 
coder.  Twice the chance to make mistakes.)

>>It looks like WSGI is a way to write our app, and have it 
>>"automatically" connect to Twisted or mod_python or CGI, or what have 
>>you.  If that's really the way it works, it would make our lives (by 
>>which I mean Steven's life) a lot easier, since we could just write the 
>>app once, and have the connectors deal with the various backends.
> As noted above that's exactly how its implemented :-)

In the words of Will, "w00t!"  ;)

For a future direction, would it be useful to make the 
Pyblosxom.pyblosxom.PyBlosxom class be more like an application, so that 
we could get rid of the wsgi_app.py class entirely?  I think that might 
be a slightly cleaner design, just from my 50,000' point of view.

Later,
Blake.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.