Title: Consistency Maintenance in Collaborative Internet Computing Systems
1Consistency Maintenance in Collaborative
Internet Computing Systems
- Professor Chengzheng Sun
- School of Computing and Information Technology
- Faculty of Engineering and Information Technology
- Griffith University
- Brisbane, Queensland 4111, Australia
2What is Internet computing?
- Internet Computing (IC) is the area that studies
the technologies of the Internet and
Internet-based computing systems and
applications. - Internet is at the core of information revolution
which changes the way we - communicate email, e-conferencing, Internet
telephony - do business electronic commerce
- learn distance learning, digital
library - work Internet-supported collaborative work
- play video-on-demand, network-based
multi-player games - A major trend in Internet computing is to use the
Internet to enhance human-to-human interaction
and communication.
3What is collaborative computing?
- Collaborative Computing (CC) is the area that
studies how to support human-to-human interaction
and collaboration using computing technology.
- Collaborative computing represents a shift in
emphasis from using computers to support the work
of individual users to using computers to support
interaction and collaboration of a group of
users. In other words, CC is about how to use
computers to support people working
together. - A major trend in collaborative computing is to
develop Internet-based applications to support
collaboration among geographically dispersed
people. Representative systems - Email
- Collaborative editors
- Multi-player games
4 What is collaborative Internet computing?
- Collaborative Internet Computing (CIC) is the
area that studies the technologies and
applications at the intersection of collaborative
and Internet computing. In other words, CIC is
about how to support people working together
online. - Three characteristic components of a CIC system
- Multiple collaborating users
- Human-computer interaction interfaces
- The Internet
5Human users are part of the communication
hierarchy
6 The challenge of consistency maintenance
- Consistency maintenance is a fundamental and
challenging issue in many areas of computing,
such as computer architecture, operating systems,
and database systems. - Significant new research is required for
consistency maintenance in collaborative Internet
computing systems because of the involvement of
interactive human users and the Internet
environment.
7The factor of interactive human users
- Involvement of human users in CIC systems
calls for consistency requirements that are
different from what (e.g., serialisability) used
in traditional database and distributed computing
systems. - Human users possess the ability to tolerate and
resolve some inconsistency problems, which may be
taken advantage of to relax some consistency
requirements on the underlying system. - Human users have special needs for responsiveness
and unconstrained interaction and collaboration,
which may impose non-traditional consistency
requirements on the underlying system.
8The factor of Internet latency
- Consistency maintenance techniques in traditional
database and distributed applications are often
based synchronous communication protocols and
pessimistic concurrency control (which prevents
inconsistency from occurring), which work well
in low-latency Local Area Network environments
but do not scale to high-latency Wide Area
Network environments, such as the
Internet. - Asynchronous communication protocols plus
optimistic concurrency control (which allows
inconsistencies to occur and provides mechanisms
for human users to resolve them) are more
efficient in the Internet environment and more
suitable to human users involved in the CIC
systems.
9Real-time collaborative editors as research
vehicle
- Real-time CE systems allow multiple
geographically dispersed users to view and edit a
shared document at the same time over the
Internet. - In CE systems, collaboration is mediated by
shared documents and interaction is modeled by
user initiated editing operations. - Shared documents can be
- Text document
- Graphics document
- Hypermedia document
- Multi-player games state
- Multi-user virtual reality state.
10One significant challenge
- Consistency maintenance under the following
constraints - High responsiveness
- response to local operations is as short as
single-user editors - maximum delay is 100ms
- High concurrency
- concurrent edit any object at any time
- concurrent undo any operation at any time
- Internet communication latency
- non-negligible (often over 100ms)
- non-deterministic
11Document replication
- Most systems have adopted replication as the
strategy of achieving high responsiveness in the
Internet environment. - Each shared document is replicated at all
collaborating sites. - A local operation is executed on the local
replica immediately to achieve high
responsiveness. - A local operation is also propagated to remote
sites to achieve consistency of multiple replicas.
How to maintain a consistent replicated document
in the face of concurrent editing operations?
12The REDUCE consistency model
- C. Sun, et al Achieving convergence,
causality preservation, and intention
preservation in real-time cooperative editing
system,
ACM Transactions on Computer-Human
Interaction, Vol. 5, No. 1, pp.63-108, March,
1998.
13Convergence
12
Replicas are initially identical.
12
O2Ins3, Y
O1 Ins1, X
Replicas may be divergent after executing
independent operations (to achieve high
responsiveness and high concurrency)
X12
12Y
X12Y
X12Y
Replicas must be convergent after executing the
same group of operations (to achieve
consistency).
Convergence ensures that all users have the same
document at the end of a session.
14Intention preservation
The intention of an operation O is the effect
that can be achieved by executing O on the
document state from which O was generated.
ABCDE
ABCDE
O2Del3, 2
O1 Ins2, 12
The intention of O2 is to delete 2 characters at
position 3 (CD) O2s intention is preserved
when it is executed on the local replica ABCDE.
ABE
The intention of O1 is to insert 12 at position
2
A12BCDE
A12BE
Intention preservation The intention of an
operation must be preserved at all sites.
Intention preservation ensures that an
operations local effect observed by a user is
the same as its remote effect observed by other
users in the face of concurrency.
15Causality-preservation
What is sum of 2 3?
This user may be confused by seeing the answer
before the question!
O1 InsWhat is the sum of 2 3?
What is sum of 2 3?
O2 InsThe sum is 5.
The sum is 5.
What is the sum of 23? The sum is 5.
What is the sum of 2 3? The sum is 5.
The sum is 5. What is the sum of 23?
What is the sum of 23? The sum is 5.
Causality preservation ensures that users
actions are always performed in their natural
cause-effect order during a session.
16Operation relationship
- Causal ordering relation Given Oa and Ob
generated at sites i and j, Oa Ob , iff
- i j and the generation of Oa happened before
the generation of Ob or - i ? j and the execution of Oa at site j happened
before the generation of Ob, or - there exists an operation Ox, such that Oa Ox
and Ox Ob. - Operation dependency relation Given two
operations Oa and Ob - Ob is dependent on Oa iff Oa Ob.
- Oa and Ob are independent, or concurrent, i.e.,
Oa Ob, iff neither Oa Ob, nor Ob Oa. - Examples O1 O2, O2 O3 , O1
O3 .
O2
O1
O3
17Definition of the consistency model
- A CE system is consistent if it maintains the
following properties - Causality preservation If Oa ? Ob , then Oa is
executed before Ob at all sites. - Convergence When all sites have executed the
same set of operations, all replicas of the
shared document are identical. - Intention preservation The effect of executing
an operation O on any document state is
equivalent to the effect of executing O on the
document state from which O was generated. - Implications of these properties
- No ordering constraint is imposed on concurrent
operations ? high responsiveness and high
concurrency - Identical results are ensured even if concurrent
operations are executed in different orders. - The final result may not be achievable by any
serialization protocol. - This consistency model has served as a
theoretical framework for systematically
addressing consistency problems in this area.
18Traditional concurrency control techniques
- Turn-taking
- Unable to support concurrent editing.
- Locking
- Unable to preserve the three properties.
- Serialization
- Unable to achieve intention preservation.
- Causal ordering
- Unable to achieve convergence or intention
preservation. - Transaction
- ACID properties do not match the three properties
required for collaborative systems.
19Achieving causality-preservation by classic
vector logical clock timestamping
0, 0, 0
0, 0, 0
0, 0, 0
O2
O1
0, 1, 0
1, 0, 0
0, 1, 0
1, 1, 0
O3
1, 1, 0
1, 2, 0
1, 2, 0
1, 1, 0
1, 2, 0
20Operational Transformation in Collaborative Text
Editors
C. Sun and C.A. Ellis Operational
transformation in real-time group editors
issues, algorithms, and achievements, Proc. of
ACM Conference on Computer Supported Cooperative
Work (CSCW), Seattle, USA, Nov.14-18, 1998.
pp.59-68.
21Basic idea of OT
- Given two concurrent operations O1 and O2. If
O1 T(O1, O2), and O2 T(O2, O1), where T is
a transformation function, then, O1 o O2 ?
O2 o O1.
12
12
O2Ins3, Y
O1 Ins1, X
Local operations are executed as-is.
X12
12Y
Remote concurrent operations are transformed
before execution
X12Y
O1 T(O1, O2) Ins1, X
X12Y
O2 T(O2, O1) Ins4, Y
OT is able to maintain consistency
(convergence and intention preservation) without
imposing any restriction on users activities,
i.e., users can edit any object at any time.
22Transformation functions
- Tii(Insp1,c1, Insp2, c2) // u1 and u2 are
user identifiers - if p1 lt p2 or (p1 p2 and u1 lt u2)
- return Insp1, c1 // e.g.
Tii(Ins3, a, Ins4, b) Ins3,a - else return Insp11, c1 //
Tii(Ins3, a, Ins1, b) Ins4,a - Tid(Insp1,c1, Delp2)
- if p1 lt p2 return Insp1, c1 //e.g.
Tid(Ins3, a, Del4) Ins3,a - else return Insp1-1, c1 //
Tid(Ins3, a, Del1 ) Ins2,a - Tdi(Delp1, Insp2, c2)
- if p1 lt p2 return Delp1 //e.g.
Tdi(Del3, Ins4, b) Del3 - else return Delp11 //
Tdi(Del3, Ins1, b) Del4 - Tdd(Delp1, Delp2)
- if p1 lt p2 return Delp1 //e.g.
Tdd(Del3, Del4) Del3 - else if p1 gt p2 return Delp1-1 //
Tdd(Del3, Del1) Del2 - else return I // I is the identity
operation. TddDel3. Del3) I
23An OT example
ABCDE
ABCDE
ABCDE
O2Del2, 2 CD
O1 Ins1, 12
ABE
A12BCDE
ABE
O1T(O1,O2) Ins1, 12
A12BE
O2 T(O2,O1) Del 4, 2CD
A12BE
O3Del2, 2
A1BE
O1T(O1,O2) Ins1, 12
A1BE
A12BE
A1BE
24Multiple Versioning in Collaborative Graphics
Editors
- C. Sun and D. Chen Consistency maintenance
in real-time collaborative graphics editing
systems, ACM Transactions on Computer-Human
Interaction, Vol. 9, No. 1, March 2002, pp. 1-
41.
25An example of operation conflict
Initial state
Initial state
G
G
O1 Move(G,X)
O2 Move(G,Y)
After ex. O2
After ex. O1
G
G
After ex. O2
After ex. O1
G
G
- O1 and O2 are concurrent, and moving the same
object to two different (X ? Y) places. - The final results at the two sites are not
identical.
26Definitions
- Conflict relation ?.
Two operations O1 and O2 are conflicting,
denoted as O1 ? O2, iff - O1 and O2 are independent,
- Target(O1) Target(O2)
- Att.Key (O1) Att.Key(O2) and
- Att.Value(O1) ? Att.Value(O2)
- Compatible relation ?. If O1
and O2 are not conflicting, then they are
compatible, denoted as O1 ? O2.
27Conflict resolution by a null-effect
Initial state
Initial state
G
G
O1 Move(G,X)
O2 Move(G,Y)
After ex. O2
After ex. O1
G
G
After ex. O2
After ex. O1
Reject O1, Undo O2
Reject O2, Undo O1
G
G
- The final result is identical, but does not
preserve the intention of any operation. - Whenever there is a conflict, all work will be
destroyed. - It provides no explicit information about what
other users intended to do, thus decreasing
users ability to understand their conflict and
to adjust their actions accordingly.
28Conflict resolution by a single-operation-effect
Initial state
Initial state
G
G
O1 Move(G,X)
O2 Move(G,Y)
After ex. O2
After ex. O1
G
G
After ex. O2
After ex. O1
Reject O1
G
G
- The final result is identical, but does not
preserve the intention of any operation. - Whenever there is a conflict, only one users
work can be preserved. - Users may not see a consistent picture about what
other users intended to do, and hence they may
not be able to adjust their actions accordingly.
29The Multi-versioning approachConflict
resolution by all-operation-effect
Initial state
Initial state
G
G
O1 Move(G,X)
O2 Move(G,Y)
After ex. O2
After ex. O1
G
G
After ex. O2
After ex. O1
G2
G1
G2
G1
- The final result is identical and preserve the
intention of all operations. - All work can be preserved even in the face of
conflict. - Users are provided with an explicit and
consistent picture about what other users
intended to do, thus they may better assess the
situation and react accordingly. - It is able to support other effects (null/single
operation effect).
30The End