mod_pylite?

excord80 excord80 at gmail.com
Fri Jan 2 09:49:03 EST 2009


On Jan 1, 11:40 pm, Graham Dumpleton <Graham.Dumple... at gmail.com>
wrote:
> On Jan 2, 2:28 pm, excord80 <excor... at gmail.com> wrote:
>
>
>
> > On Jan 1, 9:12 pm, s... at pobox.com wrote:
>
> > >     >>http://broadcast.oreilly.com/2008/12/five-features-perl-5-needs-now.html
>
> > >     >> and he mentions a neat-looking project called ``mod_perlite``. It
> > >     >> sounds like it will be very handy. Anyone working on a
> > >     >> ``mod_pylite``?  Has it been done before, maybe under a different
> > >     >> name?
>
> > > It's kind of hard to tell.  There's very little description of how
> > > mod_perlite would be different than mod_perl other than it would be more
> > > lightweight, presumably as mod_php somehow is.  That hardly seems like a
> > > well-defined requirement document.
>
> > > Doesmod_wsgifit the bill?http://www.rkblog.rk.edu.pl/w/p/mod_wsgi/
>
> > I'm not sure if it fits the bill or not. The bill is two-fold:
>
> > 1. The Apache module should present little risk to the admin who
> > installs it. That is, it should not expose Apache's innards.
>
> > 2. The Apache module should keep a Python instance running; run, for
> > example, ``foo.py`` when a user accesses (for example) ``http://www.example.com/path/to/foo.py?baz=88``; pass baz=88 to foo.py in the
> > usual way; and return whatever html that script spits out.
>
> > I'm not familiar with php or ``mod_php``, but I suspect that setup
> > does something very similar to what's described above. This might
> > explain why it's so blasted easy to deploy php scripts and create
> > small and simple sites (and even not-so-small/simple sites) with it.
>
> > Doesmod_wsgifit that bill? I don't know. [snip]
>
> Have you looked up what the WSGI specification for Python even is?
>
>  http://www.python.org/dev/peps/pep-0333/
>  http://www.wsgi.org/wsgi/Learn_WSGI
>

Hi Graham, thanks for the links. I took a quick look at some of the
articles on the Learn_WSGI page, but regrettably, my free time for
this stuff has evaporated for now.

> If you understand what WSGI is, then you will realise that mod_wsgi is
> a very slim adapter for Apache that allows one to host any WSGI
> application. [snip]
>
> All WSGI is about
> is providing a most minimal interface for communicating with the web
> server,

It sounds interesting, however, after reading a bit about it, I see
that a large part of wsgi is providing a nice interface between web
server and webapp. I don't think I need any such interface, or at
least, a replacement for CGI. I just need something like CGI but with
a persistent Python so the web server doesn't have to restart python
for every request. And I don't need need it to work with anything else
other than Apache.

I think that actually probably sums up what a lot of users want. For
better or worse, most people use Apache. Apache works and is free
software. And it's either already installed, or easy to install. And
shared hosting providers already have it available.

> This doesn't mean you couldn't use mod_wsgi to effectively achieve the
> same thing though,  [snip]

I can't say I understand the details of wsgi, but if it does what I'm
asking, and if shared hosting providers can be coaxed into installing
mod_wsgi, then I think a fast-track to wide adoption for wsgi would be
to provide an out-of-the-box drop-in little-to-no-configuration-
required solution for getting php-style small webapps going as
described above.

If your answer to that is, "Oh no! WSGI is more general than that! You
can do it, but can also do X, Y, Z ...", then I'm sorry, but I don't
have the time right now to learn about all the details, and about
things like Paste and middleware. Again, I'm only using Apache, and I
only want the script to run when I access it in a url and to get its
output back to the browser. Yes, I realize this is bush-league, but
the php folks have been doing it for a long while now, and it works ok
for small webapps and shared hosting setups, so I'm reluctant to thumb
my nose at it.

> If you want to talk more about this, come over to the mod_wsgi list on
> Google Groups.

Thank you, but, as I mentioned, my free time right now is in the
negative numbers. Bleh. I wish it weren't so.



More information about the Python-list mailing list