62
T T T Ta a a ab b b b lll le e e e 3333....2222:::: Conflict matrix for Palimpsest operations
3.3.1 Point/pointconflicts(foralloperations)
Thisisthesimplestsortofconflict,sincetheoperations’effectsonpointsareallessen-
tiallyinterchangeable;alloperationsthataffectpointlocationsinsertdataatthem,sothis
conflictisthesameforanypairofoperations.Thereareessentiallythreepossiblesolutions
tomergingmultipleattemptstoinsertatthesameplace.
Disallowthecombination.Thisisthemostdrasticpossibility,andonethatwereserve
forapplication-specificpolicy.Ingeneral,thisoptionisavailableforallconflicts,andwe
assumethatanysystemusingPalimpsestoperationalsemanticswillallowapplicationsto
defineconditionstodetermineifaconflictshouldberegardedasthisdrasticaconsis-
tencyproblem.Ourgoalistodefinethebestpossibledefaultresolution,forapplications
thatdonotrequiresuchrigidconsistencyguarantees.Therefore,Iwillnotmentionthis
optionexplicitlyagainforanyoftheconflictcasesdiscussed.
Relaxthestrictorderingconditiononsequences.Thischangesthedefinitionofsequence
sothatapositioninthesequencecouldholdasetofvalues,ratherthanjustasingle
value.Userresolutionofsuchconflictswouldthenrequiresomeadditionaloperation
thatwouldallowtherelativeorderingoftwoidenticalpointstobespecified.Whilethis
Insert Delete Move Copy
Insert Point/Point
Delete Point/Range Range/Range
Move Point/Point
Point/Range
Point/Range
Range/Range
Point/Point
Point/Range
Range/Range
Copy Point/Point
Point/Range
Range/Range
Point/Point
Point/Range
Range/Range
Point/Point
Point/Range
Range/Range
Point/Point
Point/Range
Range/Range
63
possibilityisworkable,itmakesthedefinitionofthebasicdatastructuremuchmore
complicated,andpresentsadifficultuser-interfaceproblem.Howshouldaprogramindi-
catethatsomenumberofsequentialitems(substringsinatext,forinstance)areinfact
unorderedwithrespecttoeachother?Thisoptionrespectsexactlytheinformation
available,butcomplicatestheapplicationdatamodelseverely,byallowingsequences
thatarenon-sequential,atleastinpart.
Usesomearbitraryorderingtoresolvetheconflict.Thisoptioncanbeimplementedas
longassometotalorderrelationbetweenchangescanbefound.Thiscouldbebasedon
timestamps,inareal-timecollaborationsituation,possiblysupplementedbyoneofthe
manyheuristicsforchoosinguniqueIds.Forinstance,theycouldbelexicographically
orderedaccordingtoawell-definedbinaryrepresentation.Becausesucharepresentation
islikelytobeverylong,acryptographichashofitwouldserveaswell.Whileahashal-
gorithmlikeMD5(Rivest1992)canprovideonlyaprobabilisticguaranteeofuniqueness,
inpracticetheprobabilityoffailureisvanishinglysmall.
Thisisnottheonlytimewewillusesomerelativelyarbitraryorderingtoresolveacon-
flict.Wheneverthishappensthereisonlyonestrongrequirement.Theorderingchosenmust
becalculablebyaprogramgivennootherinformationthanthetwochangesinconflict.In
thecaseofconflictinginsertionpoints,thestrategyofusinguniqueIdsmeetsthisrequire-
ment,butdoesimposeanadditionalrequirementonanyimplementation:thatastrategybe
chosenandimplementedtoreliablydeterminesuchIdsatnon-communicatingsites.
3.3.2 Point/rangeconflicts(foralloperations)
Sincepointoperationsalwaysinsertdataatthepoint,therearetwobasiccasestocon-
sider,dependingonwhetherthecontentsoftherangearetobedeleted(asbymoveand
delete),orduplicatedelsewhere(asbycopyandmove).Inthecaseofarangethatisbeing
deleted,thereisonlyonegoodchoice,outoftwopossibilities:thedatainsertedatthe
pointshouldbeignored,sincethedeletionhasremovedthecontextaroundthepoint.Al-
Previous Page Next Page