Chapter6:AlgorithmsforP-sequences
Thischapterdiscussesalgorithmsforchange-orientedmanagementofsequences.Wewill
considertheissuefromadatastructureperspective,examiningwaystoretainadatabaseof
changes,andproducetheresultsofapplyingsubsetsofthosechanges.Thischapterproceeds
incrementallytoafullsolution:firstpresentingalgorithmssufficientformanagingchange
setsincludingonlyinsertanddeleteoperations,andthenextendingthemtohandlemove
andcopyoperations.Thefirststagewillbeginwithanexaminationofthealgorithmsfor
VTMLeditors,andthencontinuewithanexaminationofhowtoimplementthemorecom-
plexmodelprovidedbyPalimpsest.VTMLisachange-orienteddataformattohelpsupport
collaborationovertheWorldWideWeb,whichprovidesaninterestingcontrasttoPalimpsest.
6.1 TheVTMLmodel
ThissectiongivesabriefdescriptionofVTML2.0,(theVersionedTextMarkupLanguage)
asystemsupportingchange-orientedconcurrencycontrolforwebapplications.Theinitial
descriptionofVTML(VTML1.0)waspresentedin(VitaliandDurand1995).VTMLisafile
formatfortheinterchangeofmultiplerevisionsofdocuments,andisintendedasabuilding
blockforprotocolsforcollaborationovertheweb.AVTMLdocumentcanrepresentasetof
updatestobeappliedtoanotherVTMLdocument,oritcanbeaself-containedrepresenta-
tionofmultipleversionsofadocument.VTMLisstillhasversionswhichuseapurebranch-
ingscheme.Italsosupportsadditionalchange-orientedfeatures,whichstoreinformation
abouttheindividualinsertionanddeletionoperationsthatmakeupaversion.Versionscan
explicitlyaddin,orremoveparticularchangesthatwerecreatedinotherversions.
Thischapterdiscussesalgorithmsforchange-orientedmanagementofsequences.Wewill
considertheissuefromadatastructureperspective,examiningwaystoretainadatabaseof
changes,andproducetheresultsofapplyingsubsetsofthosechanges.Thischapterproceeds
incrementallytoafullsolution:firstpresentingalgorithmssufficientformanagingchange
setsincludingonlyinsertanddeleteoperations,andthenextendingthemtohandlemove
andcopyoperations.Thefirststagewillbeginwithanexaminationofthealgorithmsfor
VTMLeditors,andthencontinuewithanexaminationofhowtoimplementthemorecom-
plexmodelprovidedbyPalimpsest.VTMLisachange-orienteddataformattohelpsupport
collaborationovertheWorldWideWeb,whichprovidesaninterestingcontrasttoPalimpsest.
6.1 TheVTMLmodel
ThissectiongivesabriefdescriptionofVTML2.0,(theVersionedTextMarkupLanguage)
asystemsupportingchange-orientedconcurrencycontrolforwebapplications.Theinitial
descriptionofVTML(VTML1.0)waspresentedin(VitaliandDurand1995).VTMLisafile
formatfortheinterchangeofmultiplerevisionsofdocuments,andisintendedasabuilding
blockforprotocolsforcollaborationovertheweb.AVTMLdocumentcanrepresentasetof
updatestobeappliedtoanotherVTMLdocument,oritcanbeaself-containedrepresenta-
tionofmultipleversionsofadocument.VTMLisstillhasversionswhichuseapurebranch-
ingscheme.Italsosupportsadditionalchange-orientedfeatures,whichstoreinformation
abouttheindividualinsertionanddeletionoperationsthatmakeupaversion.Versionscan
explicitlyaddin,orremoveparticularchangesthatwerecreatedinotherversions.