4 Operational Transformation

Replicas may be edited concurrently. Site A can generate operation O1 while site B generates O2, and both operations take effect immediately where they originate. Neither user has to wait for a distributed lock, a server response, or a multi-phase commit protocol.

Two sites generating concurrent operations

When an operation reaches a site whose state has changed concurrently, CEDA transforms the operation into the new context while preserving its intention. Different replicas may apply concurrent operations in different orders and nevertheless converge once they have received the same updates. Operations that may be causally related retain their causal ordering.

This is the basis for update-anywhere operation: replicas remain available through partitions and are reconciled afterwards. It supports immediate local feedback, real-time collaboration, and longer periods of disconnected work using the same underlying model.

Operational Transformation on text

Text makes concurrent editing easy to see. Users at different sites can insert and delete characters in their local copies. CEDA merges the edits so the result contains the surviving insertions and deletions while maintaining the relative order intended by each edit.

Concurrent changes merged on text

The same general approach extends beyond strings to structured application data. The Operational Transformation specification develops the transformation laws, data types, algorithms, and text examples in detail.