1 distributed transaction system based

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Distrib.Syst.Engng2(1995)5C-64.PrintedintheUKIThedesignandimplementationofa1distributedtransactionsystembasedIonatomicdatatypesZWuts,RJStroudtll,KMoodySTandJBaconl+fDepartmentofComputingScience,UniversityofNewcastleuponTyne,UK$ComputerLaboratory,UniversityofCambridge,UKAbstract.Thecomplexityofpotentialinteractionsamongconcurrentactivitiesandthemultitudeoffailuremodesthatcanoccurindistributedsystemsmakeithardtoreasonaboutdistributedprograms.Transactionsprovidetheprogrammerwithamechanismthatsimplifiesthedevelopmentofconcurrentanddistributedprograms.Inthispaperwepresentthedesignandimplementationofadistributedtransactionsystemthatusesatomicdatatypestoprovidesynchronizationandrkovely.Generallyspeaking,implementinguser-definedatomicdatatypesisadifficulttask.However,unlikeexistingsystems,oursystemrequiresprogrammerstodoverylittleextraworktomakeanobjectatomic.Programmersimplementatomicdatatypesasifforasequentialandreliableenvironmentandspecifytheconcurrentsemanticsofobjectoperationsseparatelyinasmall,butexpressivedeclarativelanguage.Appropriatesynchronizationandrecovelycodeforator$datatypesisgeneratedautomaticallybythesystemaccordingtothisinformation.1.IntroductionDistributedcomputingsystemsarepotentiallymorereliablethancentralizedsystemsbecausetheredundancyandautonomypresentinadistributedcomputingenvironmentpermitsfailurestobemaskedorlocalized.However,thecomplexityofpotentialinteractionsamongconcurrentactivitiesandthemultitudeoffailuremodesthatcanoccurindistributedsystemsmakeithardtoreasonaboutdistributedprograms.Transactionshavebeenexploredasawayofresolvingthisissue.Transactionshelpbyallowingtheprogrammertoviewacomplexpieceofcodeasatomic:itappearstohappeninstantaneously,andithappenseithercompletelyornotatall.Inprinciple,transactionsshouldbeusefulforsimplifyingtheconstructionofreliabledistributedsystems.However,thetraditionaltransactionmodel,asdescribedbyGray[l],wasdesignedprimarilyforunderstandingdatabasemanagementapplicationswherethebasicunitofinformationisthetypedrecordandtheonlyoperationsonrecordsarereadandwrite.Inmoregeneralsystems,informationisrepresentedbyabstractdatatypeswithtype-specificoperations,andforthisreasonmanyresearchershavesuggestedusingatomicdatatypes[Z]toimplementtransactions.Thisapproachfocusesontheshareddataobjectsthatprogrammersuseinconstructingtransactions.$E-mail:Zhixue.Wu@ncl.ac.ukI/E-mail:R.J.Stroud@ncl.ac.uk7E-mail:km@cl.cam.ac.uk+E-mail:jmb@cl.cam.ac.uk.Atomicdatatypesareabstractdatatypesthatalsohavesynchronization&drecoveryproperties.Instancesofatomicdatatypes,calledatomicobjects,areresponsibleforensuringtheirownserializabilityandrecoverability.Ifalloftheshareddataobjectsaccessedbyconcurrenttransactionsareatomic,thenthetransactionscanbemadeserializableandrecoverablewithouttheneedforthetransactionmanagertotakeanyconcurrencycontrolmeasures.Theatomicdatatypeapproachmakesitpossibletopermitgreaterconcurrencyamongactivitiesbyusingtypespecificsemanticsofthesharedobjects.Inaddition,byencapsulatingsynchronizationandrecoverycodeintheimplementationofthesharedobjects,modularitycanbeenhanced.Generallyspeaking,implementingatomicdatatypesisadifficuJttask.Thisisbecauseatomicdatatypesdefinethebehaviourofobjectsinaconcurrentandunreliableenvironment.Thus,inadditiontoimplementingtheoperationsofanormalabstractdatatype,anatomicdatatypealsoneedstoimplementsynchronizationgndrecoveryoperations.Therearethreekindsofapproachestoimplementingatomicdsrtatypes:implicit,explicitandhybrid,accordingtowhetherthesystemortheprogrammerisresponsibleforimplementingthesynchronizationandrecoverycode.Withanimplicitapproach,exceptforspeci@ingtheconcurrentsemanticsofobjectoperations,the,programmerisonlyresponsibleforimplementingthebasicobjectoperationsasifforasequentialreliableenvironmentwithnoconcurrencyorfailure.ThesystemisresponsibleforimpJementingthenecessarysynchronizationandrecoverycodeusingtheknowledgeabouttheobject's0967-1846/95/010050+15$19.5001995TheBritishComputerSociety,TheInstitutionofElectricalEngineersandIOPPublishingLtdDistributedtransactionsbasedonatomictypesPCt+todemonstratethefeasibilityofthisapproach.Theapplicationisconcernedwithmaintainingthedatabaseforanactivebadgesystem.Finally,section6concludesthepaperwithabriefsummaryanddiscussionoffuturework.2.PC++programmingmodelInthissection,wepresentthewayinwhichapplicationprogrammersdefineatomicdatatypesandconstructtransactionsinPCtt.SincePCt+takesanimplicitapproachtoimplementingatomicdatatypes,theonlydifferencebetweendefininganatomicdatatypeanddefininganormalabstractdatatypefromaprogrammer'spointofviewistheneedtospecifytheconcurrentsemantics.ofoperations.Thiswillbethemaintopicdiscussedinthissection.concurrentsemanticsprovidedbytheprogrammer.Withanexplicitapproach,theprogrammerisresponsibleforimplementingboththebasicobjectoperationsandthesynchronizationandrecoverycode.Withahybridapproach,theworkofimplementingthesynchronizationandrecoverycodeissharedbythesystemandtheprogrammer.Thereareanumberofsystemsthatsupporttransactionsusingatomicdatatypes.ExamplesincludeArgus[Z],

1 / 15
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功