简介:Inthispaper,aframeworkispresentedforaddingageneralcommandrecoveryfacilitytouserinterface.Asimplemodelofinteractivesystemisdiscussedandfourmetacommands.UNDO,REDO.SKIPBACK,andSKIPFORWARD,aredefined.Thedouble-linkedlistisusedtoorganizetherecoveryinformationinanaturalwayforeasyimplementation.Applicationsoftheframeworktovariousdemandsofcommandrecoveriesshowthattheuseoftheframeworkisveryeasyandconvenient.
简介:Streamprocessingapplicationscontinuouslyprocesslargeamountsofonlinestreamingdatainrealtimeornearrealtime.Theyhavestrictlatencyconstraints.However,thecontinuousprocessingmakesthemvulnerabletoanyfailures,andtherecoveriesmayslowdowntheentireprocessingpipelineandbreaklatencyconstraints.Theupstreambackupschemeisoneofthemostwidelyappliedfault-tolerantschemesforstreamprocessingsystems.Itintroducescomplexbackupdependenciestotasks,whichincreasesthedifficultyofcontrollingrecoverylatencies.Moreover,whendependenttasksarelocatedonthesameprocessor,theyfailatthesametimeinprocessor-levelfailures,bringingextrarecoverylatenciesthatincreasetheimpactsoffailures.Thispaperstudiestherelationshipbetweenthetaskallocationandtherecoverylatencyofastreamprocessingapplication.Wepresentacorrelatedfailureeffectmodeltodescribetherecoverylatencyofastreamtopologyinprocessor-levelfailuresunderataskallocationplan.Weintroducearecovery-latencyawaretaskallocationproblem(RTAP)thatseekstaskallocationplansforstreamtopologiesthatwillachieveguaranteedrecoverylatencies.WediscussthedifferencebetweenRTAPandclassictaskallocationproblemsandpresentaheuristicalgorithmwithacomputationalcomplexityofO(nlog2n)tosolvetheproblem.Extensiveexperimentswereconductedtoverifythecorrectnessandeffectivenessofourapproach.Itimprovestheresourceusageby15%-20%onaverage.