Traditional Internet Applications

Slides:



Advertisements
Similar presentations
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Advertisements

Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
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.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
INTRODUCTION TO WEB DATABASE PROGRAMMING
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Chapter 1: Introduction to Web
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
FTP (File Transfer Protocol) & Telnet
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.
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.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
World Wide Web Hypertext model Use of hypertext in World Wide Web (WWW) WWW client-server model Use of TCP/IP protocols in WWW.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
1 Welcome to CSC 301 Web Programming Charles Frank.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
Chapter 29 World Wide Web & Browsing World Wide Web (WWW) is a distributed hypermedia (hypertext & graphics) on-line repository of information that users.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
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.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
Website Design, Development and Maintenance ONLY TAKE DOWN NOTES ON INDICATED SLIDES.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
National College of Science & Information Technology.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Web fundamentals: Clients, Servers, and Communication
4.01 How Web Pages Work.
Distributed Control and Measurement via the Internet
Chapter 10: Web Basics.
Hypertext Transfer Protocol
Block 5: An application layer protocol: HTTP
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP – An overview.
Hypertext Transfer Protocol
CISC103 Web Development Basics: Web site:
Application layer 1 Principles of network applications 2 Web and HTTP
Computing with C# and the .NET Framework
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Hypertext Transport Protocol
CASE STUDY -HTML,URLs,HTTP
Net 323 D: Networks Protocols
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
CISC103 Web Development Basics: Web site:
Chapter 27 WWW and HTTP.
Net 323 D: Networks Protocols
HyperText Transfer Protocol
EE 122: HyperText Transfer Protocol (HTTP)
William Stallings Data and Computer Communications
PART 6 Application Layer
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction to World Wide Web
Internet Applications & Programming
CIS 133 mashup Javascript, jQuery and XML
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Presentation transcript:

Traditional Internet Applications Chapter 4 Traditional Internet Applications © Bobby Hoggard, Department of Computer Science, East Carolina University These slides may not be used or duplicated without permission

Private vs Standard Service Details needed to create client/server applications The syntax and semantics of messages that can be exchanged Whether the client or server initiates interaction Actions to be taken if an error arises How the two sides know when to terminate communication In defining these details, a programmer is defining an application-layer protocol

Private vs Standard Service Private Service You write both the client and server with the intention that no one else will be writing clients/servers for the service Make up your own rules of how they will communicate No need to write formal documentation on how the interaction works, since no one else needs to understand it Standardized Service Other programmers will be writing client/server applications A set of standards must be published so that apps can communicate correctly together

Representation / Transfer Data Representation Syntax of the data items Form used during transfer Translation of integers (big endian/little endian) Representation of characters (ASCII/Unicode/EBCDIC) Data Transfer Interaction between client and server Syntax of the message Error handling Termination of the interaction

Web Protocols HTML URL HTTP HyperText Markup Language A representation standard used to specify the contents and layout of a web page URL Uniform Resource Locator A representation standard that specifies the format and meaning of web page identifiers HTTP HyperText Transfer Protocol A transfer protocol that specifies how a browser interacts with a web server to transfer data

Heading HTML Heading Heading Specifies the syntax for a web page Scripting language --- not a programming language Specifies what needs to be done --- not how to do it The commands are general guidelines for a browser to follow Example: Headings Heading <H1> Heading </H1> No specification as to how large an H2 heading should be – just that it should be between H1 and H3 Heading <H2> Heading </H2> Heading <H3> Heading </H3>

HTML Browser view: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Welcome</title> </head> <body> <p> <strong>Hello</strong> world! </p> </body> </html> Browser view: Head contains: title meta tags (provides info about the document) links to CSS documents & embedded CSS styles links to import JavaScript & embedded scripts <!DOCTYPE html> this file is using HTML 5 <meta charset="utf-8" /> this file is using Unicode

URL Identifies the location of a web item (page, graphic, sound file, etc.) Format: Protocol :// ComputerName : Port / DocumentName ? Parameters The protocol to use for transfer Ex: HTTP, HTTPS, FTP IP Address or Domain Name Port where server is listening Name of the file to retrieve Parameters supplied to an executing function

URL Examples Visit ECU's web page www.ecu.edu http :// www.ecu.edu : 80 / default.html Default protocol is HTTP Default port is 80 Usually: default.html or index.html This is decided by the server

URL Examples Search YAHOO for the word "computers" https :// search.yahoo.com / search ? p=computers Asking for an encrypted transfer protocol Default port is 80 The name of their search function to execute The function requires a parameter named p and we're giving it a value of computers

HTTP Specifies how to handle the data transfer between the server and browser Four key points: Uses stream transfer Uses text-based control messages Transfers binary data files Can download or upload data Incorporates caching

HTTP Once a connection is established, the browser sends a request to the server Four major request types: Request Description Response GET Requests an item from the server Server sends a header and a copy of the item HEAD Requests an item's header from the server Server sends a header POST Sends data to the server Server appends the data to a specified item PUT Server uses the data to replace the specified item

The URL for the requested item HTTP Example Use GET to retrieve a web page from a web server Format: GET / item Version CR LF The URL for the requested item Usually version 1.0 or 1.1 The ASCII carriage return and line feed characters. Specifies the end of of the line

HTTP Example Visit the class website Browser Request: Server Response: GET http://rhoggard.cs.ecu.edu/rhoggard/ HTTP/1.1 CR LF Server Response: HTTP/1.1 200 OK Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Sun, 27 Jan 2019 19:48:57 GMT Content-Length: 5039 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> ... Header Section Content Section

Server Response Header Section contains: Status code HTTP version 200 = OK (no problems encountered) 404 = Item not found HTTP version Server type Date the item was last modified Length of the content (in bytes) Type of the item, examples: text/HTML text/plain text image/JPEG Header Section HEAD CR LF GET Content Section

HTTP POST vs PUT PUT is often used when you know the exact location of the item to be updated POST is often used when you don't know the exact location, and thus you let the server handle putting the data where it belongs Notice the exact location (including article number) Just specifies an address of "articles", but no specific number

Browser Caching Reduces download times Saves a copy of each server item requested onto the user’s disk Purpose is to use the cached copies instead of constantly redownloading the same items over and over again Note that it is possible to specify that an item should not be cached Algorithm: if (item is not in local cache) { issue a GET command to retrieve the item store a copy in local cache } else { issue a HEAD command to server if (date modified in header > date modified in cache copy) issue a GET command to retrieve the updated item store updated item in local cache use the cached copy

Browser Architecture Browsers are generally very complex They have to: output to display Browsers are generally very complex They have to: Interact with the user Interact with a server Understand various protocols and languages Format and display pages driver input from keyboard/ mouse controller HTML interpreter CSS interpreter HTTP client FTP client JavaScript interpreter network interface network connection

FTP Transfers binary or text files between two devices Key points: Uses stream transfer Uses text-based control messages Can transfer any type of file (documents, images, music, video, executables, etc.) Can download or upload data Supports authentication and ownership (files can have owners and access restrictions) Can browse folders (clients can obtain the contents of a directory) Hides details of individual computer operating systems

CARRIAGE RETURN + LINEFEED characters FTP Hides details of individual computer operating systems Filename differences .HTM / .JPG .HTML / .JPEG End of line LINEFEED character CARRIAGE RETURN + LINEFEED characters Directory separators / \ Users User "X" Different User "X"

FTP Uses TWO ports… server default port 21 for control messages and port 20 for the data transfer Active FTP Server Client Port 21 Random port Port 20 Client connects to the server for control messages Server connects to the client for data transfer (meaning the client temporarily acts like a server) Passive FTP Server Client Port 21 Random port Client connects to the server for control messages Client connects to the server for data transfer

Active FTP Example Server Client client forms a control connection to the server client sends a request for directory listing server forms a data connection to the client server sends directory listing server closes the data connection Connect to an FTP server, get a list of files and then retrieve one of them client sends request to download file server forms a data connection to the client server sends the requested file server closes the data connection Key: client sends a QUIT command to server control client closes the control connection data

Which Port? Server Client 21 client forms control connection random 20 server forms data connection random

Get File From Server Server Client client sends RETR message (request for file) choose a local port X BIND local port LISTEN for incoming wait to ACCEPT connection client sends PORT X message server CONNECTs to client on port X server SENDs requested file server closes the data connection

NAT (Network Address Translation) Active FTP can fail if the client computer is behind a NAT device Public Internet Private Network To 128.210.24.6 From 71.77.19.43 To 128.210.24.6 From 192.168.0.5 NAT Client Server To 71.77.19.43 From 128.210.24.6 To 192.168.0.5 From 128.210.24.6 128.210.24.6 71.77.19.43 192.168.0.5