Operational transformation
Operational transformation is a technology for supporting a range of collaboration functionalities in advanced collaborative software systems. OT was originally invented for consistency maintenance and concurrency control in collaborative editing of plain text documents. Its capabilities have been extended and its applications expanded to include group undo, locking, conflict resolution, operation notification and compression, group-awareness, HTML/XML and tree-structured document editing, collaborative office productivity tools, application-sharing, and collaborative computer-aided media design tools. In 2009 OT was adopted as a core technique behind the collaboration features in then-Google Wave and Google Docs.
History
Operational Transformation was pioneered by C. Ellis and S. Gibbs in the GROVE system in 1989. Several years later, some correctness issues were identified and several approaches were independently proposed to solve these issues, which was followed by another decade of continuous efforts of extending and improving OT by a community of dedicated researchers. In 1998, a Special Interest Group on Collaborative Editing was set up to promote communication and collaboration among CE and OT researchers. Since then, SIGCE holds annual CE workshops in conjunction with major CSCW conferences, such as ACM, CSCW, GROUP and ECSCW.System architecture
Collaboration systems utilizing Operational Transformations typically use replicated document storage, where each client has their own copy of the document; clients operate on their local copies in a lock-free, non-blocking manner, and the changes are then propagated to the rest of the clients; this ensures the client high responsiveness in an otherwise high-latency environment such as the Internet. When a client receives the changes propagated from another client, it typically transforms the changes before executing them; the transformation ensures that application-dependent consistency criteria are maintained by all sites. This mode of operation results in a system particularly suited for implementing collaboration features, like simultaneous document editing, in a high-latency environment such as the web.Basics
The basic idea of OT can be illustrated by using a simple text editing scenario as follows. Given a text document with a string "abc" replicated at two collaborating sites; and two concurrent operations:- O = Insert
- O = Delete
Consistency models
One functionality of OT is to support consistency maintenance in collaborative editing systems. A number of consistency models have been proposed in the research community, some generally for collaborative editing systems, and some specifically for OT algorithms.The CC model
In Ellis and Gibbs's 1989 paper "Concurrency control in groupware systems", two consistency properties are required for collaborative editing systems:- Causality preservation: ensures the execution order of causally dependent operations be the same as their natural cause-effect order during the process of collaboration. The causal relationship between two operations is defined formally by Lamport's "happened-before" relation. When two operations are not causally dependent, they are concurrent. Two concurrent operations can be executed in different order on two different document copies.
- Convergence: ensures the replicated copies of the shared document be identical at all sites at quiescence.
The CCI model
The CCI model was proposed as a consistency management in collaborative editing systems. Under the CCI model, three consistency properties are grouped together:- Causality preservation : the same as in the CC model.
- Convergence: the same as in the CC model.
- Intention preservation: ensures that the effect of executing an operation on any document state be the same as the intention of the operation. The intention of an operation O is defined as the execution effect which can be achieved by applying O on the document state from which O was generated.
The CCI model is independent of document types or data models, operation types, or supporting techniques. It was not intended for correctness verification for techniques that are designed for specific data and operation models and for specific applications. In, the notion of intention preservation was defined and refined at three levels: First, it was defined as a generic consistency requirement for collaborative editing systems; Second, it was defined as operation context-based pre- and post- transformation conditions for generic OT functions; Third, it was defined as specific operation verification criteria to guide the design of OT functions for two primitive operations: string-wise insert and delete, in collaborative plain text editors.
The CSM model
The condition of intention preservation was not formally specified in the CCI model for purposes of formal proofs. The SDT and LBT approaches try to formalize an alternative conditions that can be proved. The consistency model proposed in these two approaches consist of the following formal conditions:- Causality: the same definition as in CC model
- Single-operation effects: the effect of executing any operation in any execution state achieves the same effect as in its generation state
- Multi-operation effects: the effects relation of any two operations is maintained after they are both executed in any states
The CA model
Alternatively, the CA model is based on the admissibility theory. The CA model includes two aspects:
- Causality: the same definition as in CC model
- Admissibility: The invocation of every operation is admissible in its execution state, i.e., every invocation must not violate any effects relation that has been established by earlier invocations.
OT system structure
OT is a system of multiple components. One established strategy of designing OT systems is to separate the high-level transformation control algorithms from the low-level transformation functions.| OT Control Algorithms |
| OT properties and conditions |
| OT Transformation Functions |
The transformation control algorithm is concerned with determining:
- Which operation should be transformed against a causally ready new operation
- The order of the transformations
The other alternative approach was proposed in. In their approach, an OT algorithm is correct if it satisfies two formalized correctness criteria:
- Causality preservation
- Admissibility preservation