Proof of concept of a realtime long polling application with Tornado and pika/RabbitMQ.
It is a Web form to test a server connection receiving a random response, "Success" or "Error".
html with the form and long polling javascript.
Python script that waits for test requests answering them with a random response.
Tornado application serving the web form and handling assynchronous requests and responses.
pika/RabbitMQ helper class for the Tornado webserver.
Make sure you have pika and tornado python libs installed and your rabbitmq server running.
$python tornado_conn.py
and
$python tester.py
open your browser on http://localhost:8888
- Test requests should be identified and isolated, only the requester gets the response.