Through the pursuit of experimenting with real-time digital collaboration, I’ve been exploring server-sent events (SSE) with a Ruby web development DSL called Sinatra, backed by a lightweight web server called Thin. Check out a live demo at sinatra-drinks-coffee.herokuapp.com (open it in multiple browser windows to see the full effect). Then, explore the code on github. It’s very straight-forward, but feel free to ask questions in the comments.
People are more likely to stay engaged in digital collaboration if they can observe each other’s actions in real-time. In order for people to observe each other’s actions, objects and their states must rapidly synchronize across all connected and authorized clients. This need has traditionally been a complicated problem given that the internet is stateless. The internet protocol (IP) was designed to treat data as independent pairs of requests and responses; not as continuous bi-directional streams. However, the perception of persistent connections between servers and clients are necessary for real-time collaboration.
Even more fun than twisting the original architecture of the internet is the need for reconciling conflicts that arise when more than one person changes a document’s state. If you have ever used Google Docs, you have used a web service that supports real-time collaboration using operational transformation control (integration) algorithms.
In spite of the challenges and limitations of real-time collaboration, I anticipate that people will expect these tools to support an ever-expanding range of activities in the next few years. Especially in engineering, design and architecture.
Here’s a good explanation of how Google reconciles conflicts in Google Docs: http://googledocs.blogspot.com/2010/09/whats-different-about-new-google-docs_22.html
Server-Sent Events Vs. Web Sockets