47
DynamicOperationeffectsdependessentiallyonthestatetowhichtheyareapplied,and
thusdependonwhatotheroperationsareinthehistory.Forinstance,amoveoperationin-
sertsdatadeterminedbythecontentsofanothersubsequence,thesourceofthemove,
whichmaywellbeaffectedbyotheroperations.Thismeansthatdynamicoperationsmay
havecomplexinteractions,especiallywhenhistoriesaresubjectedtooperationssuchas
mergeandundothatcancreatenon-serializablehistories.
Ingeneral,systemshavenotmadeacleardistinctionbetweenthesetypesofoperational
definition.Designersofsourcecodecontrolsystems,andengineeringanddesignsystems
(Katz1990)havegenerallybeeninterestedonlyinversion-completenessandhavenotcon-
sidereddynamicoperationsatall.Operationaltransformationandothercollaborativesys-
tems,sincetheyhavetodefineworkableautomaticmergepolicies,haveoftenaddressed
somelevelofdynamismintheiroperationtypes.Theneedfordynamismisusuallytreated
asaproblemofpreservingtheintentofaneditingoperation.Theemphasisoninsertand
deletehasmeant,however,thatthelevelofdynamismaccommodatedislimitedtothede-
terminationofcorrectlocationsinthesequence.Forsuchsimpleoperations,thedistinction
betweendynamicandstaticoperationsisnotveryrelevant.
Whilethedynamic/staticdistinctionisclear,anadditionalaspectmaynotbeinstantly
obvious.Foreachpossibledynamicoperation,thereisacorrespondingstaticoperationthat
representsa“frozen”formofthedynamicoperation.Forexample,considerthesimplecase
oftwoauthorsasynchronouslycollaboratingonasingledocument.IfauthorAmakesa
changeintheformofadynamicmoveoperationthatmovesaphrasefromoneplacetoan-
other,thiswillhaveoneeffectwhenauthorAexecutesit.Ifatalaterpointthesource
phraseisupdated,saybymergingchangesfromauthorBthatinterpolatenewmaterialinto
thesourceofthemoveoperation,thenthefinalresultwillbedifferentbecausethetext
movedwillbedifferent.Ontheotherhand,afrozenmoveoperationwouldberepresentedin
termsofitsconcreteeffectsasexecutedbyauthorA.InthiscaseauthorB’s changewouldbe
48
lost,andtheeffectofthemovewouldbeequivalenttothedeletionoftheoriginalsource
text(includingauthorB’s interpolation)andtheinsertionofthetextthatwasvisibleto
authorAatthetimethesystemrecordedhereditingchange.Alternatively,theresultmight
betheinsertionofauthorB’sinterpolationinthe gapleftbyauthorA’smove;thiswould
makelittlesenseineitherscenario,sinceB’sinsertionisunlikelytomakesensewithoutthe
itemsthatwereadjacenttoitatitstimeofinsertion.
Figure2.1showsseveralversionsofasentence.VersionAistheoriginalsentence.Two
collaboratorsreviseittoversionsBandC(makingsomedeletionsandadditions,andmoving
thestring“earrangement”).Ifthemoveisadynamicoperationtheresultofmergingthese
editsisasshowninE.Ifthemoveoperationisastaticone,theresultisjustB.Theaddition
oftheword“extending”isdeletedbythemoveoperation,andcannotberetrievedinany
versionthatincludesthemove.Allowinganinsertiontobevisibleifitiscoveredbyamove
operationgivestheresultD.
A.Inwritinganawkwardsentence,rearrangingitishelpful.
B.Rearranginganawkwardsentenceishelpful.
C.Inwritinganawkwardsentence,rearrangingandextendingitishelpful.
D.Rearranginganawkwardsentenceandextendingishelpful.
E.Rearrangingandextendinganawkwardsentenceishelpful.
F F F F iii ig g g gu u u ur r r re e e e 2222....1111:::: AAAA sssseeeennnntttteeeennnncccceeee,,,, ttttwwwwoooo eeeeddddiiiittttssss ttttoooo iiiitttt,,,, aaaannnndddd ttttwwwwoooo mmmmeeeerrrrggggeeee rrrreeeessssuuuullllttttssss
Frozenoperationsaresometimespreferabletodynamicones,sincetheireffectsarecom-
pletelypredictable,nomatterwhathistorytheyarepresentin;otherchangesinahistory
willnotmodifytheireffects.Ontheotherhand,astheexampleshows,changepropagation
canbetremendouslyusefulinpreservingtheintentionofanoperation.Dynamicchanges
canavoidthelossofpotentiallyimportanteditingoperationsandavoidtheneedtodis-
cover,re-create,andre-executethemduringamergeprocess.Dynamismisalsomucheasier
Previous Page Next Page