~justin-fathomdb/nova/justinsb-openstack-api-volumes

« back to all changes in this revision

Viewing changes to vendor/tornado/website/templates/index.html

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{% extends "base.html" %}
 
2
 
 
3
{% block body %}
 
4
  <p><a href="http://www.tornadoweb.org/">Tornado</a> is an open source version of the scalable, non-blocking web server and tools that power <a href="http://friendfeed.com/">FriendFeed</a>. The FriendFeed application is written using a web framework that looks a bit like <a href="http://webpy.org/">web.py</a> or <a href="http://code.google.com/appengine/docs/python/tools/webapp/">Google's webapp</a>, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.</p>
 
5
  <p>The framework is distinct from most mainstream web server frameworks (and certainly most Python frameworks) because it is non-blocking and reasonably fast. Because it is non-blocking and uses <a href="http://www.kernel.org/doc/man-pages/online/pages/man4/epoll.4.html">epoll</a>, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. We built the web server specifically to handle FriendFeed's real-time features &mdash; every active user of FriendFeed maintains an open connection to the FriendFeed servers. (For more information on scaling servers to support thousands of clients, see The <a href="http://www.kegel.com/c10k.html">C10K problem</a>.)</p>
 
6
  <p>See the <a href="/documentation">Tornado documentation</a> for a detailed walkthrough of the framework.</p>
 
7
 
 
8
  <h2>Download and install</h2>
 
9
  <p><b>Download:</b> <a href="/static/tornado-0.2.tar.gz">tornado-0.2.tar.gz</a></p>
 
10
  <pre><code>tar xvzf tornado-0.2.tar.gz
 
11
cd tornado-0.2
 
12
python setup.py build
 
13
sudo python setup.py install</code></pre>
 
14
  <p>The Tornado source code is <a href="http://github.com/facebook/tornado">hosted on GitHub</a>.</p>
 
15
 
 
16
  <h3>Prerequisites</h3>
 
17
  <p>Tornado has been tested on Python 2.5 and 2.6. To use all of the features of Tornado, you need to have <a href="http://pycurl.sourceforge.net/">PycURL</a> and a JSON library like <a href="http://pypi.python.org/pypi/simplejson/">simplejson</a> installed. Complete installation instructions for Mac OS X and Ubuntu are included below for convenience.</p>
 
18
  <p style="font-weight:bold">Mac OS X 10.5/10.6</p>
 
19
  <pre><code>sudo easy_install setuptools pycurl==7.16.2.1 simplejson</code></pre>
 
20
 
 
21
  <p style="font-weight:bold">Ubuntu Linux</p>
 
22
  <pre><code>sudo apt-get install python-dev python-pycurl python-simplejson</code></pre>
 
23
 
 
24
  <h2>Hello, world</h2>
 
25
  <p>Here is the canonical &quot;Hello, world&quot; example app for Tornado:</p>
 
26
  <pre><code>import tornado.httpserver
 
27
import tornado.ioloop
 
28
import tornado.web
 
29
 
 
30
class MainHandler(tornado.web.RequestHandler):
 
31
    def get(self):
 
32
        self.write("Hello, world")
 
33
 
 
34
application = tornado.web.Application([
 
35
    (r"/", MainHandler),
 
36
])
 
37
 
 
38
if __name__ == "__main__":
 
39
    http_server = tornado.httpserver.HTTPServer(application)
 
40
    http_server.listen(8888)
 
41
    tornado.ioloop.IOLoop.instance().start()</code></pre>
 
42
  <p>See the <a href="/documentation">Tornado documentation</a> for a detailed walkthrough of the framework.</p>
 
43
 
 
44
  <h2>Discussion and support</h2>
 
45
  <p>You can discuss Tornado and report bugs on <a href="http://groups.google.com/group/python-tornado">the Tornado developer mailing list</a>.
 
46
        
 
47
  <h2>Updates</h2>
 
48
  <p>Follow us on <a href="http://www.facebook.com/pages/Tornado-Web-Server/144144048921">Facebook</a>, <a href="http://twitter.com/tornadoweb">Twitter</a>, or <a href="http://friendfeed.com/tornado-web">FriendFeed</a> to get updates and announcements:</p>
 
49
  <div style="margin-top:1em"><a href="http://www.facebook.com/pages/Tornado-Web-Server/144144048921" style="margin-right:10px"><img src="/static/facebook.png" style="width:64px;height:64px" alt="Facebook"/></a><a href="http://twitter.com/tornadoweb" style="margin-right:10px"><img src="/static/twitter.png" style="width:64px;height:64px" alt="Twitter"/></a><a href="http://friendfeed.com/tornado-web" style="margin-right:10px"><img src="/static/friendfeed.png" style="width:64px;height:64px" alt="Facebook"/></a></div>
 
50
 
 
51
{% end %}