Trying to understand how Tornado Web Server works vs the traditional LAMP setup

381 views
Skip to first unread message

Angel Medrano

unread,
Mar 24, 2011, 11:26:46 AM3/24/11
to Tornado Web Server
Hi,
First of all, please excuse my ignorance :D
I come from a PHP background and have been slowly making my way over
to Python based development.
Im trying to understand what it would take to deploy Tornado on a
production server, I'm used to having most of that web server stuff
figured out by a host company.
Can anyone recommend any resources to learn about that topic? Perhaps
maybe any ideas or direction on the topic would be helpful as well.

Thanks!

rawberg

unread,
Mar 24, 2011, 2:16:16 PM3/24/11
to Tornado Web Server
Hey Angel,

If your just starting out with Python I would recommend starting with
Django first. It's a full stack framework with tons of documentation
and multiple books to guide you through the complete process of
developing apps with it.

Tornado is a bit more advanced with a focus on non-blocking code
execution. Since your just starting out, unless your specifically
looking for a non-blocking web server framework you're probably better
off with a project that has more documentation, examples, and a larger
community.

I'm a PHP convert myself and still learning the Python ropes. The
project I'm working on has a specific requirement for websockets and
non-blocking code execution which is what's brought me here.

Good Luck!

Angel Medrano

unread,
Mar 24, 2011, 3:23:45 PM3/24/11
to Tornado Web Server
Thanks for the reply rawberg!
Ive done some django and appengine, I should have mentioned it. But I
maybe I should take some more time working with those.

Phil Plante

unread,
Mar 24, 2011, 4:15:56 PM3/24/11
to python-...@googlegroups.com, Angel Medrano
You should take a look at the skeleton project Ben has posted to github: https://github.com/bdarnell/tornado-production-skeleton/

Its a great example of typical Tornado application deployment scheme.  I have been using a very similar method for the last year with my Tornado projects.  Using supervisord to manage the Tornado instances with nginx acting as a frontend proxy and static file server is a very flexible setup.

Arenstar

unread,
Mar 25, 2011, 8:52:52 AM3/25/11
to Tornado Web Server
Hello Angel,

Congratulations on moving over to a real language :D
I was converted a little less than a year ago and never looked back..
Python is by far more than just superior to PHP :D

Basically.. Read the Tornado Documentation, over and over and over..
http://www.tornadoweb.org/
http://www.tornadoweb.org/documentation
Here is the Python docs
http://docs.python.org/
If you need to install something, (i suggest learning a little about
virtualenv and pip)

The following thing i would suggest to do is code a little :P..
and as a really good tip..

"Python Code rarely needs documentation.."
The code itself is usually counted as documentation..
If you find yourself not know what to do, read the tornado code.. its
actually quite simple ( i was doing this within 1-2 weeks of starting
with Tornado/Python)
i literally "grep -r "what im trying to find" $tornado_libs" sometimes
to help...

Remember also, Python is a language with much more functionality than
PHP offers, so by reading quality code you can learn a better style of
application development..

I hope this helps :D

Cheers

Angel Medrano

unread,
Mar 25, 2011, 2:36:35 PM3/25/11
to Tornado Web Server
Ha Thanks for the enthusiasm.
I got into Python because of App Engine and fell in love with it. I'd
love to completely move away from Php but its just so easy to dump
some files onto a server and they work especially with traditional web
dev (I'm a freelancer so I still have to take crapy work!).

Anyway I'm getting there. Now I must to get back to setting up Nginx
to run Tornado. :D

On Mar 25, 7:52 am, Arenstar <arens...@gmail.com> wrote:
> Hello Angel,
>
> Congratulations on moving over to a real language :D
> I was converted a little less than a year ago and never looked back..
> Python is by far more than just superior to PHP :D
>
> Basically.. Read the Tornado Documentation, over and over and over..http://www.tornadoweb.org/http://www.tornadoweb.org/documentation
> Here is the Python docshttp://docs.python.org/
Reply all
Reply to author
Forward
0 new messages