My partner and I are working on an application that allows people to collaborate in real time on an online music playlist. To achieve this goal, we utilized WebSockets to broadcast our changes across multiple browsers. WebSockets makes communication possible between users’ browsers and a server. This allows us to make changes on a host playlist and update other clients with new changes. The Ruby gem Faye is a publish-subscribe messaging system that enables clients to send information in real time, such as chat messages. This is how we accomplished the chatbox and playlist updates using Faye.
Using the same methology, all elements on the page can be broadcasted amongst multiple clients.