Chapter 2. Application Layer. Chapter 2: Application Layer. Application layer - Overview. Some network apps. Creating a network appication

Similar documents
Chapter 2: Application Layer. Chapter 2 Application Layer. Some network apps. Application architectures. Chapter 2: Application layer

Introduction to the Application Layer. Computer Networks Term B14

Chapter 2 Application Layer

Review of Previous Lecture

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 4

Chapter 2 Application Layer. Lecture 4: principles of network applications. Computer Networking: A Top Down Approach

EECS 3214: Computer Network Protocols and Applications

Goal and A sample Network App

Chapter 2: Application layer

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Lecture 04: Application Layer (Part 01) Principles and the World Wide Web (HTTP) Dr. Anis Koubaa

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

CSC 4900 Computer Networks: End-to-End Design

CMSC 322 Computer Networks Applications and End-To- End

CS 3516: Advanced Computer Networks

Application Layer: HTTP

DATA COMMUNICATOIN NETWORKING

Foundations of Telematics

Chapter 2 Application Layer

CSC358 Week 2. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Chapter 2 Application Layer

Protocol Layers, Security Sec: Application Layer: Sec 2.1 Prof Lina Battestilli Fall 2017

Web, HTTP and Web Caching

CMSC 332 Computer Networking Web and FTP

Lecture 11. Transport Layer (cont d) Transport Layer 1

Computer Networks and Applications

Computer Networks. Wenzhong Li. Nanjing University

Chapter II: Application Layer

Client/Server Computing

CS 3516: Advanced Computer Networks

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

HyperText Transfer Protocol

Chapter 2 Application Layer

Chapter 2 Application Layer

Client/Server Computing & Socket Programming

Chapter 1 Introduction

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

Chapter 2 Application Layer

Chapter 1 Introduction

SCS3004 Networking Technologies Application Layer Protocols

Networking. Layered Model. DoD Model. Application Layer. ISO/OSI Model

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Layered Model. DoD Model. ISO/OSI Model

1. What is a Computer Network? interconnected collection of autonomous computers connected by a communication technology

CSC 4900 Computer Networks:

Application Layer Protocols

CS4/MSc Computer Networking. Lecture 3: The Application Layer

Network Applications Principles of Network Applications

WWW: the http protocol

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Application Layer. Applications and application-layer protocols. Goals:

Chapter 2: Application Layer. Chapter 2: application layer. outline. Some network apps. Client-server architecture. Application architectures

Lecture 12. Application Layer. Application Layer 1

Client/Server Computing & Socket Programming

NWEN 243. Networked Applications. Transport layer and application layer

Hybrid of client-server and P2P. Pure P2P Architecture. App-layer Protocols. Communicating Processes. Transport Service Requirements

Deliver packets from srce to all other nodes Source duplication is inefficient: creation/transmission. in-network duplication

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Review for Internet Introduction

CSCD 330 Network Programming Spring 2018

EECS 3214: Computer Network Protocols and Applications

Lecture 7 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Application layer. Some network apps. Client-server architecture. Hybrid of client-server and P2P. Pure P2P architecture. Creating a network app

Different Layers Lecture 21

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

CS 43: Computer Networks. HTTP September 10, 2018

Applications & Application-Layer Protocols: The Web & HTTP

Module 2 Overview of Computer Networks

Module 2 Overview of. Computer Networks

Application Protocols and HTTP

Chapter 2. Application Layer. 2: Application Layer 1

Transport layer Internet layer

Computer Systems and Networks

Applications Layer Protocols. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

COSC4377. Chapter 2: Outline

Chapter 2 Application Layer

ECE 4450:427/527 - Computer Networks Spring 2017

CSEN 404 Introduction to Networks. Mervat AbuElkheir Mohamed Abdelrazik. ** Slides are attributed to J. F. Kurose

Chapter P2P file sharing network applications 2.22 Web and HTTP 2.3 FTP DNS

Introduction to Computer Networking. Guy Leduc. Chapter 2 Application Layer. Chapter 2: outline

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

Applications & Application-Layer Protocols: The Web & HTTP

Network Application. Topic. Principle of Network Application. Principle of Network Application

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START

CS 43: Computer Networks. Layering & HTTP September 7, 2018

Application Layer Protocols

Chapter 2 Application Layer

PLEASE READ CAREFULLY BEFORE YOU START

13. Internet Applications 최양희서울대학교컴퓨터공학부

Introduction to Computer Networking. Guy Leduc. Chapter 2 Application Layer. Chapter 2: outline

Chapter 2 Application Layer

Application Layer Introduction; HTTP; FTP

Data Communication & Computer Networks MCQ S

Networking: Application layer

COMPUTER NETWORK. Homework #1. Due Date: March 29, 2017 in class

Application Layer Chapter 2

Network and Mobile Compu4ng in the 20 th Century and Beyond. COMP 1400 Memorial University Winter 2015

Lecture 2 - Application Layer. Lecture 1 Review. Application Layer. Principles of network applications. Notes. Notes. Notes. Notes

Transcription:

Mobile network Chapter 2 The Yanmin Zhu Department of Computer Science and Engineering Global ISP Home network Regional ISP Institutional network CSE Department 1 CSE Department 2 Application layer - Overview Chapter 2: Principles of network applications Web and HTTP Electronic Mail SMTP, POP3, IMAP P2P applications Socket programming with UDP Socket programming with Our goals: conceptual, implementation aspects of network application protocols transport-layer service models client-server paradigm peer-to-peer paradigm learn about protocols by examining popular application-level protocols HTTP SMTP / POP3 / IMAP programming network applications socket API CSE Department 3 CSE Department 4 Some network apps e-mail web instant messaging remote login P2P file sharing multi-user network games streaming stored video clips social networks voice over IP real- video conferencing grid computing/cloud computing Creating a network appication write programs that run on (different) end systems communicate over network e.g., web server software communicates with browser software No need to write software for network-core devices Network-core devices do not run user applications applications on end systems allows for rapid app development, propagation application transport network data link physical application transport network data link physical application transport network data link physical CSE Department 5 CSE Department 6 1

Application layer: Roadmap Principles of network applications Web and HTTP Electronic Mail SMTP, POP3, IMAP P2P applications Socket programming with UDP Socket programming with Application architectures Client-server Including data centers / cloud computing Peer-to-peer (P2P) Hybrid of client-server and P2P CSE Department 7 CSE Department 8 Client-server architecture Google Data Centers client/server server: always-on host permanent IP address server farms for scaling clients: communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other CSE Department 9 Estimated cost of data center: $600M Google spent $2.4B in 2007 on new data centers Each data center uses 50-100 megawatts of power CSE Department 10 Pure P2P architecture no always-on server arbitrary end systems directly communicate peer-peer peers are intermittently connected and change IP addresses Highly scalable but difficult to manage Hybrid of client-server and P2P Skype voice-over-ip P2P application centralized server: finding address of remote party: client-client connection: direct (not through server) Instant messaging chatting between two users is P2P centralized service: client presence detection/location user registers its IP address with central server when it comes online user contacts central server to find IP addresses of buddies CSE Department 11 CSE Department 12 2

Processes communicating Sockets Process: program running within a host. within same host, two processes communicate using inter-process communication (defined by OS, e.g., pipe). processes in different hosts communicate by exchanging messages Client process: process that initiates communication Server process: process that waits to be contacted Note: applications with P2P architectures have client processes & server processes CSE Department 13 process sends/receives messages to/from its socket socket analogous to door sending process shoves message out door sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process host or server process socket with buffers, variables controlled by app developer controlled by OS Internet host or server process socket with buffers, variables API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this later) CSE Department 14 Addressing processes to receive messages, process must have identifier host device has unique 32-bit IP address Exercise: use ipconfig from command prompt to get your IP address (Windows) Q: does IP address of host on which process runs suffice for identifying the process? A: No, many processes can be running on same Identifier includes both IP address and port numbers associated with process on host. Example port numbers: HTTP server: 80 Mail server: 25 CSE Department 15 App-layer protocol defines Types of messages exchanged, e.g., request, response Message syntax: what fields in messages & how fields are delineated Message semantics meaning of information in fields Rules for when and how processes send & respond to messages Public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP, BitTorrent Proprietary protocols: e.g., Skype, ppstream CSE Department 16 What transport service does an app need? Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing some apps (e.g., Internet telephony, interactive games) require low delay to be effective Throughput some apps (e.g., muldia) require minimum amount of throughput to be effective other apps ( apps ) make use of whatever throughput they get Security Encryption, data integrity, Fun CSE Department 17 CSE Department 18 3

Transport service requirements of common apps Internet transport protocols services Application file transfer e-mail Web documents real- audio/video stored audio/video interactive games instant messaging Data loss loss-tolerant loss-tolerant loss-tolerant Throughput Time Sensitive no no no audio: 5kbps-1Mbps yes, 100 s msec video:10kbps-5mbps same as above yes, few secs few kbps up yes, 100 s msec yes and no CSE Department 19 service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control: sender won t overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum throughput guarantees, security UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, throughput guarantee, or security Q: why bother? Why is there a UDP? CSE Department 20 Internet apps: application, transport protocols Application layer: Roadmap Application e-mail remote terminal access Web file transfer streaming muldia Internet telephony Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] HTTP (eg Youtube), RTP [RFC 1889] SIP, RTP, proprietary (e.g., Skype) Underlying transport protocol or UDP typically UDP Principles of network applications Web and HTTP Electronic Mail SMTP, POP3, IMAP P2P applications Socket programming with UDP Socket programming with CSE Department 21 CSE Department 22 Web and HTTP HTTP overview First some jargon Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file, Web page consists of base HTML-file which includes several referenced objects Each object is addressable by a URL Example URL: www.someschool.edu/somedept/pic.gif host name path name HTTP: hypertext transfer protocol Web s application layer protocol client/server model client: browser that requests, receives, displays Web objects server: Web server sends objects in response to requests PC running Explorer Mac running Navigator Server running Apache Web server CSE Department 23 CSE Department 24 4

HTTP overview (continued) HTTP connections Uses : client initiates connection (creates socket) to server, port 80 server accepts connection from client HTTP messages (applicationlayer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) connection closed HTTP is stateless server maintains no information about past client requests aside Protocols that maintain state are complex! past history (state) must be maintained if server/client crashes, their views of state may be inconsistent, must be reconciled Non-persistent HTTP At most one object is sent over a connection. Persistent HTTP Multiple objects can be sent over single connection between client and server. CSE Department 25 CSE Department 26 Nonpersistent HTTP Suppose user enters URL (contains text, references to 10 www.someschool.edu/somedepartment/home.index jpeg images) 1a. HTTP client initiates connection to HTTP server (process) at www.someschool.edu on port 80 2. HTTP client sends HTTP request message (containing URL) into connection socket. Message indicates that client wants object somedepartment/home.index 1b. HTTP server at host www.someschool.edu waiting for connection at port 80. accepts connection, notifying client 3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket CSE Department 27 Nonpersistent HTTP (cont.) 5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. HTTP server closes connection. CSE Department 28 Non-Persistent HTTP: Response Persistent HTTP Definition of RTT: for a small packet to travel from client to server and back. Response : one RTT to initiate connection one RTT for HTTP request and first few bytes of HTTP response to return file transmission total = 2RTT+transmit initiate connection RTT request file RTT file received to transmit file CSE Department 29 Issues of Nonpersistent HTTP requires 2 RTTs per object OS overhead for each connection browsers often open parallel connections to fetch referenced objects Persistent HTTP server leaves connection open after sending response subsequent HTTP messages between same client/server sent over open connection client sends requests as soon as it encounters a referenced object as little as one RTT for all the referenced objects CSE Department 30 5

HTTP request message HTTP request message: general format two types of HTTP messages: request, response HTTP request message: ASCII (human-readable format) request line (GET, POST, HEAD commands) header lines GET /somedir/page.html HTTP/1.1 Host: www.someschool.edu User-agent: Mozilla/4.0 Connection: close Accept-language:fr Carriage return, line feed indicates end of message (extra carriage return, line feed) CSE Department 31 CSE Department 32 Uploading form input Method types Web page often includes form input Post method: Uses POST method Input is uploaded to server in entity body URL method: Uses GET method Input is uploaded in URL field of request line: www.somesite.com/animalsearch?monkeys&banana HTTP/1.0 GET POST HEAD asks server to leave requested object out of response HTTP/2.0 Next planned version HTTP/1.1 GET, POST, HEAD PUT uploads file in entity body to path specified in URL field DELETE deletes file specified in the URL field CSE Department 33 CSE Department 34 CSE Department 35 CSE Department 36 6