Raspberry Pi websockets with Python & Tornado

I started to look into websockets for RaspberryPi. My Pi is overclocked at 900Mhz and it’s stable but even so it became apparent that loading it with too many HTTP requests for various things (streaming data into EmonCMS works over HTTP) can get slow. So here’s a simple working Hello-World websockets example in Python, using the popular Tornado websocket library. It’s a very simple echo program, but I think proves the point that websockets are much faster than HTTP requests since they are a direct link between the server and the browser.

RaspberryPi_websockets_example_python_tornado Continue reading