1 / 21

Lecture 3: Internet Applications (Cont’d)

Lecture 3: Internet Applications (Cont’d). Basic Internet Applications World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents HTTP.

yates
Download Presentation

Lecture 3: Internet Applications (Cont’d)

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. Lecture 3: Internet Applications (Cont’d) • Basic Internet Applications • World Wide Web (WWW) • Browser Architecture • Static Documents • Dynamic Documents • Active Documents • HTTP 2: Basic Internet Applications

  2. WWW project was initiated by CERN (European Laboratory for Particle Physics) to create a system to handle resources necessary for scientific research. Web browsing uses client-server paradigm Browser: Makes TCP connection Sends request for page Reads page If a page contains several images, Each different item - e.g., <IMG> tag (image) - requires separate TCP connection HyperText Transport Protocol (HTTP) specifies commands and client-server interaction 2.6 WWW: How A Browser Works Fig. 22.1 (text book) 2: Basic Internet Applications

  3. Use client-server interaction The client: browser program uses the Internet to contact a remote server The server: returns a copy of the requested page with additional information A URL (Uniform Resource Locator) tells a browser which server to contact Each URL uniquely identifies a page of information by giving the name of a remote computer and a specific page of information available from the server URL specifies an access protocol the domain name of the remote computer on which the server runs any specific item 2.6 How The World Wide Web Works Fig. 22.7 (text book) 2: Basic Internet Applications

  4. 2.6 Inside a Browser Program • Examples: Netscape Communicator, Microsoft IE • A Web Browser Architecture usually consists of 3 parts: • controller: • receives and interpret input from the keyboard or the mouse • calls other components to perform operations specified by users (e.g., uses a client program to access a document) • client programs: uses different protocols • HTTP client fetches HTML documents from WWW server • optional clients: FTP client and E-mail client • FTP client - access file transfer service • E-mail client - send & receive e-mails • interpreters: • HTML interpreter displays HTML-formatted documents 2: Basic Internet Applications

  5. 2.6 Inside a Browser Program 2: Basic Internet Applications

  6. 2.6 Web Documents • Documents in WWW can be grouped into 3 categories: • static documents: • fixed-content, created and stored in the a server. • dynamic documents: • created by a Web server whenever a browser requests the document. • contents can vary from one request to another. • active documents: • contain program to be run at the client side, e.g. animation • stored in the form of binary code. • transported to the client in a binary form. 2: Basic Internet Applications

  7. 2.6 Static Documents Fig. 24.1 (text book) (1) A user enters a URL, causing a browser to contact a Web server and request the item (2) the server extracts the specified item from its local disk and sends a copy to the browser. 2: Basic Internet Applications

  8. 2.6 Dynamic Documents Figure 24.3 (text book) (1) A browser requests a URL that corresponds to a CGI program, causing the server to start the program (2) the CGI program computes a response, which the server returns to the browser. 2: Basic Internet Applications

  9. Dynamic documents: e.g. documents generated using CGI A server follows these steps: it examines the URL to find if it defines a dynamic document, e.g. with extension .cgi if it is dynamic, then it executes the program. it sends the output of the program to the client. 2.6 Dynamic Documents 2: Basic Internet Applications

  10. 2.6 ActiveDocuments Figure 24.4 (text book) (1) A browser requests a URL that corresponds to an active document, (2) Server sent a copy of active program to client (browser) (3) the browser runs a copy of the active document, which then controls the screen. 2: Basic Internet Applications

  11. Active documents: e.g. documents containing Javascript. Its execution is as follows: the binary code of the program is created and stored at the server side. upon client request, the binary code is transported to the client. the client uses its own software to change the binary code into executable code. the client runs the program. 2.6 ActiveDocuments 2: Basic Internet Applications

  12. Comparing Static, Dynamic & Active Documents • Static Document • Advantages: • Simplicity: straightforward formatting specifications – can be created by non-technical person • Reliability: after it has been created and tested thoroughly, a static document remains valid indefinitely • Performance: browser can (1) display static documents more rapidly and (2) place a copy on cache to speed up future requests • Disadvantage: • Inflexibility: must be revised whenever information changes; not useful for reporting information that changes frequently 2: Basic Internet Applications

  13. Comparing Static, Dynamic & Active Documents • Dynamic Document • Advantage: • Able to report current information • Disadvantage: • Increase cost: more expensive to develop than static document • Inability to update information continuously: Do not deliver a continuous stream of images 2: Basic Internet Applications

  14. Comparing Static, Dynamic & Active Documents • Active Document • Advantages: • ability to update information continuously • Ability to change the display quickly enough to show an animated image • Disadvantage: • Additional cost (more programming skills needed, requires more sophisticated browser software and more powerful computer) 2: Basic Internet Applications

  15. 2.6 HTTP • HTTP (Hypertext Transfer Protocol) • protocol used to access data on the WWW. • uses one TCP connection on well-known port 80. • two types of http messages: request, response • transfer data in the form of plain text, hypertext, audio, video, and so on. • data transferred look like SMTP messages (see Lecture note 2). 2: Basic Internet Applications

  16. 2.6 HTTP • HTTP requests use the concept of resource locator (URL). • In more detail, URL defines four things: method, host computer, port and path • Method is the protocol used to retrieve the document, e.g. FTP, & HTTP. An access protocol (see slide 3) • Host is the computer where the information is located. Domain name of the computer (see slide 3) • Port: port number of the server (optional) • Path is the pathname of the file where the information is located. Specify a specific item to request (see slide 3) 2: Basic Internet Applications

  17. 2.6 HTTP: Request and Response 2: Basic Internet Applications

  18. 2.6 HTTP: Request and Response Request Line Status Line 2: Basic Internet Applications

  19. 2.6 HTTP Example: Retrieving a File 2: Basic Internet Applications

  20. 2.6 HTTP Example: Retrieving a File • Request line • request type (method): GET • path: /usr/bin/image1 • HTTP version: 1.1 • client can accept images in GIF and JPEG formats • status line: • HTTP version: 1.1 • status code (a 3 digit number): 200 • status phrase: OK (200 OK indicates request is successful) • Header lines defines: • date: 04-Jan-99 • server name: challenger • MIME version: 1.0 - (MIME (Multipurpose Internet Mail Extensions) is an SMTP extension to allow non-ASCII data to be sent through SMTP.) • length of document: 2048 bytes 2: Basic Internet Applications

  21. Further Readings • Note: This lecture is designed with the objective of providing an introduction tobrowser architecture, web documents and HTTP. • Details of these topics are beyond the scope of this course and will NOT be taught or discussed. Students who wish to invest more time on studying more details for these topics are referred to: • World Wide Web: • Textbook Chapter 22. • HTTP: • Forouzan Chapter 22. 2: Basic Internet Applications

More Related