O'Reilly logo

Professional XMPP Programming with JavaScript® and jQuery by Jack Moffitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Writing with Friends: A Collaborative Text Editor

WHAT'S IN THIS CHAPTER?

  • Learning the Operational Transformation algorithm

  • Using service discovery to probe features

  • Extending XMPP stanzas

People used to mail manuscripts back and forth to collaborate. Over the years, as technology improved, this turned into file sharing via disks and then sharing over e-mail. Technology has now reached a point where multiple people, even in large groups, can simultaneously edit the same document over the network, and the familiarity of the Web has made it both easy and common. Given your previous experience with XMPP applications, it should be no surprise to you that XMPP provides an ideal medium for collaborative document editing.

One of the latest examples of such applications is Google Wave, a rich, media-filled, collaborative space for groups of people to work on shared documents. When Google needed a protocol to facilitate such a platform, it turned to XMPP. On top of XMPP, Google has built a fantastic platform for collaborative editing based on the principles of operational transformation. It has also chosen to do its protocol design work on the Wave protocol in the open at http://www.waveprotocol.org.

In this chapter, you will build a collaborative text editor based on the same principles as Google Wave — operational transformation. Although the application is designed for collaboration between a pair of users, the underlying algorithms can be scaled to arbitrary numbers of collaborators. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required