So, I had this idea.
Basically, I don't really like using websockets for actual data transfer because it's too easy to miss one thing and get out of sync, especially with crappy mobile clients etc. However, I also hate polling. So, I thought why not just use websockets as notification service to tell the client that new data is available. Then the client can update however it sees fit and without changing much. All you have to do on the web server side of things is publish a message when any data changes. It could also become more granular by posting messages for when certain pieces of data are updated.
This also means that one could fallback to polling pretty easily for clients that aren't ready for websockets.
If you want to run this example:
> bundle
> ./ws_server
> ./web_server
then visit http://127.0.0.1:3000.