News for hackers. Stuff that matters.
Re:Etherpad Shows Google Docs How It’s Done (By AppJet) by pg on Wednesday November 19, 2008 @11:19AM (#369577)
It's not Google's scaling requirements that limit their simultaneity (or, obviously, a deliberate choice). Google Docs uses a different architecture, where a master copy of the document is kept on the server and broadcast every n seconds to all the clients. This is easier to implement, but can't be made fast enough to feel realtime.

Etherpad uses a different approach: they ship all the edits to all the users as soon as they happen, and each client processes them to produce an updated document. The hard part is making sure each user is seeing the same thing. This is easy with the Google Docs model where a single master copy is regularly rebroadcast. To do it the Etherpad way, without a master copy, is extremely hard. From what I've heard about what they had to do, it sounds like one of the more impressive hacking achievements by a YC-funded co to date.

Re:Etherpad Shows Google Docs How It’s Done (By AppJet) by celoyd on Wednesday November 19, 2008 @10:14PM (#370270)
A master model is not necessarily slower. Everything goes through the server either way, and it comes down to how much data you have to transmit and how much the sender, server, and receiver have to process it.

At http://draftastic.com/ we keep a master but only broadcast changed portions -- a compromise between re-sending the whole document and handling a hail of tiny diffs. This uses automatic locking, which we thought was reasonable given that people rarely want to type directly on top of each other, but it means a much simpler implementation of undo and so on. Basically, we've made a heartbeat-based system with heartbeats so cheap that they can be fast, and we never need a merge algorithm.

In any case, I'll be watching the just-raw-edits approach with interest. Best of luck to Etherpad -- there's plenty of room in the market.

Re:Etherpad Shows Google Docs How It’s Done (By AppJet) by zhyder on Wednesday November 19, 2008 @12:35PM (#369670)
Hopefully the mechanism they chose is amenable to cross-user undo. (Though it's currently missing, I'm assuming single-user undo can be added easily enough.)
Re:Etherpad Shows Google Docs How It’s Done (By AppJet) by aaroniba on Wednesday November 19, 2008 @02:09PM (#369786)
Undo works, just type control-Z (on windows) or command-Z (on a mac). It will undo only your own edits.

We haven't figured out a way to let people undo other users' edits. (We can perform the manipulation on the document, we just haven't figured out a sensible UI for it).

Re:Etherpad Shows Google Docs How It’s Done (By AppJet) by boucher on Wednesday November 19, 2008 @03:29PM (#369879)
I don't think there is a sensible UI for it. I'd leave it out completely.
Re:Etherpad Shows Google Docs How It’s Done (By AppJet) by Retric on Thursday November 20, 2008 @10:28AM (#370647)
Look at MMO's or FPS games to see how fast they can make that model.
Re:Etherpad Shows Google Docs How It’s Done (By AppJet) by ashu on Wednesday November 19, 2008 @08:39PM (#370203)
Paxos-style distributed consensus?