Python Tornado Webserver


Tornado is a open-source, fast, scalable non-blocking web server used for development of real time web services. It solves the c10k problem by using epoll library and can handle thousands of simultaneous connections. It runs as a single threaded non-blocking io loop that waits on requests (events) from users and servers them (hence also known as event-triggered web server). Unlike blocking web servers where thread management, context switching becomes expensive, Tornado gains in thread safety.

See below for prerequisites, installation steps along with an example of Hello World program in Tornado. Don’t worry about many things right now, just see how Tornado web server runs and realize the ease of web development with Tornado! 🙂

This post would be followed by other posts detailing about the capabilities of Tornado web framework. Please note: We use, Ubuntu 10.04, Python v2.6 and tornado2.2 for all the posts.

Prerequisites

Python 2.5+
PycURL for python v2.6
For other python version you could visit tornado

Installation

tar xvzf tornado-2.x.tar.gz 
cd tornado-2.x 
python setup.py build 
sudo python setup.py install

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s