83
Definition4.1:Eachaddressisatuple(p, i)wherepisachangepath,iisanonnegative
integerand:
1. Achangepath,pisa(possiblyempty)sequenceofchangeIDsI
1 …I
n ,.
2. ThelastchangeID,I
n (ifpisnonempty)denotesaninsertion,
3. Theindexiisintheinterval0…NwhereNisthelengthofthesequenceinsertedby
changeI
n .Thisdenotesapositioninthesequenceofitemsinsertedbytheinsertion
withIDI
n .
4. NoIDmayoccurmorethanonceinthechangepathp.
5. Thereisonlyonelegaladdresswithanullchangepath,anditmusthaveanindexof
0.Thisspecialaddress,((), 0),isreferredtoasnil.
6. EachIDinthechangepath,I
1 …I
n–1 ,mustdesignatemoveorcopyoperations.(We
willdiscusstheeffectoftheseontheorderingofaddressesinSection4.3.2).
Theintentionbehindthisaddressingsystemisasfollows:
Thefirstoperationmadeinanydocumentmustbeaninsertionwhosetargetisthespe-
cialaddressnil.
Aninsertiondefinesanaddressforeachinter-itemgapinthesequencethatitinserts,
includingthepositionsbeforethefirstelement(0),andafterthelastelement(N).
Addressesatthedestinationofoneormorecopyandmoveoperationsareidentifiedby
thelocationwhereaninitialinsertionoccurred.Theotherelementsinthepathrepre-
sentsuccessivemoveorcopychangesthataffectedtheoriginaladdress.
Thesetofaddressesisfinite,anddoesnotcontainanyaddressesthatwouldrepresent
causal“loops”,forinstancetheresultsofamoveappliedtoitsowndestination.
Thus,dataisalwaysidentifiedbyreferencetotheoriginalinsertionthatcreatedit,re-
gardlessofwhatotherchangesmayaffectthatdata.Thesamecontentsmayhavemorethan
84
oneaddress—eachonecorrespondingtoalocationtowhichthatdatawascopiedormoved.
Deletionsarenotexplicitlymentionedhere,becausetheirIDsneverappearinaddresses.
InworkingwithaddressesthefunctionIdsprovesuseful.Foranaddressp = (I
1 …I
n-1 ,i)
wehavethefollowing:
Ids(p) = {I
j | 1 < j < n}.
4.2.3 Consistentchangesetsandcausalordering
ThesetoflegaladdressesinaPalimpsestsequenceandthetotalordertheytakeinthe
resultingsequencearedefinedbyasetofchanges.However,noteverysetofchangeswill
produceawell-orderedsetofaddresses.Asetofchangesmustsatisfycertainminimalcondi-
tions,whichturnouttohaveanaturalrelationshiptothenotionofcausalorderingof
changes.Theusualnotionofcausalorderingwasfirstdefinedin(Lamport1978),inthecon-
textofdestructivedatabaseupdates.Lamport’scausalorderingwasapartialorderonopera-
tions,inwhichanoperationprecededanotheroperationifitoccurredearlierandaffected
thesamelocation.Lamport’sorderingrelaxedtheconstraintsoftotaltemporalorderingby
recognizingthatnon-interferingoperationsneednotbeorderedwithrespecttoeachother.
Palimpsestneedsasimilarnotion(apartialorderonoperations,derivedfrombutmore
relaxedthanatemporalorder).WhilePalimpsestdoesnothavethesamekindsofconflicts
betweenchanges,itdoeshaveaddressingdependenciesbetweenchanges.Inasystem,Pal-
impsestchangeswillbecreatedeverytimethatauserperformsanewoperation,andthose
changesmustreferencePalimpsestaddresses.Some(likemove,copy,andinsert)willcreate
newaddresses.However,therearesignificantrestrictionsontherelationsofthesechanges
totheaddressestheyuse,becausethechangesmustbecreatedinsometemporalorder,and
becauseeachaddressisconstructedfromtheIDsofpreviouslyconstructedchanges.Thecriti-
calobservationisthattheaddressesreferencedbyachangeshouldalreadyexistatthetime
thatchangeiscreated.
Previous Page Next Page