1 / 17

Web application architecture

Web application architecture. And protocols of the www. Q: What does a Browser do?. Web Browsers. The www message model consists of Requests and Responses. Client Request : “I need a resource (html page, picture, pdf doc, mp3 file…)”. Q: How does a user initiate a request?.

skylar
Download Presentation

Web application architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web application architecture And protocols of the www SE-2840 Dr. Mark L. Hornick

  2. Q: What does a Browser do? Web Browsers SE-2840 Dr. Mark L. Hornick

  3. The www message model consists of Requests and Responses Client Request: “I need a resource (html page, picture, pdf doc, mp3 file…)” Q: How does a user initiate a request? Resource access Web Browser(the client) Server Response: “Here you go!” Web Server SE-2840 Dr. Mark L. Hornick

  4. How a browser initiates a request: anatomy of a url The most commonly used form: www.msoe.edu • Represents the DNS name of the server which listens for HTTP requests on port 80 • The complete url is really: http://www.msoe.edu:80/index.html, where the http:// prefix explicitly instructs the browser to communicate using the http protocol, and the :80 suffix instructs the browser which port to use, and /index.html is the path of the resource to be retrieved. • When the protocol and port are omitted, the browser assumes http and 80 • Index.html is one of several default files the server looks for when none is specified by the browser

  5. Other protocols and ports can also be specified https://sapphire.msoe.edu:8443/OnTrack/login.jsp • https:// specifies that a secure version of HTTP (using SSL) should be used (recall from CS2910) • :8443 is a commonly-selected port that servers use for https. • /OnTrack/login.jsp is the path to a web page being requested by the browser CS-4220 Dr. Mark L. Hornick

  6. Browsers can use protocols other than http ftp://myfiles.msoe.edu/public/pictures/dog.jpg • ftp:// specifies that the browser should use the ftp protocol to retrieve the specified resource • The default port for ftp is used unless specified explicitly file:///D:/MyDocs/SampleHTML/BasicHTML.htm • file:// specifies that the browser should retrieve the specified resource directly from the filesystem • The filepath syntax is specific to the operating system running the browser (Windows in this case) CS-4220 Dr. Mark L. Hornick

  7. A three-tier model (Client, Server, Database) is a common web application architecture Client Web Server Database Databases are often on a separate server,but not always. Q: What’s in the lightning bolts ?? SE-2840 Dr. Mark L. Hornick

  8. How are messages sent back and forth? Request: Internet message from Client to Server router router router router router Generic Client Generic Server Response: Internet message from Server to Client SE-2840 Dr. Mark L. Hornick

  9. Packaging a message for delivery • Application-specific data of the message Internet message from Client to Server router router router router router Generic Client Generic Server Internet message packet SE-2840 Dr. Mark L. Hornick

  10. Peeling the onion of an internet message CS-4220 Dr. Mark L. Hornick

  11. The sequence for retrieving a static web page (no db needed) Note: This diagram canbe found in your textbook Browser formats therequest and sends itto the server …or types aurl into theaddress bar HTML (and other)files Server formats theresponse and sends itto the client (browser) SE-2840 Dr. Mark L. Hornick

  12. HTTP: The message protocolof the www HTTP request Simplepagefetch… Web Browser HTTP response Web Server Q: Does a response always carry a payload? SE-2840 Dr. Mark L. Hornick

  13. The HTTP GET Request is the most commonly issued message GET requests the retrieval of a resource specified via a URL Example: http://people.msoe.edu/hornick/Courses/cs4220/mypage.htm URLs you type into the address bar of a web browser are always formatted into GETRequests: GET /hornick/Courses/cs4220/mypage.htm HTTP/1.1 Host: people.msoe.edu Accept: */* \r\n SE-2840 Dr. Mark L. Hornick

  14. Request / Response illustrated Note: This diagram canbe found in your textbook SE-2840 Dr. Mark L. Hornick

  15. Of all other HTTP requests, POST is the only one commonly used • POST • Submits data to be processed (commonly from a HTML form) to the identified resource. The data is included in the body of the request. The data thus provided typically changes the state of the web application. More on this later. • PUT • Uploads a representation of the specified resource. • DELETE • Deletes the specified resource. • TRACE • Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request. • OPTIONS • Returns the HTTP methods that the server supports. This can be used to check the functionality of a web server. • CONNECT • For use with a proxy that can change to being an SSL tunnel. • HEAD • Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. . SE-2840 Dr. Mark L. Hornick

  16. Wfetch is free HTTP protocol viewer Live link on course webpage under Tools. http://download.microsoft.com/download/iis50/Utility/5.0/W9XNT4/EN-US/wfetch.exe SE-2840 Dr. Mark L. Hornick

  17. Use Wfetch forhttp://people.msoe.edu/~hornick/Courses/cs4220/mypage.htm CS-4220 Dr. Mark L. Hornick

More Related