65
bility(andpreservationoftherangeconcept)isgainedwheninsertionoperationsare
propagatedasfullyaspossible.
3.3.3 Range/rangeconflicts
Incaseswheretwoaffectedregionsoverlap,thesignificantquestionishowtoorderthe
effectsonthetworespectiveranges.Thereareseveralsignificantcases:
1. Oneofthechangesisadeletionoperation.Regardlessofwhattheotheroperationis,
thedeletionshouldtakepriority.Inthecaseoftwodeletionoperations,bothcan
takeeffectwithoutconflict.
2. Bothchangesarecopyoperations.Inthiscasetheycantakeeffectwithoutconflict,
justasinthedeletioncase.
3. Oneorbothchangesaremoveoperations.Inthiscomplexcase,theconflictishard
toresolve.Itispossibletoallowbothchangestotakesimultaneouseffect,ortoor-
derthemwithrespecttooneanother.
Casesoneandtworeallyneednofurtherdiscussion,butcasethreehasanumberof
pointsofinterest.Thefirstresolutionpossibilitytoconsiderissimultaneouseffect.For
move/copy,thisisquitereasonable.Thisisessentiallythesameasorderingthemovebefore
thecopy;thecopywillseetheresultsofthemove,becauseofthemove’sdeletionofits
sourcerange.Foramove/moveconflict,theresultsarenotsointuitive:whateverregionis
sharedbythetwomoveoperationswillbedeletedforbothofthem.Thiscounterintuitive
result(thatconflictingmoveoperationscandeletedata)makesthisabadsolution.
Ifthetwochangesneedtobeorderedwithrespecttoeachother,thereareavarietyof
possiblesolutions(anymethodofcreatingatotalorderonchangeswilldo).Themostobvi-
ousmethodtoconsideristemporalordering.Whilethisisprobablygoodinsomereal-time
situations,theworkrequiredtocalculatetemporalorderinginadistributedsystemissig-
nificant,andafallbackmethodmustbeinplacefortheunlikelyeventthattwochanges
weremadeatpreciselythesametime.Sinceitishardtodetermineinadistributedsystem,
66
thatoptionisnotnecessarilypractical,andinanycase,formostoff-lineeditingsituations
thevariationinmergeeffectsisunlikelytobefunctional.Forexample,considertwocol-
laboratorsmergingchangesseparatelypreparedoveraweekofdisconnectedoperation:the
precisetimeaneditwascreatedisalmostsuretobeirrelevant.
Asecondmethodissimplytoorderthechangesinsomepurelyarbitraryway.Lexico-
graphicallyorderingthechangesbasedonsomewell-knownrepresentationprovidesasim-
ple,easilydistributedwaytodeterminetheorderingoftwochanges.
Whilebothoftheforegoingarepossible,andhavetheirpotentialadvantages,wewillbe
choosingadifferentordering,basedonthestructureofthesequenceinquestion.Wewill
orderchangeswithrespecttoeachotherbasedontheirpositionwithinthesequenceitself.
Thekeyistoconsidertheinteractionofmoveoperationsthatoverlap.Inthecasethattwo
movesourceregionsintersect,butneitheriscompletelycontainedintheother,anyorder-
ingisasgoodasanyother.However,ifonesourceregioniscompletelycontainedinthe
other,thentheinnerregionshouldhavepriority.Thisisimportant,becausethecontaining
regionwouldconvertmoveofthecontainedregionintoaNOPbyclaimingallofitscontent.
Thebestsolutionisonewhere“smaller”operationstakepriorityandcanbefreelycombined
withlargerones.
3.3.4 Globalconflicts
Theglobalconflictsarethosethatinvolvecyclicrelationshipsbetweentheregionsofef-
fectofasetofchanges,sothataconflictexistsonlywhentheentiresetofchangesiscon-
sidered,buttheremovalofevenoneoftheconstituentchangeswouldeliminatethecon-
flict,bybreakingthecycle.Itissimplesttoconsiderthedegeneratecase,asinglechange
(eitheracopyoradelete)whosedestinationregionisinsideitssourceregion.(SeeFigure).
Inthecaseofacopy,wegetaninfinitedocumentifweattempttohonorthegeneralpolicy
ofhavingthesourceregionreflectallupdateswithinit.Inthecaseofamove,weendup
Previous Page Next Page