tornado

How do I redirect Tornado / VXWorks shell output?

I've been working on an embedded C/C++ project recently using the shell in Tornado 2 as a way of debugging what's going on in our kit. The only problem with this approach is that it's a complicated system and as a result, has a fair bit of output. Tornado 'helpfully' scrolls the window every time some new information arrives which means ...

Should I put the complete Tornado tree under version control or not?

I finally have a hardware guy that is insterested in controlling the firmware. This is for vxworks firmware. The tornado (2.2.1) gui creates a project file that has a list of files that were modified but they seem to be from all over the directory tree. So I am tempted to just controll those files. ...

What is Facebook's new Tornado framework?

Facebook just open-sourced a framework called Tornado. What is it? What does it help a site do? I believe Facebook uses a LAMP structure. Is it useful for smaller sites which are written under the LAMP stack? ...

Tornado is "a relatively simple, non-blocking web server framework written in Python"--can somewhat explain what that means?

This is probably a stupid question, but what exactly is a "non-blocking web server"? All web servers are technically non-blocking, arent they? otherwise how could they handle simultaneous connections? Apache2 achieves this using a combination of fork() and pthreads. How exactly are Tornado (and Twisted also) different? Do they just set a...

Getting Started with Tornado

After installing the necessary packages through apt (python 2.5, simplejson etc) I get an error when I try to run the demos. : Request instance has no attribute 'responseHeaders' /usr/lib/python2.5/site-packages/tornado/web.py, line 404 in flush 402 for k,v in self._generate_headers(): 403 if isinstance(v, list): 404 se...

How Can I Start Multiple Tornado Server Intances In Multiple Ports

I need to start the blog demo in the following ports: 127.0.0.1:8000 127.0.0.1:8001 127.0.0.1:8002 127.0.0.1:8003 When I run the application using: ./demos/blog/blog.py it starts in port 8888 as defined by: define("port", default=8888, help="run on the given port", type=int) How do I run multiple instances in multiple ports? Thank...

PyAMF backend choices!

I've been using PyAMF to write a backend for a flex app that will request different groups of hundreds of different images depending on what the client needs. I have been using the "simple_server" WSGI server that PyAMF supplies while developing the flex code. Now I'm ready to write a robust backend that will be able to pull images from ...

How to run multiple Tornado processes/threads/frontends?

In the tornado documentation they show how they can have a very large through-put from 4 frontends. I'd like to run an app in the same way, and would like to have the frontends running as daemon processes managed with an init.d script*. I'm fairly new to Python so don't really know where to start. Currently I'm starting the Tornado ser...

The latest recommendation for Comet in Python?

I'm going to be implementing Comet in Python (even though I hear good things about erlycomet I'm not thrilled about supporting an Erlang-based web server in addition to everything else in our back end). I've found several possibilities: Diesel Tornado Twisted-comet (I'd give a link but this is my first post and I'm restricted to a sin...

HTTP As Communication Layer for a Game

I've just started dabbling in some game development and wanted to create a simple multiplayer game. Is it feasible to use HTTP as the primary communication protocol for a multiplayer Game. My game will not be making several requests a second but rather a a request every few seconds. The client will be a mobile device. The reason I'm ask...

Python Tornado Web - AttributeError: 'Connection' object has no attribute '_execute'

I'm experiencing a strange behaviour working with the latest branch of tornadoweb when I deploy my app on my production server. I tested several times the code and it is fully working when I test it on my laptop (Archlinux) with python 2.6.3 and MySQLdb 1.2.3b2. As soon as I deploy on my production server (Ubuntu x64) with python 2.6.2...

REMOTE_ADDR not getting sent to Django using nginx & tornado

Hey guys, So I got a simple setup with nginx for static media and load balancing and tornado as webserver for django (4 servers running). My problem is remote_addr not getting passed on to django so I'm getting a KeyError: article.ip = request.META['REMOTE_ADDR'] The remote address is getting sent through as X-Real-IP (HTTP_X_REAL_IP)...

How to get Tornado Server up and running on Snow Leopard

I'm fairly new to mac os x. Right out of the box, what are the steps to getting Tornado Server up and running? For extra points (again, out of the box), steps to getting lighttpd and tornado working together. Or does it not work in that way? If this helps, I'm building an application that requires long-polling. Reference link. ...

How to integrate Disqus to Facebook Connect-enabled site (python Tornado app)

I succesfully use Facebook auth for my Tornado-based site using FacebookMixin. I also have Facebook Connect auth enabled for my Disqus, which placed in page using javascript widget. When user already logged in using FB to my site, they still have to log to FB again when they want to comment using Disqus. How Discus FB Connect suppose to...

Tornado and Python 3.x

I really like Tornado and I would like to use it with Python 3, though it is written for Python versions 2.5 and 2.6. Unfortunately it seems like the project's source doesn't come with a test suite. If I understand correctly the WSGI part of it wouldn't be that easy to port as it's spec is not ready for Python 3 yet (?), but I am rather...

Tornado Web & Persistent Connections

How can I write Http server in TornadoWeb that will support persistent Connections. I mean will be able to receive many requests and answer to them without closing connection. How does it actually work in async? I just want to know how to write handler to handle persistent connection. How actually would it work? I have handler like t...

jquery-Ajax call on tornado handlers waits for pervious ajax call to return

Hey All. I recently started testing TornadoWeb for a home-project, which uses jquery getJSON function to call my tornado handlers. And found something strange, which i seek an explanation for. I fire an ajax request for Handler1 on tornado, and in some cases request for Handler2 is initiated before Handler1 returns. It appears from dev...

Does anyone know of a asynchronous mysql lib for python?

I've been looking into non-blocking servers for python (tornado, twisted etc) but a lot of the benefits seems to be lost if there's no non-blocking connection to the database. Does anyone know if there are any projects that take care of this? (by non-blocking a la node.js) Edit: Clarified my question ...

Tornado Web Framework Mysql connection handling

I have recently been exploring the Tornado web framework to serve a lot of consistent connections by lots of different clients. I have a request handler that basically takes an RSA encrypted string and decrypts it. The decrypted text is an XML string that gets parsed by a SAX document handler that I have written. Everything works perf...

Is there a better way to serve the results of an expensive, blocking python process over HTTP?

We have a web service which serves small, arbitrary segments of a fixed inventory of larger MP3 files. The MP3 files are generated on-the-fly by a python application. The model is, make a GET request to a URL specifying which segments you want, get an audio/mpeg stream in response. This is an expensive process. We're using Nginx as th...