Free Online Storage

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 21 September 2010

What’s different about the new Google Docs: Working together, even apart

Posted on 07:05 by Unknown
Editor’s Note: In May, we walked through some technical details about what’s different in the new Google Docs. Beginning today, we’ll dive into the collaboration technology behind Google Docs in three parts, starting with a look at the challenges encountered when building a collaborative application. Tomorrow’s post will describe how Google Docs uses an algorithm called operational transformation to merge edits in real time. Finally, on Thursday, we’ll dive into the collaboration protocol for sending changes between the editors.

The way people work is changing. Ten years ago, it was too hard to co-author a document, so things took longer, or people just put up with less collaboration. But as our communication tools have become better, it’s become more common to have a group of people writing a doc collaboratively.

Collaboration is technically difficult because many people can be making changes to the same content at almost the same time. Since connection speeds aren’t instantaneous, when you make a change, you’re temporarily creating a local version of the document that is different from the versions other collaborators see. The core implementation challenge is to make sure that all the editing sessions eventually converge on the same, correct, version of the document.

One approach taken by the old Google documents and by many other collaborative word processors is to compare document versions. Suppose there are two editors: John and Luiz. In the old Google Docs, the server begins with one version of a document and receives an updated version from John. The server finds the differences between its version and John’s version and decides out how to merge those two versions as best it can. Then the server sends this merged version to Luiz. If Luiz has changes that have not yet been sent to the server, then he needs to compare the server version with his local version and merge the two versions together. Then Luiz sends this merged local version to the server and the process continues.

But often, this approach doesn’t work well. Take the example below. John, Luiz and the server start with the text The quick brown fox. John bolds the words brown fox. As he’s doing this, Luiz highlights the word fox and replaces it with the word dog. Suppose John’s changes arrive at the server first, and then the server sends those changes to Luiz.



The correct way to merge John’s style change and Luiz’s text substitution is as The quick brown dog. But Luiz doesn’t have enough information to know what the correct merge is. From his perspective, The quick brown fox dog, The quick brown dog, The quick brown dog fox are all perfectly valid ways of merging the two versions. And that’s the problem: if you just compare versions, you can’t make sure that changes are merged in the way that an editor would expect.

You can avoid the merging problem by introducing more restrictions on the editors. For example, you could lock paragraphs so that only one editor was ever allowed to type in a single paragraph at a given time. But locking paragraphs isn’t a great solution: you’re sidestepping the technical challenges by hampering the collaborative editing experience. Plus, it’s always possible for two editors to begin editing a paragraph at the same time. In that case, one of the editors will find out that he didn’t actually acquire the paragraph lock and any changes that he made while he thought he had the lock will need to be merged (which has all of the above problems) or discarded.

The new version of Google documents does things differently. In the new editor, a document is stored as a series of chronological changes. A change might be something like {InsertText 'T' @10}. That particular change was to insert the letter T at the 10th position in the document. A fundamental difference between the new editor and the old one is that instead of computing the changes by comparing document versions, we now compute the versions by playing forward the history of changes.

This approach creates a better collaboration experience, because the editors’ intentions are never ambiguous. Since we know the revision of each change, we can check what the editor saw when he made that change and we can figure out how to correctly merge that change with any changes that were made since then.

That’s it for today. Tomorrow’s post will give an overview of the algorithm for merging changes — operational transformation. Even if we know how to properly merge changes, we still need to make sure that each editor knows when there are changes that need to be merged. This challenge is handled by the collaboration protocol which will be the subject of Thursday’s post. Together, these technologies create the character-by-character collaboration in Google Docs.

Posted by: John Day-Richter, Software Engineer
Email ThisBlogThis!Share to XShare to Facebook
Posted in documents, Google Apps Blog | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • More Google Experiments That Hide Results URLs
    There are at least two other versions of the Google experiment that removes search results URLs . The first alternate version places site na...
  • Add a Keyboard Shortcut for Chrome's App Launcher
    I'm not sure why Chrome's app launcher doesn't have a keyboard shortcut, but it's pretty easy to add one. For Windows XP, r...
  • Merge cells vertically in Google spreadsheets
    There are many times when you want to format your spreadsheets in a certain way to make your data easier to read and understand. Starting to...
  • Docs on the iPhone with Chris Pirillo
    Posted by: Meredith Whittaker, Program Manager Chris Pirillo , Gnomedex Conference founder, CNN.com Live technology contributor, and one of ...
  • Writing a campaign speech with Google Docs
    A few months ago, my colleague Julia and I were at a technology conference for educators. Teachers were very enthusiastic when we demonstrat...
  • Google Now for Google's Homepage in Testing
    It looks like Google Now won't be limited to Android, iOS and Chrome , it will also be added to Google's homepage. Some code from a...
  • Google spreadsheets, now with discussions
    Getting things done with others would be much easier if everyone was sitting right next to you. But since that’s rarely the case, we’re alwa...
  • Collect audience input with Google Sites & Moderator
    Google Moderator helps anyone find the best input from their audiences, whether it’s suggestions on how to stop the oil spill , debate que...
  • Get Docs in 38 languages
    Posted by: Ken Norton, Product Manager, Google Docs Earlier today we launched Google Docs in 13 more languages, bringing our total number of...
  • View .doc attachments right in your browser
    Cross posted on the Gmail blog If you receive Microsoft® Word files as attachments in Gmail, you can now view them with a single click -- no...

Categories

  • Acquisitions
  • Ads
  • Android
  • Annoyances
  • April Fools Day
  • attachments
  • back to school
  • Blogger
  • charts
  • chat
  • Chrome
  • Chrome extensions
  • chrome web apps
  • Cloud Connect
  • collaboration
  • comments
  • community
  • discussions
  • DMCA
  • docs
  • document list
  • documents
  • documents list
  • drawings
  • drivebacktoschool
  • Easter Egg
  • education
  • Faces of Docs
  • forms
  • gmail
  • gone google
  • Google Alerts
  • Google Analytics
  • Google Apps Blog
  • Google Apps Script
  • Google Calendar
  • Google Cast
  • Google Checkout
  • Google Chrome
  • Google Chrome OS
  • Google Cloud Connect
  • Google Contacts
  • Google Dictionary
  • Google Docs
  • Google Docs Viewer
  • google documents
  • google drive
  • Google Earth
  • Google Goggles
  • Google Hangouts
  • Google Instant
  • Google Keep
  • Google Latitude
  • Google Local
  • Google Maps
  • Google Music
  • Google News
  • Google Notebook
  • Google Now
  • Google Pack
  • Google Photos
  • Google Play
  • Google Plus
  • Google Reader
  • Google Sites
  • Google Suggest
  • Google Takeout
  • Google Talk
  • Google Toolbar
  • Google Translate
  • Google Trends
  • Google Voice
  • Google Wallet
  • Google+
  • googlenew
  • Greasemonkey
  • Guest Post
  • holiday
  • iGoogle
  • Image Search
  • images
  • InOut
  • iOS
  • Keep
  • Knowledge
  • mobile
  • OCR
  • offline
  • OneBox
  • paperless
  • pdfs
  • photo
  • photos
  • Picasa Web Albums
  • presentations
  • product ideas
  • profiles
  • quickoffice
  • Reddit
  • research
  • save to drive
  • scripts
  • Security
  • sharing
  • sheets
  • shortcut
  • slides
  • spell check
  • spreadsheets
  • stock photos
  • storage
  • students
  • tables
  • teachers
  • templates
  • Tips
  • User interface
  • videos
  • Viewer
  • Visualization
  • Voice Search
  • Web Search
  • Yahoo
  • YouTube

Blog Archive

  • ►  2013 (519)
    • ►  December (33)
    • ►  November (44)
    • ►  October (64)
    • ►  September (50)
    • ►  August (63)
    • ►  July (60)
    • ►  June (57)
    • ►  May (62)
    • ►  April (49)
    • ►  March (33)
    • ►  February (1)
    • ►  January (3)
  • ►  2012 (34)
    • ►  December (4)
    • ►  November (4)
    • ►  October (5)
    • ►  September (4)
    • ►  August (2)
    • ►  July (1)
    • ►  June (3)
    • ►  May (2)
    • ►  April (2)
    • ►  March (2)
    • ►  February (5)
  • ►  2011 (80)
    • ►  December (4)
    • ►  November (1)
    • ►  October (7)
    • ►  September (10)
    • ►  August (11)
    • ►  July (8)
    • ►  June (9)
    • ►  May (1)
    • ►  April (8)
    • ►  March (8)
    • ►  February (8)
    • ►  January (5)
  • ▼  2010 (118)
    • ►  December (11)
    • ►  November (16)
    • ►  October (6)
    • ▼  September (13)
      • Keyboard shortcuts in Google Sites
      • More tools for viewing document revisions
      • Import your files many different ways
      • What’s different about the new Google Docs: Making...
      • What’s different about the new Google Docs: Confli...
      • A more fontastic Google Docs
      • What’s different about the new Google Docs: Workin...
      • Print your spreadsheets (and save ink) with more p...
      • Back to School with Google forms
      • Learn about Google Docs
      • Easier site organization with drag and drop
      • Trimming our privacy policies
      • Drawing out ideas in documents
    • ►  August (13)
    • ►  July (7)
    • ►  June (15)
    • ►  May (11)
    • ►  April (7)
    • ►  March (7)
    • ►  February (6)
    • ►  January (6)
  • ►  2009 (82)
    • ►  December (14)
    • ►  November (4)
    • ►  October (10)
    • ►  September (10)
    • ►  August (4)
    • ►  July (6)
    • ►  June (6)
    • ►  May (5)
    • ►  April (4)
    • ►  March (8)
    • ►  February (7)
    • ►  January (4)
  • ►  2008 (97)
    • ►  December (6)
    • ►  November (4)
    • ►  October (6)
    • ►  September (8)
    • ►  August (5)
    • ►  July (7)
    • ►  June (11)
    • ►  May (20)
    • ►  April (13)
    • ►  March (6)
    • ►  February (6)
    • ►  January (5)
  • ►  2007 (25)
    • ►  December (1)
    • ►  November (1)
    • ►  October (2)
    • ►  September (3)
    • ►  August (3)
    • ►  July (4)
    • ►  June (3)
    • ►  May (2)
    • ►  April (2)
    • ►  March (1)
    • ►  February (2)
    • ►  January (1)
  • ►  2006 (10)
    • ►  December (2)
    • ►  November (4)
    • ►  October (4)
Powered by Blogger.

About Me

Unknown
View my complete profile