嵌入式系统的网络服务器外文翻译中英文翻译外文文献翻译.docx
- 文档编号:3582778
- 上传时间:2022-11-24
- 格式:DOCX
- 页数:16
- 大小:693.96KB
嵌入式系统的网络服务器外文翻译中英文翻译外文文献翻译.docx
《嵌入式系统的网络服务器外文翻译中英文翻译外文文献翻译.docx》由会员分享,可在线阅读,更多相关《嵌入式系统的网络服务器外文翻译中英文翻译外文文献翻译.docx(16页珍藏版)》请在冰豆网上搜索。
嵌入式系统的网络服务器外文翻译中英文翻译外文文献翻译
TheDIL/NetPCsDNP/1110–UsingtheEmbeddedLinux
WebServerforEmbeddedSystems
Afterthe“everybody-in-the-Internet-wave”nowobviouslyfollowsthe
“everything-in-the-Internet-wave”.Themostcoffee,vendingandwashingmachinesarestillnotavailableabouttheworldwidenet.HowevertheembeddedInternetintegrationforremotemaintenanceanddiagnosticaswellastheso-calledM2Mcommunicationisgrowingwithaconsiderablespeedrate.
JusttheremotemaintenanceanddiagnosticofcomponentsandsystemsbyWebbrowsersviatheInternet,oralocalIntranethasaveryhighweightformanydevelopmentprojects.InnumerousdevelopmentdepartmentspeopleworkoncompletelyWebbasedconfigurationsandservicesforembeddedsystems.TheremainingdaysoftheclassicuserinterfacemadebyasmallLC-displaywithfrontpanelandafewfunctionkeysareover.ThroughfutureevolutionsinthefieldofthemobileInternet,Bluetooth-basedPANs(PersonalAreaNetwork's)andtherapidlygrowingM2Mcommunication(M2M=Machine-to-Machine)afurtherinnovatingadvanceistobeexpected.
ThecentralfunctionunittogetaccessonanembeddedsystemviaWebbrowseristheWebserver.SuchWebserversbringthedesiredHTMLpages(HTML=HyperTextMarkupLanguage)andpicturesovertheworldwideInternetoralocalnetworktotheWebbrowser.ThishappensHTTP-based(HyperTextTransferProtocol).ATCP/IPprotocolstack–thatmeansitisbasedonsophisticatedandestablishedstandards–managestheentirecommunication.Webserver(HTTPserver)andbrowser(HTTPclient)buildTCP/IP-applications.HTTPachievedaphenomenaldistributioninthelastyears.MeanwhilemillionsofuseraroundtheworldsurfHTTP-basedintheWorldWideWeb.Todayalmosteverypersonalcomputeroffersthenecessaryassistanceforthisprotocol.Thisstatusisvalidmoreandmoreforembeddedsystemsalso.TheHTTPspreadsupwithafastratetoo.
TheDIL/NetPCsDNP/1110–UsingtheEmbeddedLinux
1.TCP/IP-basedHTTPasCommunicationPlatform
HTTPisasimpleprotocolthatisbasedonaTCP/IPprotocolstack(picture1.A).HTTPusesTCP(TransmissionControlProtocol).TCPisarelativecomplexandhigh-qualityprotocoltotransferdatabythesubordinateIPprotocol.TCPitselfalwaysguaranteesasafeguardedconnectionbetweentwocommunicationpartnersbasedonanextensivethree-way-handshakeprocedure.AsaresultthedatatransferviaHTTPisalwaysprotected.DuetotheextensiveTCPprotocolmechanismsHTTPoffersonlyalow-gradeperformance.
Figure1:
TCP/IPstackandHTTPprogrammingmodel
HTTPisbasedonasimpleclient/server-concept.HTTPserverandclientcommunicateviaaTCPconnection.AsdefaultTCPportvaluetheportnumber
80willbeused.Theserverworkscompletelypassive.Hewaitsforarequest
(order)ofaclient.ThisrequestnormallyreferstothetransmitionofspecificHTMLdocuments.ThisHTMLdocumentspossiblyhavetobegenerateddynamicallybyCGI.Asresultoftherequests,theserverwillanswerwitharesponsethatusuallycontainsthedesiredHTMLdocumentsamongothers
(picture1.B).
GET/test.htmHTTP/1.1
Accept]:
image/gif,image/jpeg,*/*Usersellingagent:
Mozilla/4.0
Host:
192.168.0.1
Listing1.A:
HTTPGET-request
HTTP/1.1200OK
Date:
Mon,06Dec199920:
55:
12GMTServer:
Apache/1.3.6(Linux)
Content-length:
82
Content-type:
text/html
TheDIL/NetPCsDNP/1110–UsingtheEmbeddedLinux
Listing1.B:
HTTPresponseasresultoftheGET-requestfromlisting1.A
HTTPrequestsnormallyconsistofseveraltextlines,whicharetransmittedtotheserverbyTCP.Thelisting1.Ashowsanexample.Thefirstlinecharacterizestherequesttype(GET),therequestedobject(/test1.htm)andtheusedHTTPversion
(HTTP/1.1).Inthesecondrequestlinetheclienttellstheserver,whichkindoffilesitisabletoevaluate.Thethirdlineincludesinformationabouttheclient-software.Thefourthandlastlineoftherequestfromlisting1.AisusedtoinformtheserverabouttheIPaddressoftheclient.Inaccordingtothetypeofrequestandtheusedclientsoftwaretherecouldfollowsomefurtherlines.Asanendoftherequestablanklineisexpected.
TheHTTPresponsesasrequestanswermostlyconsistoftwoparts.Atfirstthereisaheaderofindividuallinesoftext.Thenfollowsacontentobject(optional).Thiscontentobjectmaybeconsistsofsometextlines–incaseofaHTMLfile–orabinaryfilewhenaGIForJPEGimageshouldbetransferred.Thefirstlineoftheheaderisespeciallyimportant.Itworksasstatusorerrormessage.Ifanerroroccurs,onlytheheaderorapartofitwillbetransmittedasanswer.
2.FunctionalprincipleofaWebServer
SimplifiedaWebservercanbeimaginedlikeaspecialkindofafileserver.Picture2.Ashowsanoverview.TheWebserverreceivesaHTTPGET-requestfromtheWebbrowser.Bythisrequest,aspecificfileisrequiredasanswer(seestep1intopicture2.A).Afterthat,theWebservertriestogetaccessonthefilesystemoftherequestedcomputer.Thenitattemptstofindthedesiredfile(step2).AfterthesuccessfulsearchtheWebserverreadtheentirefile(step3)andtransmititasananswer(HTTPresponsecomprisingofheaderandcontentobject)totheWebbrowser(step4).IftheWebservercannotfindtheappropriatefileinthefilesystem,anerrormessage(HTTPresponsewhichonlycontainstheheader)issimplybesendasresponsetotheclient.
Figure2:
FunctionalprinciplefromWebserverandbrowser
TheDIL/NetPCsDNP/1110–UsingtheEmbeddedLinux
Thewebcontentisbuildbyindividualfiles.ThebaseisbuildbystaticfileswithHTMLpages.WithinsuchHTMLfilestherearereferencestofurtherfilesembedded–thesefilesaretypicallypicturesinGIForJPEGformat.However,alsoreferencestootherobjects,forexampleJava-Applets,arepossible.AfteraWebbrowserhasreceivedaHTMLfileofaWebserver,thisfilewillbeevaluatedandthensearchedforexternalreferences.Nowthesteps1to4frompicture2.AwillrunagainforeveryexternalreferenceinordertorequesttherespectivefilefromthecorrespondingWebserver.Pleasenote,thatsuchareferenceconsistsofthenameorIPaddressofaWebserver(e.g.""),aswellasthenameofthedesiredfile(e.g."picture1.gif").SovirtuallyeveryreferencecanrefertoanotherWebserver.Inotherwords,aHTMLfilecouldbelocatedontheserver"ssv-embedded.de"buttherequiredpicture-whichisexternalreferencedbythisHTMLfile-islocatedontheWebserver
"".Finallythis(worldwide)networkingofseparateobjectsisthecauseforthenameWorldWideWeb(WWW).Allfiles,whicharerequiredbyaWebserver,arerequestedfromabrowserliketheprocedureshownonpicture
2.A.Normallythesefilesarestoredinthefilesystemoftheserver.The
Webmasterhastoupdatethesefilesfromtimetotime.
AfurtherelementaryfunctionalityofaWebserveristheCommonGatewayInterface(CGI)-wehavementionedbefore.Originallythistechnologyismadeonlyforsimpleforms,whichareembeddedintoHTMLpages.Thedata,resultingfromthepaddingofaform,willbetransmittedtoaWebserverviaHTTP-GETorPOST-request(seestep1intopicture2.B).InsuchaGET-orPOST-requestthenameoftheCGIprogram,whichisneededfortheevaluationofaform,isfundamentallyincluded.ThisprogramhastobeontheWebserver.Normallythedirectory"/cgi-bin"isusedasstoragelocation.
AsresultoftheGET-orPOST-requesttheWebserverstartstheCGIprogramlocatedinthesubdirectory"/cgi-bin"anddeliversthereceiveddatainformofparameters(step2).TheoutputsofaCGIprogramareguidedtotheWebserver
(step3).ThentheWebserversendsthemallasresponsestotheWebbrowser
(step4).
3.DynamicgeneratedHTMLPages
IncontradictiontoacompanyWebsiteserver,whichinformspeopleabouttheproductprogramandservicesbystaticpagesandpictures,anembeddedWebserverhastosupplydynamicallygeneratedcontents.TheembeddedWebserverwillgeneratethedynamicpagesinthemomentofthefirstaccessbyabrowser.HowelsecouldwechecktheactualtemperatureofasystemviaInternet?
StaticHTMLfilesarenotinterestingforanembeddedWebserver.ThemostinformationaboutthefirmwareversionandserviceinstructionsarestoredinHTMLformat.AllothertasksarenormallymadeviadynamicgeneratedHTML.
TherearetwodifferenttechnologiestogenerateaspecificHTMLpageinthemomentoftherequest:
Firsttheso-calledserver-side-scriptingandsecondtheCGIprogramming.Attheserver-side-scripting,scriptcodeisembeddedintoaHTMLpage.Ifrequired,thiscodewillbecarriedoutontheserver(server-sided).
TheDIL/NetPCsDNP/1110–UsingtheEmbeddedLinux
Forthis,therearenumerousscriptlanguagesavailable.AlltheselanguagesareusableinsideaHTML-page.IntheLinuxcommunityPHPisusedmostly.ThefavouriteofMicrosoftisVBScript.ItisalsopossibletoinsertJavadirectlyintoHTMLpages.SunhasnamedthistechnologyJSP(JavaServerPages).TheHTMLpagewiththescriptcodeisstaticallystoredinthefilesystemoftheWebserver.Beforethisserverfileisdeliveredtotheclient,aspecialprogramreplacestheentirescriptcodewithdynamicgeneratedstandardHTML.TheWebbrowserwillnotseeanythingfromthescriptlanguage.
Figure3:
SinglestepsoftheServer-Side-Scripting
Picture3showsthesinglestepsoftheserver-side-scripting.Instep1theWebbrowserrequests
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 嵌入式 系统 网络 服务器 外文 翻译 中英文 文献