Assignment

Consider a datatype that supports explicit assignment to variables of that type. Obviously concurrent assignments of different values to a variable conflict and there is nothing that can be done about that.

In other words, it isn't possible to preserve the intentions of all assignment operations under Operational Transformation. But the intentions of all assignment operations aren’t supposed to be preserved anyway, even for a single user! For example consider that a variable is assigned the value 3, then later the same user assigns it the value 4. Evidently the intention of the first assignment hasn't been preserved after applying the second assignment.

Assignment operations are lossy in the sense that the result of many assignment operations to a variable only contains the value of one of the assignments, all the other assignments have no affect on the result. This can be quantified in terms of the information content. A billion assignment operations requires gigabytes to record, and yet the aggregate (left fold over the operations) might be a 32 bit integer.

Since assignment by its very nature is lossy it's reasonable for merging to be lossy as well. Assignment only tends to be used for simple datatypes that are edited using GUI controls that generate assignment operations with minimal effort from the user.

For example, this is the case when a value is edited using a slider

Another example is in the CEDA jigsaw demo application - moving a jigsaw piece with the mouse generates assignment operations.

Similarly consider a slider control which causes assignment operations on a variable to be generated (perhaps at about 50 per second) as the slider is dragged. It can be expensive to record all the operations.

Yet the value of the variable may only be a few bytes:


int x;

// Generate operation
x = 3;

By contrast it wouldn’t normally be reasonable to use assignment on a datatype that records a value with high information content, that is very time consuming to edit (like a CAD drawing or a text document).

Under merging this would arbitrarily keep the edits from one user and drop everyone else’s contribution. Users don't appreciate lossy assignments on data types that take a long time to edit.


CadDrawing c;

// Generate operation
c = <some value>;

In any case, input devices like the mouse and keyboard cannot generate high information assignment operations in the first place.

As a result of symmetry the system needs to pick one of the assignments on a rather adhoc basis. The total ordering on site identifiers is used to pick a unique “winner” amongst concurrent conflicting assignments.

This winning assignment dominates all concurrent and causally preceding assignments. The total ordering on the site identifiers can be seen as an imposed ordering on the concurrent assignments, where all the “loser” assignments are deemed to have been applied before the “winner” assignment.

The lossy characteristic of assignment operations is an important consideration in their use.