0
Lecture 2           • Internet           • HTTP           • HTML           • Cookies           • Web servers02/28/11     Η...
History of the Internet• ARPAnet     – Implemented in late 1960’s by ARPA (Advanced       Research Projects Agency of DOD)...
History of the Internet (II)  • ARPA’s goals       – Allow multiple users to send and receive info at         same time   ...
History of the Internet (III)• Transmission Control Protocol (TCP)     – Name of protocols for communicating over ARPAnet ...
History of the Internet (IV)• Huge variety of networking hardware and  software appeared      – ARPA achieved inter-commun...
History of the Internet (V)• Internet traffic grew     – Businesses spent heavily to improve Internet           • Better s...
Growing of the Internet• In 1988 when the Internet was first plugged into  a T1 backbone, there were a total of about  50,...
Major Events in Internet History (I)Year       Event1957       USSR launches Sputnik1968       First Packet Switching Netw...
Major Events in Internet History (II)  Year       Event  1989       Internet Exceeds 100,000 Hosts  1990       ARPANET Dis...
Client/Server• A program running on the end-user  workstation is called a client.• A program running on the service part i...
History of the World Wide Web • WWW       – Allows computer users to locate and view         multimedia-based documents   ...
Standard Bodies•   Internet Society (www.isoc.org)•   Internet Architecture Board (www.isi.edu/iab)•   Internet Engineerin...
World Wide Web Consortium              (W3C) • Founded in 1994 by Tim Berners-Lee       – Devoted to developing non-propri...
World Wide Web Consortium            (W3C) (II)• W3C Structure     – 3 Hosts           • Massachusetts Institute of Techno...
TCP/IP: The Internet Protocol           Application Layer (HTTP, FTP, SMTP)               Transport Layer (TCP, UDP)      ...
TCP/IP           FPT        HTTP      TELNET              SNMP          MBONE                      TCP                    ...
Uniform Resource Locator - URL• <scheme>:<scheme-specific name>• <protocol>://<user>:<password>@<host>:  <port>/<path>• ht...
IP addresses                Octets: network classification                          216.27.61.137           11011000.00011...
Name Servers• DNS (Domain Names System, 1983,  University of Wisconsin)• Domain Names     – .org, .com, .net, .gov, .edu, ...
HyperText Transfer Protocol (HTTP)   www.w3c.org/protocols/HTTP• Client / Server (browser / web server)• Stateless• MIME (...
Sockets and Ports (Diagram)                                      port 13                 Time Service   Client            ...
HTTP1.     Client opens connection2.     Client makes the request3.     Server sends response4.     Server closes connecti...
HTTP methods• GET   retrieves a resource from the server and returns it to the   client   GET <URL> HTTP/1.1• HEAD   like ...
The HTTP Connection• The HTTP protocol is text-based.• HTTP headers:     – GET: identifies the request as HTTP version    ...
The HTTP Connection• HTTP headers (continued):     – User-Agent: identifies the user agent.     – Host: requests the homep...
HTTP Request / Response02/28/11    ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός   26                         Δημήτρης Κοτζίνος
Request headers send from                    browserGET /Tests/file.html HTTP/1.0Referer: http://www.utoronto.ca/webdocs/w...
HTML form that uses GET<FROM ACTION= “http://smaug.java.utoronto.ca:2021/cgi-bin/form1”METHOD=GET><p> Search string: <INPU...
Data sent to a HTTP server during    a form-based GET requestGET /cgi-bin/form1?  srch=dogfish&srch_type=Exact+Match&srvr=...
Form-based POST requestPOST /cgi-bin/form1 HTTP/1.0Connection: Keep-AliveUser-Agent: Mozilla/3.0b5 (Win95; I)Host: smaug.j...
HyperText Markup Language (HTML)• readable by both humans and computers• based on SGML (Standard Generalized  Markup Langu...
HTML – Elements and Tags<h1>This is a level one heading</h1>02/28/11             ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμό...
HTML files<html><head><title>Paragraph Attributes</title></head><body><h1>The Paragraph Attribute Align</h1><p align=left>...
HTML files02/28/11   ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός   34                        Δημήτρης Κοτζίνος
HTML forms• <form> …. </form>• hidden forms: forms not showing on the  browser but used to preserve state  information• No...
02/28/11   ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός   36                        Δημήτρης Κοτζίνος
Upcoming SlideShare
Loading in...5
×

Lecture2

553

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
553
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Lecture2"

  1. 1. Lecture 2 • Internet • HTTP • HTML • Cookies • Web servers02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 1 Δημήτρης Κοτζίνος
  2. 2. History of the Internet• ARPAnet – Implemented in late 1960’s by ARPA (Advanced Research Projects Agency of DOD) – Networked computer systems of a dozen universities and institutions with 56KB communications lines – Grandparent of today’s Internet – Intended to allow computers to be shared – Became clear that key benefit was allowing fast communication between researchers – electronic-mail (email)02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 2 Δημήτρης Κοτζίνος
  3. 3. History of the Internet (II) • ARPA’s goals – Allow multiple users to send and receive info at same time – Network operated packet switching technique • Digital data sent in small packages called packets • Packets contained data, address info, error-control info and sequencing info • Greatly reduced transmission costs of dedicated communications lines – Network designed to be operated without centralized control • If portion of network fails, remaining portions still able to route packets02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 3 Δημήτρης Κοτζίνος
  4. 4. History of the Internet (III)• Transmission Control Protocol (TCP) – Name of protocols for communicating over ARPAnet – Ensured that messages were properly routed and that they arrived intact• Organizations implemented own networks – Used both for intra-organization and communication02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 4 Δημήτρης Κοτζίνος
  5. 5. History of the Internet (IV)• Huge variety of networking hardware and software appeared – ARPA achieved inter-communication between all platforms with development of the IP • Internetworking Protocol • Current architecture of Internet – Combined set of protocols called TCP/IP• The Internet – Limited to universities and research institutions – Military became big user – Next, government decided to access Internet for commercial purposes02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 5 Δημήτρης Κοτζίνος
  6. 6. History of the Internet (V)• Internet traffic grew – Businesses spent heavily to improve Internet • Better service their clients – Fierce competition among communications carriers and hardware and software suppliers – Result • Bandwidth (info carrying capacity) of Internet increased tremendously • Costs plummeted02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 6 Δημήτρης Κοτζίνος
  7. 7. Growing of the Internet• In 1988 when the Internet was first plugged into a T1 backbone, there were a total of about 50,000 hosts.• In 1993, when the World Wide Web came online, the number of hosts had just passed 1 million mark.• In 2001, there are more than 100 million hosts on the Internet. The Internet is growing in a fast speed.• The most recent survey can be found at http://www.isc.org/ds/.02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 7 Δημήτρης Κοτζίνος
  8. 8. Major Events in Internet History (I)Year Event1957 USSR launches Sputnik1968 First Packet Switching Network1969 ARPANET Starts1972 First Public Demo of ARPANET Internet Mail Invented1979 UseNet Starts1983 ARPANET Changes Over to TCP/IP ARPANET Splits into ARPANET & MILNET1984 Internet Exceeds 1.000 Hosts Domain Name Server Introduced1987 Internet Exceeds 10.000 Hosts1988 Worm Attacks 6.000 of Internet’s 60.000 Hosts02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 8 Δημήτρης Κοτζίνος
  9. 9. Major Events in Internet History (II) Year Event 1989 Internet Exceeds 100,000 Hosts 1990 ARPANET Dismantled Archie Starts 1986 NSFNET Created 1991 WAIS Started Gopher Started NSF Lifts Commercial Ban 1992 Internet Exceeds 1 million Hosts Web Invented by Tim Berners-Lee 1993 MOSAIC Developed by Marc Andreesen InterNIC Founded by NSF02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 9 Δημήτρης Κοτζίνος
  10. 10. Client/Server• A program running on the end-user workstation is called a client.• A program running on the service part is called a server.• Client/server describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfills the request.02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 10 Δημήτρης Κοτζίνος
  11. 11. History of the World Wide Web • WWW – Allows computer users to locate and view multimedia-based documents – Introduced in 1990 by Tim Berners-Lee – HyperText (Nielsen, 1965) • Internet today – Mixes computing and communications technologies – Makes information constantly and instantly available to anyone with a connection02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 11 Δημήτρης Κοτζίνος
  12. 12. Standard Bodies• Internet Society (www.isoc.org)• Internet Architecture Board (www.isi.edu/iab)• Internet Engineering Task Force (IETF) (www.ietf.org)• Internet Research Task Force (IRTF) (www.irtf.org)• Internet network Information Center (InterNIC): Domain Names (www.internic.net)• Internet Assigned Numbers Authority (IANA): IP addresses (www.iana.org)• World Wide Wed Concortium (W3C) (www.w3c.org)02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 12 Δημήτρης Κοτζίνος
  13. 13. World Wide Web Consortium (W3C) • Founded in 1994 by Tim Berners-Lee – Devoted to developing non-proprietary and interoperable technologies for the World Wide Web and making the Web universally accessible • Standardization – W3C Recommendations: technologies standardized by W3C • include Extensible HyperText Markup Language (XHTML), Cascading Style Sheets (CSS) and the Extensible Markup Language (XML) – Document must pass through Working Draft, Candidate Recommendation and Proposed Recommendation phases before considered for W3C Recommendation02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 13 Δημήτρης Κοτζίνος
  14. 14. World Wide Web Consortium (W3C) (II)• W3C Structure – 3 Hosts • Massachusetts Institute of Technology (MIT) • INRIA (Institut National de Recherche en Informatique et Automatique) • Keio University of Japan – 400 Members (including Deitel & Associates)• W3C homepage at www.w3c.org• W3C Goals – User Interface Domain – Technology and Society Domain – Architecture Domain and Web Accessibility Initiatives02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 14 Δημήτρης Κοτζίνος
  15. 15. TCP/IP: The Internet Protocol Application Layer (HTTP, FTP, SMTP) Transport Layer (TCP, UDP) Internet Layer (IP) Physical Network02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 15 Δημήτρης Κοτζίνος
  16. 16. TCP/IP FPT HTTP TELNET SNMP MBONE TCP UDP Connection- Connectionles oriented s IP (ICMP, IGMP) Internet addressing Physical Layer Physical wiring02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 16 Δημήτρης Κοτζίνος
  17. 17. Uniform Resource Locator - URL• <scheme>:<scheme-specific name>• <protocol>://<user>:<password>@<host>: <port>/<path>• http://<user>:<passowrd>:www.csd.uoc.gr :80/~kotzino02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 17 Δημήτρης Κοτζίνος
  18. 18. IP addresses Octets: network classification 216.27.61.137 11011000.00011011.00111101.1000100102/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 18 Δημήτρης Κοτζίνος
  19. 19. Name Servers• DNS (Domain Names System, 1983, University of Wisconsin)• Domain Names – .org, .com, .net, .gov, .edu, .mil – .gr02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 19 Δημήτρης Κοτζίνος
  20. 20. HyperText Transfer Protocol (HTTP) www.w3c.org/protocols/HTTP• Client / Server (browser / web server)• Stateless• MIME (binary data support)• Data in two pieces: data & transfer description •fewer TCP connections• Port 80 •compression/decompression• version 1.1 •multiple languages •virtual hosting02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 20 Δημήτρης Κοτζίνος
  21. 21. Sockets and Ports (Diagram) port 13 Time Service Client port 80 Web Service Socket Socket Server02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 21 Δημήτρης Κοτζίνος
  22. 22. HTTP1. Client opens connection2. Client makes the request3. Server sends response4. Server closes connection• HTTP-Keep Alive: server does not close connection• Restart from (2)02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 22 Δημήτρης Κοτζίνος
  23. 23. HTTP methods• GET retrieves a resource from the server and returns it to the client GET <URL> HTTP/1.1• HEAD like GET but returns only info about a resource and NOT the resource itself• POST sends data from the server to the client02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 23 Δημήτρης Κοτζίνος
  24. 24. The HTTP Connection• The HTTP protocol is text-based.• HTTP headers: – GET: identifies the request as HTTP version 1.1. – Accept: identifies what image formats are accepted. – Accept-Language: specifies the language used. – Accept-Encoding: specifies the data compression.02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 24 Δημήτρης Κοτζίνος
  25. 25. The HTTP Connection• HTTP headers (continued): – User-Agent: identifies the user agent. – Host: requests the homepage. – Connection: specifies to keep the connection open. – Extension: Something about security.02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 25 Δημήτρης Κοτζίνος
  26. 26. HTTP Request / Response02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 26 Δημήτρης Κοτζίνος
  27. 27. Request headers send from browserGET /Tests/file.html HTTP/1.0Referer: http://www.utoronto.ca/webdocs/webinfo.htmlConnection: Keep-AliveCookie: good=bad; apples=orangesUser-Agent: Mozilla/3.0b5 (Win95; I)Host: smaug.java.utoronto.ca:2021Accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*Accept-Language: en-US, frAccept-Charset: ISO-8859-1, *,UCS-202/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 27 Δημήτρης Κοτζίνος
  28. 28. HTML form that uses GET<FROM ACTION= “http://smaug.java.utoronto.ca:2021/cgi-bin/form1”METHOD=GET><p> Search string: <INPUT TYPE=”text” NAME=”srch” VALUE=”dogfish”><p> Search Type: <SELECT NAME=”srch_type”> <OPTION> Insensitive Substrinb <OPTION SELECTED> Exact Match <OPTION> Sensitive Substring <OPTION> Regular Expression </SELECT><p> Search databases in: <INPUT TYPE=“checkbox” NAME=“srvr” VALUE=“Canada” CHECKED> Canada <INPUT TYPE= “chckbox” NAME=“srvr” VALUE=“Russia” > Russia <INPUT TYPE=“checkbox” NAME=“srvr” VALUE=“Sweden” CHECKED> Sweden <INPUT TYPE=“checkbox” NAME=“srvr” VALUE=“U.S.A.” > U.S.A <em>(multiple items can be selected.)</em><P> <INPUT TYPE=“submit”> < <INPUT TYPE=reset>.</FORM>02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 28 Δημήτρης Κοτζίνος
  29. 29. Data sent to a HTTP server during a form-based GET requestGET /cgi-bin/form1? srch=dogfish&srch_type=Exact+Match&srvr=Ca nanda&srvr=Sweden HTTP/1.0Connection:keep-AliveUser-Agent: Mozilla/3.02 (Win95; I)Host: smaug.java.utoronto.ca:2021Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*Accept-Language: en-US, fr, fr-CA02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 29 Δημήτρης Κοτζίνος
  30. 30. Form-based POST requestPOST /cgi-bin/form1 HTTP/1.0Connection: Keep-AliveUser-Agent: Mozilla/3.0b5 (Win95; I)Host: smaug.java.utoronto.ca:2021Accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*Accept-Language: en-US, fr, fr-CAContent-type: application/x-www-form-urlencodedContent-length: 58[a blank line, containing only CRLF ]srch=dogfish&srch_type=Exact+Match&srvr=Cananda &srvr=Sweden02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 30 Δημήτρης Κοτζίνος
  31. 31. HyperText Markup Language (HTML)• readable by both humans and computers• based on SGML (Standard Generalized Markup Language)• markup: tags describing the data• tags: <> </> (tag names case-insensitive)• Text, images,02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 31 Δημήτρης Κοτζίνος
  32. 32. HTML – Elements and Tags<h1>This is a level one heading</h1>02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 32 Δημήτρης Κοτζίνος
  33. 33. HTML files<html><head><title>Paragraph Attributes</title></head><body><h1>The Paragraph Attribute Align</h1><p align=left> This is a paragraph with its text pushed against the left-handside of the page.<p align=center> This is a paragraph with its text placed in the center of thepage.<p align=right> This is a paragraph with its text pushed against the righthandside of the page.</body></html>02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 33 Δημήτρης Κοτζίνος
  34. 34. HTML files02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 34 Δημήτρης Κοτζίνος
  35. 35. HTML forms• <form> …. </form>• hidden forms: forms not showing on the browser but used to preserve state information• Note: HTTP is a stateless protocol02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 35 Δημήτρης Κοτζίνος
  36. 36. 02/28/11 ΗΥ359 - Διαδικτυοκεντρικός Προγραμματισμός 36 Δημήτρης Κοτζίνος
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×