INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 5 Prof. Crista Lopes.

Slides:



Advertisements
Similar presentations
World Wide Web Basics Original version by Carolyn Watters (Dalhousie U. Computer Science)
Advertisements

HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
HTTP – HyperText Transfer Protocol
1 HTTP – HyperText Transfer Protocol Part 1. 2 Common Protocols In order for two remote machines to “ understand ” each other they should –‘‘ speak the.
16-Jun-15 HTTP Hypertext Transfer Protocol. 2 HTTP messages HTTP is the language that web clients and web servers use to talk to each other HTTP is largely.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
How the web works: HTTP and CGI explained
Cornell CS502 Web Basics and Protocols CS 502 – Carl Lagoze Acks to McCracken Syracuse Univ.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Hypertext Transport Protocol CS Dick Steflik.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
Application Layer. Domain Name System Domain Name System (DNS) Problem – Want to go to but don’t know the IP addresswww.google.com Solution.
The Application Layer  application and application requirements  sample network applications and protocols  SMTP, POP3  WWW: http1.1  teleconferencing.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
Human-Computer Interface Course 5. ISPs and Internet connection.
HTTP Protocol Specification
Network Applications Outline Simple Mail Transfer Protocol
FTP (File Transfer Protocol) & Telnet
Internet and Intranet Fundamentals Class 2 Session A.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
Some Data Comm. Standards
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
Tools for Web Applications. Overview of TCP/IP Link Layer Network Layer Transport Layer Application Layer.
WWW, HTTP, GET, POST, Cookies Svetlin Nakov Telerik Corporation
MySQL and PHP Internet and WWW. Computer Basics A Single Computer.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Internet Protocol B Bhupendra Ratha, Lecturer School of Library and Information Science Devi Ahilya University, Indore
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
Web Server Design Week 4 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/03/10.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
Jan.2001C.Watters1 World Wide Web Basics. Jan.2001C.Watters2 What is an internet anyway? 2 or more networks that can communicate.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Web Server Design Week 7 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/24/10.
Web Technologies Lecture 1 The Internet and HTTP.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
CS 6401 The World Wide Web Outline Background Structure Protocols.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Computer Network Architecture Lecture 6: OSI Model Layers Examples 1 20/12/2012.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
HyperText Transfer Protocol (HTTP) Deepti Kulkarni CISC 856: TCP/IP and Upper Layer Protocols Fall 2008 Acknowledgements Professor Amer Richi Gupta.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
COMPUTER NETWORKS Hwajung Lee. Image Source:
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
INTRODUCTION Dr Mohd Soperi Mohd Zahid Semester /16.
REST API Design. Application API API = Application Programming Interface APIs expose functionality of an application or service that exists independently.
What’s Really Happening
World Wide Web – History, Architecture, Protocols Architecture of Web Information Systems Acks to McCracken Syracuse Univ. CS 431 Carl Lagoze – Spring.
Lecture 2 Dr. Richard Spillman Fall 2009
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Hypertext Transfer Protocol (HTTP)
HTTP Hypertext Transfer Protocol
Part II Application Layer.
Presentation transcript:

INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 5 Prof. Crista Lopes

Objectives  Web history competency  Thorough understanding of HTTP

Recap

Distributed System  “Collection of interacting components hosted on different computers that are connected through a computer network” Component 1 Component n Hardware Network OS Host 3 Component 1 Component n Hardware Network OS Host 2 Component 1 Component n Hardware Network OS Host 1 … Network

The Origins of the Internet  Heterogeneous computers  Decentralized control  Many interested players

OSI Model Image courtesy of The Abdus Salam International Centre for Theoretical Physics International Centre for Theoretical Physics

OSI Model in Action Internet Your laptop DBH wireless router UCI routers Google routers Google server

The Internet  Large-scale infrastructure consisting of 100’s of 1,000’s of routers, cables, wireless links, and millions of hosts.  Traffic through the network consists of small data packets.  Software in each node follows, roughly, the OSI model.  Main “contract” between nodes: Internet Protocol (IP)  IP addresses (v4 and now v6)  Packets don’t contain routing information  Route packets according to their final destination but depending on local context of router  Each packet is routed independently of others

Lecture 5

Context,  Full decade of Internet usage  Foundation: TCP/IP [and UDP]  Enabled Client-Server architectures  Application: Telnet  Virtual terminal (login to remote machine)  Can be used to ‘talk’ to *any* TCP/IP server  Application:  SMTP: See example next page  POP  IMAP  Application: News  NNTP (before it, Usenet and UUCP)  Application: Instant Messaging  Unix’s Talk program  Popularized by AOL  Application: File sharing  FTP

Client-Server over TCP/IP  Server opens TCP [server] socket, binds to port, listens for connection requests  Client opens TCP [client] socket, connect to server host/port  Server accepts connection, initiates dedicated full- duplex “virtual circuit”  Eventually spawns thread for it  Main thread goes back to listen for other connections  Client and server send each other messages (byte streams)  TCP implementation takes care of protocol details

Example: SMTP over TCP/IP tagus: crista$ telnet smtp.ics.uci.edu 25 Trying Connected to smtp.ics.uci.edu. Escape character is '^]'. 220 david-tennant-v0.ics.uci.edu ESMTP mailer ready at Mon, 5 Apr :15: ' HELO smtp.ics.uci.edu 250 david-tennant-v0.ics.uci.edu Hello barbara-wright.ics.uci.edu [ ], pleased to meet you MAIL FROM: Sender ok RCPT TO: Recipient ok DATA 354 Enter mail, end with "." on a line by itself test o360F1Mo Message accepted for delivery QUIT david-tennant-v0.ics.uci.edu closing connection Connection closed by foreign host.

Origins of the Web  CERN Conseil Européen pour la Recherche Nucléaire (European Laboratory for Particle Physics; Geneva, Switzerland) CERN  Tim Berners-Lee & Robert Cailliou  Originally a system for sharing documents among scientists  First implementation made publicly available quickly became very popular in universities & research institutions  NCSA Mosaic browser made it popular across the board

Main Design Principles, originally  Client requests a text document from the server  Server sends back the text document  Text document may contain retrieval references (hyperlinks) to other text documents on that or other servers  HyperText Markup Language (HTML)  Client may also send text documents for the server to store  Requests/Responses sent over TCP, but  Client makes connection, sends, receives, connection is closed Connection is not maintained among interactions  Requests are self-contained, do not rely on past interactions “Stateless”  (Notice the story based on “text document”; it quickly became apparent that it needed generalization)

Generalization  Document  Resource  “Page” with markups  Actual document, many types  Program generating resource  Universal Resource Identifier (URI)  Abstract concept  Concrete realization: Universal Resource Locator (URL) Provides a method for finding the resource file://, ftp://, mailto://, etc.

HTTP URLs  Syntax:  : [/ ][? ]  Examples  Hosts: www.ics.uci.edu  Ports: Number  Paths: /wifi/admin/users  Queries: first=John&last=Smith  Spec Spec

HyperText Transfer Protocol (HTTP)  GET  PUT  DELETE  HEAD  OPTIONS  TRACE  POST  CONNECT  Spec Spec Idempotent methods

HTTP Request Syntax [ : … : ] [ ]

HTTP Response Syntax [ : … : ] [ ]

HTTP Example GET /index.html HTTP/1.1 Host: ics.uci.edu Blank line here HTTP/ OK Date: Fri, 09 Apr :48:36 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Fri, 19 Feb :01:21 GMT ETag: " ffb39422e40" Accept-Ranges: bytes Content-Length: 100 Connection: close Content-Type: text/html; charset=UTF-8 (show live)

HTTP Headers  Request headers Request headers  Response headers Response headers  Spec Spec

HTTP Status Codes  Informational 1xxx  E.g. 100 Continue  Successful 2xx  E.g. 200 OK, 201 Created  Redirection 3xx  E.g. 300 Multiple Choices, 301 Moved Permanently  Client error 4xx  E.g. 400 Bad Request, 404 Not Found  Server error 5xx  E.g. 500 Internal Server Error, 503 Service Unavailable  Complete list Complete list

Another Example GET /index.html HTTP/1.1 Host: cnn.com Blank line here HTTP/ Moved Permanently Date: Fri, 09 Apr :32:14 GMT Server: Apache Location: Vary: Accept-Encoding Content-Length: 294 Content-Type: text/html; charset=iso Moved Permanently Moved Permanently The document has moved here. Apache Server at cnn.com Port 80 (show live)

Web Caches Internet Proxy Client … Internet Reverse Proxy Reverse Proxy Server … Caches content from Internet Caches content from servers

Web Caches  Reduce bandwidth  Reduce server load  Reduce lag  Cache content from Idempotent methods (GET mostly)

Web Caches: Why you need to know about them  github.com demo

Web Cache Control  “Cache-Control” header in responses  E.g. Cache-Control: no-cache  “Expires” header in responses  E.g. Expires: Fri, 09 Apr :00:00 GMT  “Last-Modified” header in responses  Proxy can use If-Modified-Since header in request, server may respond 304 Not Modified  If subsequent POST, PUT, DELETE to same URL, cache should be invalidated

Cookies  Text data sent from the server to the client meant to be sent back in subsequent requests from the client to the same server  Added to Mosaic browser and Web servers in 1994  Uses  Session management  Personalization  Tracking

Setting and Using Cookies GET /index.html HTTP/1.1 Host: HTTP/ OK Date: Sat, 10 Apr :35:22 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO Set-Cookie: PREF=ID=1bb89b81c47c05fb:TM= :LM= :S=YQ3wzhShOas9UStn; expires=Mon, 09-Apr :35:22 GMT; path=/; domain=.google.com Set-Cookie: NID=33=CeVJK2EKVB5kcCiguCD1OjG3g5UKlPq78SXCibOjYQOU46P6SMaAKqAhw2hEVPqqnKfFlTzmC-w4Ol5ZwKQqnjyla1DZcS6ZYmb1lLHe2zNuEVnXJRtd4lMrr6gA4o8m; expires=Sun, 10-Oct :35:22 GMT; path=/; domain=.google.com; HttpOnly Server: gws Transfer-Encoding: chunked … Client  Server Server  Client

Setting and Using Cookies GET /index.html HTTP/1.1 Host: Cookie: PREF=ID=1bb89b81c47c05fb:TM= :LM= :S=YQ3wzhShOas9UStn Client  Server Etc.

Uses  Session Management  User logs in, server sends cookie  Subsequent requests include that cookie  Personalization  User visits, server sends cookie  User changes preferences, all with cookie  Future visits include cookie, server “remembers” preferences  Tracking within same site  Cookie + path + date/time  Tracking inter-site  Referer + Cookie  (Privacy concerns)