> Consider the following scenario. There is a document whose current > state is "X". Three clients concurrently generate operations against > this document as follows: > > Client 1: insert "A" before the "X" > Client 2: insert "B" after the "X" > Client 3: delete the "X" > > I'm sure that everyone will agree that the final document state must > be "AB" if the intention of the users is to be preserved. > > There are six possible orders that the server could apply these > operations; two of them may give unexpected results! If the server > decided to apply delete operation first, then the two inserts, once > transformed to include the effect of the delete, will appear to be > concurrent inserts at the same position. In the literature, the site > identifier is used to break this tie, meaning that half the time the > result final state will "AB" and half the time it will be "BA". Wave > doesn't use site identifiers, but rather, relies on the order that the > server chooses for these inserts - this still leads to "BA" half the > time. > > What is described above is a classic TP2 puzzle. In a peer-to-peer > system this would represent divergence amongst peers. In wave it just > gives a plain weird result. I see it as not preserving the intention > of the users. >
While in one of the 6 cases wave would produce "BA" instead of "AB" all clients would converge on the same result. So no divergence would occur as it would in many TP2 systems. And though wave would produce "BA" in some cases I don't think there is a loss of intention. Client 1 could not possibly have "intended" to insert "A" before "B" since there is no way for client 1 to know about client 2's intention. Both client 1 and 2 intended to insert a character. Those characters are inserted and they both get inserted adjacent to the position of X. BTW, in "*An analysis of intention preservation in group editors" Du Li and Rui Li *seek to formalize the definition of intention preservation. The DOI is: http://doi.acm.org/10.1145/1281100.1281166 Also, in "*Decentralized concurrency control for real-time collaborative editors*" Abdessamad Imine appears to have solved the TP2 puzzle and done so without the need for vector clocks. DOI: http://doi.acm.org/10.1145/1416729.1416781 I'm not sure if Abdessamad's work is state of the art or if there has been more advances in TP2 since. If there has, please let me know. -Tad -- You received this message because you are subscribed to the Google Groups "Wave Protocol" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/wave-protocol?hl=en.
