Skip to content

Commit 72bf03c

Browse files
author
Kenneth Reitz
committed
slim down web section
1 parent 3749ae4 commit 72bf03c

File tree

1 file changed

+15
-93
lines changed

1 file changed

+15
-93
lines changed

docs/scenarios/web.rst

Lines changed: 15 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -71,48 +71,16 @@ you may need, such as database access or form generation and validation. For
7171
many popular modules, `Extensions <http://flask.pocoo.org/extensions/>`_ may
7272
already exist to suit your needs.
7373

74-
**Support** for flask can best be found in its mailing list. Just shoot an email to
74+
**Support** for flask can best be found in its mailing list. Just shoot an email to
7575
flask@librelist.com and reply to the confirmation email.
7676

7777

78-
Pyramid
79-
-------
80-
8178
.. todo:: Explain Pyramid
8279

83-
Web.py
84-
------
85-
86-
`web.py <http://webpy.org>`_ is a minimalist web framework that is somewhere between Django and Flask.
87-
The premise of web.py is that it is flexible - code your webapp any way you want it, in just python and python alone.
88-
web.py comes with some nifty tools built in, like database connection tools and a mini http server.
89-
90-
**Support** for web.py is quite sparse, but you can look for support in the `mailing list <http://groups.google.com/group/webpy>`_ .
91-
9280

9381
Web Servers
9482
:::::::::::
9583

96-
Apache
97-
------
98-
99-
mod_python
100-
~~~~~~~~~~
101-
102-
For a long period Apache with mod_python was one of the most reccomended
103-
ways to deploy Python applications and thus you may see many tutorials
104-
about it on the web or in books, however Apache no longer supports
105-
mod_python [1]_ and thus this deployment mechanism is strongly discouraged in
106-
favor of WSGI based ones.
107-
108-
mod_wsgi
109-
~~~~~~~~
110-
111-
Many improvements have been made with mod_wsgi over mod_python for serving
112-
Python with Apache [2]_. If you must run the Apache web server, mod_wsgi is
113-
your best option for running Python, other than proxying to a dedicated WSGI
114-
server.
115-
11684
.. _nginx-ref:
11785

11886
Nginx
@@ -125,82 +93,41 @@ application servers (like WSGI servers). It also includes handy features
12593
like load-balancing, basic authentication, streaming, and others. Designed
12694
to serve high-load websites, Nginx is gradually becoming quite popular.
12795

128-
Mongrel2
129-
--------
130-
131-
`Mongrel2 <http://mongrel2.org>`_ is an application, language, and network
132-
architecture agnostic web server. It uses a high performance queue (zeromq) to
133-
communicate with your applications, all asynchronously. There is a well defined
134-
protocol to be used between mongrel2 and a backend handler (your app).
135-
136-
Brubeck
137-
~~~~~~~
138-
139-
.. todo:: Explain Mongrel2 + Brubeck
140-
141-
wsgid
142-
~~~~~
143-
144-
`Wsgid <http://wsgid.com>`_ is a generic mongrel2 handler that speaks both
145-
mongrel2 protocol and WSGI. This makes it possible to run your python webapp
146-
written with any WSGI compliant framework. Wsgid has built-in Django support but
147-
has also a generic way to load your WSGI application object directly. It's
148-
possible to add support for other frameworks through wsgid's pluggable
149-
Apploading interface.
150-
151-
.. rubric:: Resources
152-
153-
* `Deploying your django application with mongrel2 and wsgid <http://daltonmatos.wordpress.com/2011/11/06/deploying-your-django-application-with-mongrel2-and-wsgid/>`_
15496

15597
.. _wsgi-servers-ref:
15698

15799
WSGI Servers
158100
::::::::::::
159101

160-
Stand-alone WSGI servers typically use less resources than traditional web
102+
Stand-alone WSGI servers typically use less resources than traditional web
161103
servers and provide top performance [3]_.
162104

163105
.. _gunicorn-ref:
164106

165-
gUnicorn
107+
Gunicorn
166108
--------
167109

168-
`gUnicorn <http://gunicorn.org/>`_ (Green Unicorn) is a WSGI server used
169-
to serve Python applications. It is a Python fork of the Ruby
170-
`Unicorn <http://unicorn.bogomips.org/>`_ server. gUnicorn is designed to be
171-
lightweight, easy to use, and uses many UNIX idioms. gUnicorn is not designed
110+
`Gunicorn <http://gunicorn.org/>`_ (Green Unicorn) is a WSGI server used
111+
to serve Python applications. It is a Python interpretation of the Ruby
112+
`Unicorn <http://unicorn.bogomips.org/>`_ server. Unicorn is designed to be
113+
lightweight, easy to use, and uses many UNIX idioms. Gunicorn is not designed
172114
to face the internet, in fact it was designed to run behind Nginx which buffers
173115
slow requests, and takes care of other important considerations. A sample
174116
setup for Nginx + gUnicorn can be found in the
175-
`gUnicorn help <http://gunicorn.org/deploy.html>`_.
117+
`Gunicorn help <http://gunicorn.org/deploy.html>`_.
176118

177119
.. _uwsgi-ref:
178120

179-
uwsgi
180-
-----
181-
182-
`uWSGI <http://projects.unbit.it/uwsgi/>`_ is a fast, self-healing and
183-
developer/sysadmin-friendly application container server coded in pure C.
184-
185-
Born as a WSGI-only server, over time it has evolved in a complete stack for
186-
networked/clustered web applications, implementing message/object passing,
187-
caching, RPC and process management.
188121

189122
Server Best Practices
190123
:::::::::::::::::::::
191124

192-
While Apache will serve your Python application, and many references suggest it,
193-
modern best practices suggest against it. With the improvements in mod_wsgi over
194-
mod_python, Apache can handle many more requests than before. However, mod_wsgi
195-
tends to use more memory than other WSGI solutions [3]_.
196-
197125
The majority of self hosted Python applications today are hosted with a WSGI
198-
server such as :ref:`uWSGI <uwsgi-ref>` or :ref:`gUnicorn <gunicorn-ref>` behind a
199-
lightweight web server such as :ref:`nginx <nginx-ref>` or
200-
`lighttpd <http://www.lighttpd.net/>`_.
126+
server such as :ref:`gUnicorn <gunicorn-ref>`, either directly or behind a
127+
lightweight web server such as :ref:`nginx <nginx-ref>`.
201128

202129
The WSGI servers serve the Python applications while the web server handles tasks
203-
better suited for it such as static file serving, request routing, DDoS
130+
better suited for it such as static file serving, request routing, DDoS
204131
protection, and basic authentication.
205132

206133
Hosting
@@ -305,19 +232,14 @@ WebFaction
305232

306233
`Webfaction <http://www.webfaction.com/>`_ started off as a dedicated python hosting company.
307234
In fact it used to be called python-hosting.com. Webfaction supports Python versions 2.4 through to 2.7.2
308-
as well as Python 3 versions.
235+
as well as Python 3 versions.
309236

310-
Webfaction has a very extensive `user guide <http://docs.webfaction.com/user-guide/>`_
311-
and specific stack (`Django <http://docs.webfaction.com/software/django/index.html>`_, `Pylons <http://docs.webfaction.com/software/pylons.html>`_,
312-
`Pyramid <http://docs.webfaction.com/software/pyramid.html>`_, `TurboGears <http://docs.webfaction.com/software/turbogears.html>`_
237+
Webfaction has a very extensive `user guide <http://docs.webfaction.com/user-guide/>`_
238+
and specific stack (`Django <http://docs.webfaction.com/software/django/index.html>`_, `Pylons <http://docs.webfaction.com/software/pylons.html>`_,
239+
`Pyramid <http://docs.webfaction.com/software/pyramid.html>`_, `TurboGears <http://docs.webfaction.com/software/turbogears.html>`_
313240
and `vanilla python <http://docs.webfaction.com/software/python.html>`_) guides.
314241
It also has a stack-overflow style `community <http://community.webfaction.com/>`_ that is quite useful.
315242

316-
Twisted
317-
:::::::
318-
319-
320-
Node.js.
321243

322244
.. rubric:: References
323245

0 commit comments

Comments
 (0)