Delivering Promises for Web Service Applications

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

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

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

资源描述

SchoolofITTechnicalReportDELIVERINGPROMISESFORWEBSERVICESAPPLICATIONSTECHNICALREPORT605JULIANJANGCSIROICTCENTREALANFEKETE,PAULGREENFIELDSCHOOLOFIT,THEUNIVERSITYOFSYDNEYDECEMBER,2006DeliveringPromisesforWebServicesApplicationsJulianJangCSIROICTCentrePOBox76EppingNSW1710Australia+61293724658julian.jang@csiro.auAlanFeketeSchoolofInformationTechnologiesUniversityofSydneyNSW2006Australia+61293514287fekete@it.usyd.edu.auPaulGreenfieldSchoolofInformationTechnologiesUniversityofSydneyNSW2006Australia+61295604952p.greenfield@computer.orgABSTRACTOneofthemanyproblemsfacingthedesignerofcomplexmulti-participantWebservices-basedapplicationsisdealingwiththeconsequencesofthelackofsuitableisolationmechanisms.Thisdeficiencymeansthatconcurrentapplicationscaninterferewitheachother,resultinginraceconditionsandlostupdates.Thispaperbrieflydiscussesaproposedsolutiontothisproblembasedon‘promises’andshowthatthispromisesmodelcanbeimplementedinpractice.Wediscusssomeoftheimplementationissuesthatneedtoberesolvedinpromise-basedsystemsanddiscusshowwebuiltaproof-of-conceptprototypeofaPromiseManagerthatsupportedpromise-basedisolationwithoutrequiringchangestoexistingapplicationsandresources.1.INTRODUCTIONTheWebservicesmodelhasdeveloperscreatingbusinessapplicationsbyputtingtogetherautonomousandopaquebuildingblockscalledservices.Theseservicesinteractwitheachotherbyexchangingrequestandresponsemessages.Theseinteractionscanextendoveraconsiderableperiodoftime,especiallywhentheseapplicationsareimplementinglong-runningbusinessprocesses.Amajordifficultyfacedbythedesignersofsuchapplicationsismaintainingtheintegrityofthedistributedinformationthatmakesupthestateofthesystem.Thetraditionalmechanismusedtoensureconsistencyandintegrityinintra-enterpriseapplicationsisdistributedACIDtransactions.Thismechanismisfoundedonassumptionsoftimelinessandtrust,andsoisnotsuitableforensuringtheintegrityoflong-runningbusinessprocessescomposedfromautonomous,semi-trustingservices.Astraditionaldistributedtransactionscannotbeused,applicationdesignersneedtofindotherwaystodealwiththeproblemscausedbythelackofisolationbetweenconcurrentbusinessprocesses,suchasraceconditionsandlostupdates.Inthispaper,wediscusstheWebengineeringsupportneededforonerecentlyproposedapproach,called‘Promises’[8]thatletsapplicationdesignersavoidtheproblemscausedbyisolationfailures.The“Promises”conceptisconcernedwiththoseserviceswherethesuccessorfailureofanexportedoperationisdependentontheinternalstateofthatservice.Forexample,inahotelbookingservice,theoutcomeofarequesttobookagivenroomonaparticulardatedependsontheavailabilityoftheroom,andthisavailabilityinformationisrepresentedbystateheldwithinthehotelbookingservice.Suchaservicewilltypicallyalsoprovidequeryoperationswhichprovidetheclientwithinformationaboutspecifiedaspectsoftheinternalstateoftheservice.Forexample,ourhotelbookingservicemightsupportaCheckAvailabilityoperationthatwillsaywhetheragivenroomisavailableonaspecifieddate.However,withoutadditionalsupport,aclientC1cannotassumethatapositiveresultfromCheckAvailabilitymeansthatafollowingBookRoomrequestwillalwayssucceed.SomeotherclientcouldhavebookedtheroomafterC1wastoldthattheroomwasavailableandbeforethearrivalofC1’srequesttobookit.ThistypeofisolationfailurecannothappenintraditionaltransactionaldatabaseapplicationsbecauseC1canrunboththequeryandbookingoperationswithinasingletransaction.ThelocksobtainedontheroomrecordduringthequeryoperationensurethatC1hassolerightstoupdatetheavailabilityofthisroom,andtheserightswillpersistuntilC1endsthetransaction.Theproblemwiththissolutionisthatitisbasedonlocks,andlocksareonlyfeasiblewhenitcanbeguaranteedthatclientswillalwaysreleasethemfairlyquickly;andthisisnotaguaranteethatcanbegivenwithuntrustedclientsandlong-runningbusinessprocesses.Thetraditionalbusinessworldhaslongknownaboutandusedapproachesthatcanpreventsuchisolationproblems,withouttheriskstoautonomyandavailabilitythatwouldcomefromusingtraditionalACIDtransactions.Evencommonbusinessprocesses,suchasquotationsandreservations,canbeseenassolutionstoisolationproblems.Theseprocessesaresometimesimplementedusingtechniques,suchas‘softlocks’,whichuseshortdurationsystem-enforcedtransactionlockstoobtainlongerbutfixeddurationapplication-enforcedallocationmarkersoveraspecificresource.Thesetechniquescanpreventotherclientsallocatinganalready-committedresource,but,unlikeastandardlock,resourceallocationscanbeobservedandhavealimitedduration.Severalresearchershaverecentlyputforwardabstractionsthatgeneralisethesetechniques,allowingtheconstructionofservice-basedsystemsinwhichaclientcanensurethataresourceremainsavailableafteravailabilityhasbeenchecked,withoutthedisadvantagesthatcomefromtheuseoflocks.IntheGridComputingcommunity,‘Options’havebeenproposed[5].IntheWebservicesspace,‘Promises’allowaservertoofferassurancestoaclientabouttheavailabilityofresourcesandtheserver’sabilitytosatisfyarbitrarypredicates[8].Sofar,however,theseproposalsareconceptual;wearenotawareofanypublicationthatshowshowtoengineeraservicetosupporttheseabstractions.Themainco

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

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

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

×
保存成功