This is sample tornado application using Long polling / Web Socket. User can change the opacity of the rectangle on the desktop web page from the mobile device. By default long polling is working. To use Web socket uncomment corresponding js code in index.html and pult.html, and comment the code with ajax polling.
To run app: python pultsocket.py