资源描述:
《应用服务器与web服务器的区别(英文)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、WhatisthedifferencebetweenanapplicationserverandaWebserver?Takingabigstepback,aWebserverservespagesforviewinginaWebbrowser,whileanapplicationserverprovidesmethodsthatclientapplicationscancall.Alittlemoreprecisely,youcansaythat:AWebserverexclusivelyhandlesHTTPre
2、quests,whereasanapplicationserverservesbusinesslogictoapplicationprogramsthroughanynumberofprotocols.Let'sexamineeachinmoredetail.TheWebserverAWebserverhandlestheHTTPprotocol.WhentheWebserverreceivesanHTTPrequest,itrespondswithanHTTPresponse,suchassendingbackan
3、HTMLpage.Toprocessarequest,aWebservermayrespondwithastaticHTMLpageorimage,sendaredirect,ordelegatethedynamicresponsegenerationtosomeotherprogramsuchasCGIscripts,JSPs(JavaServerPages),servlets,ASPs(ActiveServerPages),server-sideJavaScripts,orsomeotherserver-side
4、technology.Whatevertheirpurpose,suchserver-sideprogramsgeneratearesponse,mostofteninHTML,forviewinginaWebbrowser.UnderstandthataWebserver'sdelegationmodelisfairlysimple.WhenarequestcomesintotheWebserver,theWebserversimplypassestherequesttotheprogrambestabletoha
5、ndleit.TheWebserverdoesn'tprovideanyfunctionalitybeyondsimplyprovidinganenvironmentinwhichtheserver-sideprogramcanexecuteandpassbackthegeneratedresponses.Theserver-sideprogramusuallyprovidesforitselfsuchfunctionsastransactionprocessing,databaseconnectivity,andm
6、essaging.WhileaWebservermaynotitselfsupporttransactionsordatabaseconnectionpooling,itmayemployvariousstrategiesforfaulttoleranceandscalabilitysuchasloadbalancing,caching,andclustering—featuresoftentimeserroneouslyassignedasfeaturesreservedonlyforapplicationserv
7、ers.TheapplicationserverAsfortheapplicationserver,accordingtoourdefinition,anapplicationserverexposesbusinesslogictoclientapplicationsthroughvariousprotocols,possiblyincludingHTTP.WhileaWebservermainlydealswithsendingHTMLfordisplayinaWebbrowser,anapplicationser
8、verprovidesaccesstobusinesslogicforusebyclientapplicationprograms.Theapplicationprogramcanusethislogicjustasitwouldcallamethodonanobject(orafunctionintheproceduralworld).Suc