• No se han encontrado resultados

PRIMEROS PRINCIPIOS DE LA RAZÓN PRÁCTICA FIRST PRINCIPLES OF PRACTICAL REASON (FPPR)

Sun et al. [137] presented a consistency model, which has been widely accepted as a theoretical framework for consistency maintenance in real-time collaborative editing with replicated architecture. In this framework, consistency is maintained if the following properties have been preserved:

• Convergence: when the same set of operations have been executed at all sites, all replicas of the shared document are identical.

• Causality Preservation: operations are always performed in their natural cause- effect order at all sites despite nondeterministic communication latencies. • Intention Preservation: for any operation O, the effects of executing O at all

sites are the same as the execution effect by applyingO on the document state from which O was generated, and the effects of executing O does not change the effects of concurrent operations.

In essence, theconvergenceproperty ensures the consistency of the final results at the endof a collaborative editing session; thecausality-preservation property ensures the consistency of the execution orders of causally ordered operations during a col- laborative editing session; and the intention-preservation property ensures that the effects of executing an operation at remote sites achieve the same effect as executing this operation at the local site at the time of its generation, and that the execution effects of concurrent operations do not interfere with each other. The consistency

model imposes an execution order constraint on causally ordered operations only, but leaves it open for execution order of concurrent operations as long as the conver- gence and intention-preservation properties are maintained. The consistency model effectively specifies, on the one hand, what assurance a collaborative editing system promises to its users, on the other hand, what properties the underlining consistency maintenance techniques must support.

Causal ordering by means of timestamping [52, 78, 107] is a well-known technique for causality preservation, which relies on a timestamping scheme based on a data structure called State Vector [46, 137] to capture the causal relationships among operations. The causal ordering relation between two operations is defined in terms of their generation and execution sequences [78, 137].

Definition 1.1. Causal ordering relation “→”

Given two operations Oa and Ob generated at sites i and j, then Oa is causally

before Ob, denoted as Oa →Ob, iff:

1. i =j and the generation of Oa happened before the generation of Ob, or

2. i6=j and the execution ofOa at sitej happened beforethe generation ofOb, or

3. there exists an operation Ox such that Oa → Ox and Ox → Ob.

In this approach, local operations can be executed immediately after their gen- eration, so responsiveness is good. But some remote operations that arrive out of causal order are selectively delayed until all causally preceding operations have been executed in order to ensure that operations are always performed in their natural cause-effect order at all collaborating sites despite of nondeterministic network com- munication latencies [46, 137]. Another commonly used technique is to use a central

propagatorto relay all operations generated from collaborating sites [134], if commu- nication channels between the central propagatorand collaborating sites are reliable and order-preserving. The causal ordering approach can achieve causality preserva- tion only, but it does not address the problems of divergence and intention violation.

24

Convergence can be achieved by various concurrency control techniques, which can be divided into two categories: pessimistic concurrency control that prevents di- vergence from occurring and optimistic concurrency control that allows divergence to occur but provides mechanisms to resolve it. Turn-taking is a pessimistic concur- rency control technique in which participants take turns to manipulate the shared data and only one participant at a time has the floor to operate [79, 63]. Since there is only a single active user at any instant of time, all three consistency properties can be preserved but at the cost of not supporting concurrent editing. Consequently, this approach is limited to just situations where having a single active participant fits the dynamics of the session [46], and ill-suited to application environments where the nature of collaboration is characterized by concurrent streams of activities from multiple users [38]. Turn-taking has been adopted in several real-time collaborative editing systems such as GroupKit [114].

Locking is another pessimistic concurrency control technique, where an object (e.g., a word, a line, or a section, etc.) is first locked before it is going to be updated. This way, only one user at a time is able to update a object, which can prevent multiple users from generating conflicting editing operations over the same object [86, 130]. However, unless the granularity of locking is the whole document (thus resorting to the turn-taking protocol), none of the three consistency properties can be ensured by locking since the occurrence of those inconsistency problems is independent of whether or not editing operations refer to the same object [137]. Moreover, locking increases response time due to the overhead of requesting and releasing locks in distributed environments.

Serialization exploits a global time ordering defined for operations, where oper- ations may be generated concurrently but the execution effects will be the same as if all operations were executed in the same total order [137] at all sites. This can be achieved either by pessimistically delaying the execution of an operation until

all totally preceding operations have been executed [78], or optimistically execut- ing operations upon their arrival or generation without regard to their ordering, but using a repairing technique such as undo/redo to repair out-of-order execution ef- fects [74, 63]. Serialization can solve the problem of divergence, but has the following problems: first, the intention violation problem cannot be solved by serializing con- current operation in any order. We will have an example in the following section. Second, the causality violation problem remains unsolved if operations are executed upon their arrival in the optimistic case, or if the total ordering is inconsistent with the causal ordering in the pessimistic case [137]. Third, responsiveness may not be good if operations are not executed immediately after their generation in the pes- simistic case. Finally, there is an unpleasant possibility that an operation will appear on the user’s screen and later disappear as the result of the undo in the optimistic case [46, 128]. Optimistic serialization based protocols have been adopted in several real-time collaborative editing systems such as Prospero[39] and Groove [95].

Operational transformation [46, 136] is an innovative optimistic concurrency con- trol technique for both intention preservation and convergence without imposing any restrictions on users’ activities. In this technique, local operations are executed im- mediately after their generation, therefore local response is good. Remote operations may need to be transformed before their execution so that the execution of the same set of properly transformed operations in different orders could produce identical document states [46]. Operational transformation is often combined with the causal ordering approach to achieve all three consistency properties. Operational transfor- mation approach has been adopted in several real-time collaborative editing systems such as GROVE [47], REDUCE [137], JAMM[6], and Hydra[49].

26