Pythonic way of web-programming

Paul Boddie paul at boddie.net
Mon Apr 14 06:21:46 EDT 2003


Ian Bicking <ianb at colorstudy.com> wrote in message news:<mailman.1050210449.24337.python-list at python.org>...
>

[WebKit on Twisted]

> Using the Twisted CGI code, it would be a quick change to make it
> dispatch to a thread instead of a process (as with CGI).

One of the main concerns about making Twisted the "Pythonic standard"
is that people who demand a non-threaded, non-CGI handler model for
scalability reasons (and this did come up recently on
comp.lang.python, so it is a valid concern) are very likely to fall
outside the resulting audience. Unfortunately, especially given the
success of mod_python and other process-forking frameworks, that could
amount to a lot of people.

> I'm still thinking about the strategy around it, which is why I haven't
> actually tried implementing it.  As an experiment it's not that
> interesting to me, but maybe it could be more than that.

Well, I've been experimenting with implementing a small framework on
top of WebKit and mod_python (with Zope being another likely
candidate), and it has to be said that some frameworks share enough
similarity and do provide enough flexibility to make
"super-frameworks" possible. Moreover, with developments like POSH...

  http://poshmodule.sourceforge.net

...it might even be possible for such "super-frameworks" to paper over
the fundamental but desirable differences between the underlying
frameworks. For example, some people might want a threaded model,
whilst others might prefer a process-forking model together with
similarly convenient data sharing semantics.

As for the issue of standard APIs, I believe that such APIs really
only serve a useful purpose as being something to build on that is
widely agreed upon, recognised and stable; they don't necessarily
serve the purpose of being something developers really want to write
to directly. For example, Java Servlets have arguably served as a
foundation for more high-level toolkits, whereas writing directly to
the Servlet API is something that the most productive developers
stopped doing years ago.

Paul

P.S. The Web frameworks shootout paper is most informative and serves
as an interesting guide as to the most accessible frameworks that
could be subverted (or "leveraged" depending on your mindset) by such
"super-frameworks".




More information about the Python-list mailing list