Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

24
copyright 1998 Chengzheng Sun 2 Outline Basic concepts, issues, and challenges Alternative approaches and algorithms GROVE and dOPT algorithm Jupiter algorithm adOPTed algorithm REDUCE and GOT algorithm GOTO algorithm Major achievements and future directions

description

Presentation by Chengzheng Sun and Clarence (Skip) Ellis. Real-time CE (Cooperative Editing) systems allow multiple geographically dispersed users to view and edit a shared document at the same time. The Sun and Ellis presentation discusses the Major technological components of an Operational transformation System for CE, including: Distributed computing (Computer networks/Internet), Interactive computing (Human-Computer interaction), and, Collaborative computing (Human-Human interaction). Google established Operational Transformation as the heart and soul of the Collaborative Computing Age when they used the Operational Transformation as the Wave/Federation protocol. Florian Reuter pushed OT technology further when he developed OTXML, a flowing but very rich and complex document model for Collaborative Computing.

Transcript of Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

Page 1: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 2

Outline

Basic concepts, issues, and challenges

Alternative approaches and algorithms– GROVE and dOPT algorithm

– Jupiter algorithm

– adOPTed algorithm

– REDUCE and GOT algorithm

– GOTO algorithm

Major achievements and future directions

Page 2: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 3

What is a real-time CE system ?

Real-time CE (Cooperative Editing) systems allow multiple geographically dispersed users to view and edit a shared document at the same time.

Major technological components:

– Distributed computing Computer networks/Internet

– Interactive computing: Human-Computer interaction

– Collaborative computing Human-Human interaction

Page 3: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 4

One significant challenge

Consistency maintenance under the following constraints:

High responsiveness:– the response to local operations

is as short as a single-user editor

High concurrency:– multiple users are allowed to edit

any parts of the document at any time.

High communication latency:– the Internet environment

Page 4: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 5

Operation dependence relationship

Causal ordering relation “” among operations based on Lamport’s “happen before” relation.

Ob is dependent on Oa iff Oa

Ob

Oa and Ob are independent, i.e., Oa || Ob, iff neither OaOb, nor Ob Oa

O1 O3, O2 O3|| O2

O 1O 1

O 2O 2

O 3O 3

Page 5: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 6

Three inconsistency problems

Divergence Final document contents are different

at all sites.

Causality-violation Execution order is different from the cause-effect order. E.g., O1 O3

Intention-violation The actual effect is different from the intended effect. E.g., || O2

A non-serializable problem

O1O1

O 2O 2

O3O3

Page 6: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 7

Traditional approaches

Turn-taking: – Avoid problems by prohibiting concurrency.

Locking: – Unable to solve any of the three problems.

Serialization: – Unsuitable for resolving intention violation.

Causal ordering: – Unsuitable for resolving divergence, or intention

violation.

Page 7: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 8

Operational transformation: an innovation

Basic idea: an operation is transformed before its execution against previously executed independent operations.

OT AlgorithmO

Executed independent operations

O’

Major properties:•Causally ordered execution and good responsiveness •Convergence and intention preservation

Page 8: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 9

GROVE an dOPT algorithm Ellis et al. (MCC, SIGMOD’89).

Log: a linear data structure for saving executed operations.

dOPT algorithm: For 0 i < N

If O || Log[i] Then T(O, Log[i])

O1O1

O2O2

O3O3T(O2,O1)

T(O1,O2)

T(O1,O2)

Causally ordered execution based on state vector timestamping.

Transformation property: For Oa|| Ob Let O’aOa Ob), O’bOb Oa) Then Oao O’b Ob o O’a

Page 9: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 10

The dOPT puzzle: O2 || (O3 O1)

O2

O1

O3

Site 3 Site 1 Site 2

O1’O1

[ O2, O3’ ]Log

dOPT

T

At site 2

At site 3 and 1

O2’O2

[ O3, O1]Log

dOPT

T T

O2 is context-equivalent to O 3

O1 is context-deferent from O 2

Page 10: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 11

The Jupiter approachNichols et al (Xerox PARC, UIST95)

Server

Star-like communication topology

(0, 0)

(2, 0)

(0, 1)(1, 0)

(2, 2)

(2, 1)

(0, 2)(1, 1)

(1, 2)

serverclient

Initial state

2-dimentional state space

Page 11: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 12

The dOPT puzzle in another form

O1

O3 O2

client server

O1

O3O2 || (O3 O1)

Page 12: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 13

Jupiter solution to the puzzle

(0, 0)

(2, 0)

(0, 1)(1, 0)

serverclient

Initial state

2-dimentional state space

O1

O3 O2

client server

O3 O2

(2, 1)O2’’

O1’

O1 O2’

(1, 1)

O3’

Page 13: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 14

The adOPTed approach Ressel et al (U. of Stuttgart, CSCW96)

Transformation Property 2:

T(T(O, Ob), Oa’) = T(T(O, Oa), Ob’)

Transformation Property 1: Oa Ob’ Ob o Oa’

O a

Ob’=T(Ob,Oa)

OO b

Oa’=T(Oa,Ob)

T(O,Ob)

T(Ob,O)

T(O,Oa)

T(Oa,O)

N-dimentional Interaction Model

S0

S1

S2

Ob’=T(Ob,Oa)

Oa’=T(Oa, Ob)S3

Oa

Ob

Page 14: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 15

adOPTed solution to the puzzle

O2

O1

O3

O1

O 2

O3

O2’’=T(O2’, O1)

O1’=T(O1, O2’)

O3’=T(O3, O2)

O2’=T(O2, O3)

Path taken by site 3 and 1

Path taken by site 2

Site 3 Site 1 Site 2

Page 15: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 16

The REDUCE approach Sun et al (Griffith Uni. TOCHI 5(1), 98)

•Inclusion Transformation (IT)

•Exclusion Transformation (ET):

•Reversibility of IT and ET:

•GOT using 1-dimentional HB:

Oa Oa’

Ob

+

Oa Oa’

Ob

_

Oa_Oa’Oa +

Ob

GOT(IT/ET)

O

HBO’

Page 16: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 17

REDUCE solution to the puzzle

O2

O2 || (O3 O1)

O1

[ O2, O3’ ]

O1’

+ +

HB

GOT

O1

O3

O3

_

_

Page 17: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 18

An optimized algorithm: GOTOSun and Ellis (CSCW98)

O1

[ O2, O3’ ]

O1’

HB

GOTO

O1

O3 O2 +

[ O3, O2’ ]

_

transpose

+

Page 18: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 19

Major achievements (1)

Identification of three major inconsistency problems:– divergence,

– causality violation, and

– intention violation (non-serializable).

Definition of three consistency properties: – convergence,

– causality preservation, and

– intention preservation (most challenging to achieve).

Page 19: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 20

Major achievements (2)

Three types of generic OT algorithms :

– Based on a 1-dimensional history

buffer: dOPT, GOT, GOTO

– Based on a 2-dimensional state

space graph: Jupiter

– Based on an N-dimensional

interaction graph: adOPTed

Page 20: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 21

Major achievements (3)

Two types of application-dependent OT functions:– IT: used by all OT algorithms

– ET: used by OT algorithms based on 1-dimensional data structures

Two transformation properties: – TP1: required by all OT systems

– TP2: required by OT systems with arbitrary communication topology.

Page 21: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 22

Future directions (1)

Formalization, verification, and optimization of OT algorithms.

Page 22: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 23

Future directions (2)

Experimental evaluation of OT-based systems from end-users’ perspective.

Page 23: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 24

Future directions (3)

Generalization and application of the OT technology to other groupware and distributed systems, e.g:– collaborative hypertext/graphics/image/multimedia editors

– collaborative CAD, CASE, and database applications

– Internet-based multi-player games

Page 24: Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements

copyright 1998 Chengzheng Sun 25