• Web consists of a vast ,worldwide collection of content
in the form of Web pages. • The idea of one page point to another called Hypertext. • Pages are generally viewed with a program called Browser. • A piece of icon , text , image and so on associated with another page is called a Hyperlink. Architecture Of The WEB Three questions had to be answered before a selected page could be displayed: 1.What is the page called? 2.Where is the page located? 3.How can the page be accessed? URL : UNIFORM RESOURCE LOCATOR Example ,the URL http://.cs,washinton.edu/index.html It consists of 3 parts: the protocol(http),the DNS name of the host ( www.cs.washinton.edu) , and the Path name(index.html)
Steps that occur when link is selected:
1.Browser determines the URL 2.Browser asks DNS for the IP address of the server 3.DNS replies 4.The browser makes a TCP connection 5.Sends HTTP request for the page 6.Server sends the page as HTTP response 7.Browser fetches other URLs as needed 8.The browser displays the page 9.The TCP connections are released Some Common URL Schemes The Server Side Steps server performs in main loop 1.Accept a TCP connection from client 2.Get path to page, name of file requested. 3.Get the file (from disk). 4.Send contents of the file to the client. 5.Release the TCP connection • Web servers are implemented with a different design to serve many request per second • Problems:
Disk reads are very slow compared to program execution
Only one request is processed at a time, the file is large the other requests will be blocked • One obvious improvement is to maintain Cache in memory Before going to disk to get a file ,the server checks the cache. • Although effective caching requires a large amount of main memory and extra processing time to check and manage its content • To tackle the problem of serving request at a time , one strategy is to make the server multithreaded
A multithreaded Web Server with a front end and processing modules
Cookies • When a client request s a Web pages, the server can supply additional information in the form of a cookie along with the requested page.
Static Web Pages
HTML – The HyperText Markup Language • It allows the user to produce Web pages that include text , graphics,video, pointers to other Web pages and more CSS – Cascading Style Sheets • The original goal of HTML was to specify the structure of the document not its appearance. • CSS introduced style sheets to the Web with HTML Dynamic Web Pages and Web Applications • A dynamic page may present itself differently each time it is displayed. • For example, a page of the library catalog should reflect which books are currently available and which books are checked out and are thus not available.