Python class with tornado server and sockJS library, for manage websockects connections of diferent users in a web app You could use this script for you web app for sending notifications of diferents actions in the web by the users like facebook site.
You only need execute this script and the server is running: python Notificador.py
Previously yu must install all the dependencies neccesaries: https://pypi.python.org/pypi/tornado
You will need sockjs-0.3.js in the client and front for manging this possibility. http://sockjs.github.io/sockjs-client/