您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > PHP和JSP作为服务器脚本语言的性能比较-外文翻译
毕业设计(论文)英文翻译课题名称系部专业班级学号姓名指导教师2017年4月14日1PerformanceComparisonofPHPandJSPasServer-SideScriptingLanguagesMaterialSource:NotesinComputerScienceAuthor:ScottTrent;MichiakiTatsubori;ToyotaroSuzumura;AkihikoTozawaandTamiyaOnodera1IntroductionThedynamicscriptinglanguagePHP(PHPHypertextPreprocessor)hasbecomeenormouslypopularforimplementinglightweightwebapplications,andiswidelyusedtoaccessdatabasesandothermiddleware.ApachemodulepopularitysurveysperformedbySecuritySpaceinOctober2007indicatethat37%ofApacheservershavePHPsupportenabled,makingitthemostpopularApachemoduleby10percentagepoints.BusinessesarequicklyrealizingthepowerfulcombinationofaserviceorientedarchitectureenvironmentwithdynamicscriptinglanguageslikePHP.However,webelievethattherearestillcriticalperformanceissuesinvolvingPHPwhichremaintobeinvestigated.Thispaperfocusesontheuseofdynamicscriptinglanguagestoimplementwebserverfront-endinterfaces.ThiscorrespondswiththewaythattheindustrystandardwebserverperformancebenchmarkSPECweb2005utilizesPHPandJSP(JavaServerPages).Inthiscase,scriptsareusedfortheimplementationofdynamicpagegeneration,ratherthantherealizationofcomplexbusinesslogic.ThiscontrastswiththetraditionalusesofcomplexJSP-basedbusinesslogicimplementation.Whiletherearenumerousstudiesondynamicwebcontent,thispapercomplementsthesestudieswithdetailedanalysisfocusingonPHP.Forexample,followingtheperformancestudyonCGI(CommonGatewayInterface)basedwebserversfordynamiccontentbyYeager&McGrathbackin1995,researchersandpractitionershavebeenexaminingtheperformanceofmorerecentdynamicWebcontentgenerationtechnologies.Theseworks,however,handleapplicationscenarioswhereservletfront-endsimplementrelativelycomplexbusinesslogic.AlthoughWarnerandWorleydiscusstheimportanceofalsousingPHPwithSPECweb2005,tothebestoftheauthor’sknowledge,thispaperisthefirsttopublishadetailedanalysisofSPECweb2005experimentalresultsusingbothPHPandJSP.ThedetailedanalysisofPHPandJSPperformancebasedonSPECweb2005offeredbythispaperenablesdesignersandimplementersofwebserverstounderstandtherelativeperformanceandthroughputofdifferentversionsandconfigurationsofPHPandJSP.22Multi-tierWebServerArchitecture:LightweightFront-EndUsingPHP/JSPDeveloperstypicallyusePHPtoimplementafront-endinterfacetodynamicWebcontentgenerators,whicharecombinedwithwebserversoftwareandback-endserverstoprovidedynamiccontent.Thewebserverdirectlyhandlesrequestsforstaticcontentandforwardsrequestsfordynamiccontenttothedynamiccontentgenerator.Thedynamiccontentgenerator,supportedbyback-endservers,executescodewhichrealizesthebusinesslogicofawebsiteandstoresdynamicstate.Back-endserversmaybeimplementedasastraight-forwarddatabase,ormaybemorecomplexservershandlingthebusinesslogicofthewebsite.Thefront-endimplementationmayvaryfromheavy-weightbusinesslogichandlerstolightweightclientscomposingcontentreceivedfromback-endservers.Thispaperfocusesonmulti-tierwebsitedevelopmentscenariosutilizingsuchlightweightfront-ends,supportedbyoneormorelayersofheavy-weightback-ends.ThisassumptionisreasonablewhenconsideringService-OrientedenvironmentswherePHPscriptsareusedtoimplementamash-upofservicesprovidedelsewhere,inadditiontothecaseofsimplewebsitessuchasbulletinboardswherePHPscriptsarejustawrappertoadatabase.Withinthescenariosdescribedinthispaper,thedynamiccontentgeneratorprovidesclientimplementationinadditiontopagecomposition.Itconnectstotheback-endserverthroughanetworkusingeitherstandardprotocolssuchasHTTPorapplication/middleware-specificprotocols.JSPtechnologycanbeconsideredanalternativetoPHPinimplementingsuchfront-ends.WhileitispartoftheJavaServletframework,developerstypicallyuseJSPtoimplementlightweightfront-ends.BothPHPandJSPallowdeveloperstowriteHTMLembeddedcode.Infact,althoughtherearelanguageinherentdifferencesbetweenPHPandJava,theuseofPHPscriptsandJSPfilescanbeverysimilar.Theobjectiveoftheexperimentsdetailedinthispaperistomeasuretheperformanceoflightweightfront-enddynamiccontentgenerationwritteninPHPandJSPwithpopularwebserverssuchasApacheandLighttpd.ThiswebserverarchitecturescenarioinvolvesuserswhoaccessawebserverwithpageswritteninplainstaticHTML,aswellasJSPandPHPscriptswhichmixscriptinglanguagewithHTMLcode.Theconfigurationassumedwithinthepaperisatypicalone,wherewebserversoftware,suchasApache,distinguishesbetweenpureHTML,JSP,andPHPrespectivelywithsuffixessuchas.html,.jsp,and.php.HTMLcodeisdirectlyreturnedtotherequestingend-user’swebbrowser,whereJSPandPHPpages3arerespectivelyparsedbytheTomcatscriptengineandthePHPruntimeenginewhichbothprovidepureHTMLwhichisforwardedtotheend-useronaremotesystem.AcommonpointbetweenJSPandPHPisthatimplementationswhichperformwellhaveadynamicallycompiledandcachedbytecode.Forexample,theJavaruntimeusedbytheTomcatscriptenginewhichweusedperformsmuchbetterwhentheJust-in-Time(JIT)compilerisenabledtocreateefficientcachednativeruntimecode.Similarly,theZendPHPruntimeweusedalsoperformssignificantlybetterwhentheAlternativePHPCache(APC)isenabled,inwhichAPCstoresPHPbytecodescompiledfromthescriptsourcecodeinsharedmemoryforfuturereuse.3LanguageRuntimePer
本文标题:PHP和JSP作为服务器脚本语言的性能比较-外文翻译
链接地址:https://www.777doc.com/doc-5626332 .html