Title: Tombstone Transformation Functions for Ensuring Consistency in Collaborative Editing Systems
1Tombstone Transformation Functions for Ensuring
Consistency in Collaborative Editing Systems
- Gérald Oster, Pascal Molli, Pascal Urso and
Abdessamad Imineoster,molli,urso,imine_at_loria.fr
2Outline
- Context
- Background (Operational Transformation)
- Model
- Correctness properties
- TTF Approach
- Summary
3Context
- Collaborative editing systems
- Multiple users
- Distributed across space and time
- Supporting multi-synchronous editing Dourish95
- Synchronous (real-time), asynchronous
(disconnected work), combination of Sync./Async.
4Context
- Documents are replicated (optimistic)
- High responsiveness
- Disconnection support
- Users work on their own copy and produce
operations - Executed locally
- Sent to other copies
- Integrated with other operations
- Executed on remote copies
- How to maintain consistency of replicated
documents?
5Outline
- Context
- Background (Operational Transformation)
- Model
- Correctness properties
- TTF Approach
- Summary
6Copies Convergence
- Concurrent order gt different integration
orders - gt different state of the copies of the document
abc
abc
op2Insert(2,y)
op1Insert(3,x)
abxc
aybc
op1Insert(3,x)
op2Insert(2,y)
ayxbc
aybxc
7Operational Transformation (OT) Ellis89
- From Real-time groupware
- T(op2operation, op1operation) op2
- op1 and op2 are concurrent, defined same state S
- op2 same effects as op2, but defined on state
S.op1
abc
abc
op2Insert(2,y)
op1Insert(3,x)
abxc
aybc
op1T(op1,op2) Insert(4,x)
op2T(op2,op1) Insert(2,y)
aybxc
aybxc
8Consistency Maintenance
- Genericity of OT approach
- 2 components
- Integration algorithm
- Transformation functions
- Correctness relies on
- Correctness of integration algorithm
- Properties on transformation functions
- Different OT integration algorithms gt
different properties
9Correctness Properties Ressel96 /1
- TP1 op1 . T(op2,op1) op2 . T(op1,op2)
op2
op1
op1T(op1,op2)
op2T(op2,op1)
10Correctness Properties Ressel96 /2
- TP2 T(op3, op1.T(op2,op1)) T(op3,
op2.T(op1,op2))
op2
op1
op3
op1
op2
op3
op3
11Problem
- There is no published transformations (Ellis89,
Ressel96, Sun98, Suleiman98, IMOR03) ensuring
both - TP1
- TP2
- Existence of such transformations?
- Guidelines to write them?
12Outline
- Context
- Background (Operational Transformation)
- Model
- Correctness properties
- TTF Approach
- Summary
13Common Problem (false-tie)
axyc? ayxc?
14Our Approach
- Keep tombstones of deleted elements
- Model sequence of (character, visibility_flag)
15Tombstone Transformation Functions (TTF)
- T(Insert(p1,el1,sid1), Insert(p2,el2,sid2))
- if(p1ltp2) return Insert(p1,el1,sid1)
- else if(p1p2 and sid1ltsid2) return
Insert(p1,el1,sid1) - else return Insert(p11,el1,sid1)
-
- T(Insert(p1,el1,sid1), Delete(p2,el2,sid2))
- return Insert(p1,el1,sid1)
-
- T(Delete(p1,sid1), Insert(p2,sid2))
- if(p1ltp2) return Delete(p1,sid1)
- else return Delete(p11,sid1)
-
- T(Delete(p1,sid1), Delete(p2,sid2))
- return Delete(p1,sid1)
-
16Correctness
- TTF satisfy TP1 TP2
- Proofs built using a theorem prover
- TTF are injective functions
- Reversibility property T-1( T( op1 ,op2 ), op2
) op1
17Inverses of Transformation Functions
- T-1(Insert(p1,el1,sid1), Insert(p2,el2,sid2))
- if(p1ltp2) return Insert(p1,el1,sid1)
- else if(p1p2 and sid1ltsid2) return
Insert(p1,el1,sid1) - else return Insert(p1-1,el1,sid1)
-
- T-1(Insert(p1,el1,sid1), Delete(p2,el2,sid2))
- return Insert(p1,el1,sid1)
-
- T-1(Delete(p1,sid1), Insert(p2,sid2))
- if(p1ltp2) return Delete(p1,sid1)
- else return Delete(p1-1,sid1)
-
- T-1(Delete(p1,sid1), Delete(p2,sid2))
- return Delete(p1,sid1)
-
18Compacted Storage Model (C-TTF)
- C-Model sequence of (character, abs_pos)
view2model()
Insert(5,y)
y
h
a
b
c
n
Model
View
Insert(3,y)
a
b
y
c
view2model()
Compacted Model
Insert(5,y)
a,2
b,3
y,5
c,6
19Delta Storage Model (D-TTF)
- D-Model sequence of (character, offset)
view2model()
Insert(5,y)
Compacted Model
a,2
b,3
y,5
c,6
a
View
Insert(3,y)
b
y
c
view2model()
DeltaModel
Insert(5,y)
c,1
a,2
b,1
y,2
Ce,1
20Models Comparison
- Basic Model
- Deleted characters are kept
- Size of the model is growing infinitely
- Compacted Model
- Update absolute position of all characters
located after the effect position - Delta Model
- Update the offset of next character
- Our observations
- View2model can be optimised (caret position)
- Overhead of view2model is not significant
21Outline
- Context
- Background (Operational Transformation)
- Model
- Correctness properties
- TTF Approach
- Summary
22Conclusion Future Work
- First set of transformation functions satisfying
- TP1TP2 properties
- Reversibility property
- Could be used with adOPTed, SOCT2-3-4-5, GOT,
GOTO, COT, - Guidelines to develop transformations
- Extend approach to other data-structures
- Supporting group undo
- Management of conflicts
23Gérald Oster ltoster_at_loria.frgt
CollaborateCom 2006, Atlanta, Georgia,USA,
November 2006