Skip to content

Commit 527c166

Browse files
committed
adding new WSGI PEP 3333 diagram
1 parent f0fddb3 commit 527c166

File tree

7 files changed

+46
-3
lines changed

7 files changed

+46
-3
lines changed

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-06-02T12:24:18Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-06-02T17:35:37Z</updated></feed>

source/content/pages/03-deployment/0311-wsgi-servers.markdown

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A [Web Server Gateway Interface](http://wsgi.readthedocs.org/en/latest/)
2222
running Python web applications.
2323

2424

25-
## Why are WSGI servers necessary?
25+
## Why is WSGI necessary?
2626
A traditional web server does not understand or have any way to run Python
2727
applications. In the late 1990s, a developer named Grisha Trubetskoy
2828
[came up with an Apache module called mod\_python](http://grisha.org/blog/2013/10/25/mod-python-the-long-story/)
@@ -40,6 +40,11 @@ Therefore the Python community came up with WSGI as a standard interface that
4040
modules and containers could implement. WSGI is now the accepted approach
4141
for running Python web applications.
4242

43+
<img src="theme/img/wsgi-interface.png" alt="WSGI server invoking a WSGI application." width="100%" class="technical-diagram" />
44+
45+
As shown in the above diagram, a WSGI server simply invokes a callable object
46+
on the WSGI application as defined by the PEP 3333 standard.
47+
4348

4449
## WSGI's Purpose
4550
Why use WSGI and not just point a web server directly at an application?

source/mockups/wsgi-interface.bmml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="879" measuredH="377" mockupW="808" mockupH="338">
2+
<controls>
3+
<control controlID="3" controlTypeID="com.balsamiq.mockups::TextArea" x="71" y="39" w="350" h="338" measuredW="200" measuredH="140" zOrder="0" locked="false" isInGroup="-1">
4+
<controlProperties>
5+
<align>center</align>
6+
<size>28</size>
7+
<text>%20%0A%20%0A%20%0A%20%0AWSGI%20Server%20/%20%0AGateway</text>
8+
</controlProperties>
9+
</control>
10+
<control controlID="6" controlTypeID="__group__" x="529" y="39" w="350" h="338" measuredW="350" measuredH="338" zOrder="1" locked="false" isInGroup="-1">
11+
<groupChildrenDescriptors>
12+
<control controlID="0" controlTypeID="com.balsamiq.mockups::TextArea" x="0" y="0" w="350" h="338" measuredW="200" measuredH="140" zOrder="0" locked="false" isInGroup="6">
13+
<controlProperties>
14+
<align>center</align>
15+
<size>28</size>
16+
<text>%20%0A%20%0A%20%0A%20%0AWSGI%20Application%20/%20%0AFramework</text>
17+
</controlProperties>
18+
</control>
19+
<control controlID="1" controlTypeID="com.balsamiq.mockups::TextArea" x="0" y="33" w="200" h="74" measuredW="200" measuredH="140" zOrder="1" locked="false" isInGroup="6">
20+
<controlProperties>
21+
<size>20</size>
22+
<text>%20%0ACallable%20object</text>
23+
</controlProperties>
24+
</control>
25+
</groupChildrenDescriptors>
26+
</control>
27+
<control controlID="7" controlTypeID="com.balsamiq.mockups::Arrow" x="421" y="111" w="108" h="49" measuredW="150" measuredH="100" zOrder="2" locked="false" isInGroup="-1">
28+
<controlProperties>
29+
<direction>bottom</direction>
30+
<leftArrow>false</leftArrow>
31+
<text>Invokes</text>
32+
</controlProperties>
33+
</control>
34+
</controls>
35+
</mockup>

source/mockups/wsgi-interface.png

21.3 KB
Loading
21.3 KB
Loading

theme/img/wsgi-interface.png

21.3 KB
Loading

wsgi-servers.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h1>WSGI Servers</h1>
4242
<p>A <a href="http://wsgi.readthedocs.org/en/latest/">Web Server Gateway Interface</a>
4343
(WSGI) server implements the web server side of the WSGI interface for
4444
running Python web applications. </p>
45-
<h2>Why are WSGI servers necessary?</h2>
45+
<h2>Why is WSGI necessary?</h2>
4646
<p>A traditional web server does not understand or have any way to run Python
4747
applications. In the late 1990s, a developer named Grisha Trubetskoy
4848
<a href="http://grisha.org/blog/2013/10/25/mod-python-the-long-story/">came up with an Apache module called mod_python</a>
@@ -57,6 +57,9 @@ <h2>Why are WSGI servers necessary?</h2>
5757
<p>Therefore the Python community came up with WSGI as a standard interface that
5858
modules and containers could implement. WSGI is now the accepted approach
5959
for running Python web applications.</p>
60+
<p><img src="theme/img/wsgi-interface.png" alt="WSGI server invoking a WSGI application." width="100%" class="technical-diagram" /></p>
61+
<p>As shown in the above diagram, a WSGI server simply invokes a callable object
62+
on the WSGI application as defined by the PEP 3333 standard.</p>
6063
<h2>WSGI's Purpose</h2>
6164
<p>Why use WSGI and not just point a web server directly at an application?</p>
6265
<ul>

0 commit comments

Comments
 (0)