Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Internet Applications Chapter 7.

Slides:



Advertisements
Similar presentations
ICS 434 Advanced Database Systems
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.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
9/19/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 16 – Part 2 The World Wide Web The New Yorker, Peter Steiner, July 5, 1993.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Internet Applications R&G - Chapter 7 Lecture 15.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
12 Chapter 12 Client/Server Systems Hachim Haddouti.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Definitions, Definitions, Definitions Lead to Understanding.
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.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Internet Applications Chapter 7 Modified by Donghui Zhang.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Internet Applications Chapter 7.
I NTERNET A PPLICATIONS Chapter L ECTURE O VERVIEW Internet Concepts Web data formats HTML, XML, DTDs Introduction to three-tier architectures The.
Human-Computer Interface Course 5. ISPs and Internet connection.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 XML Taken from Chapter 7.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
FTP (File Transfer Protocol) & Telnet
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
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.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Database Application Development SQL In Application Code : 1. Embedded SQL 2. Database API’s 3. SQLJ.
1 Internet Applications Chapter 7, Section 7.1—7.5.
1 Welcome to CSC 301 Web Programming Charles Frank.
INTRODUCTION TO WEB APPLICATION Chapter 1. In this chapter, you will learn about:  The evolution of the Internet  The beginning of the World Wide Web,
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
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.
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.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
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.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
CS 6401 The World Wide Web Outline Background Structure Protocols.
Overview of Servlets and JSP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
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.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
Lecture # 1 By: Aftab Alam Department Of Computer Science University Of Peshawar Internet Programming.
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.
Distributed Control and Measurement via the Internet
Block 5: An application layer protocol: HTTP
WWW and HTTP King Fahd University of Petroleum & Minerals
Internet Applications
Chapter 1 Introduction to HTML.
Web Development Web Servers.
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Hypertext Transport Protocol
Introduction Web Environments
Web Technology and DBMSs
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
Chapter 27 WWW and HTTP.
Internet Applications
Chapter 16 The World Wide Web.
Kevin Harville Source: Webmaster in a Nutshell, O'Rielly Books
WEB SERVICES From Chapter 19, Distributed Systems
Web Programming : Building Internet Applications Chris Bates CSE :
Presentation transcript:

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Internet Applications Chapter 7

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke2 Uniform Resource Identifiers  Uniform naming schema to identify resources on the Internet  A resource can be anything:  Index.html  mysong.mp3  picture.jpg  Example URIs:

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke3 Structure of URIs  URI has three parts:  Naming schema (http)  Name of the host computer (  Name of the resource (~dbbook/index.html)  URLs are a subset of URIs

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke4 Hypertext Transfer Protocol  What is a communication protocol?  Set of standards that defines the structure of messages  Examples: TCP, IP, HTTP  What happens if you click on v Client (web browser) sends HTTP request to server v Server receives request and replies v Client receives reply; makes new requests

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke5 HTTP (Contd.) Client to Server: GET ~/index.html HTTP/1.1 User-agent: Mozilla/4.0 Accept: text/html, image/gif, image/jpeg Server replies: HTTP/ OK Date: Mon, 04 Mar :00:00 GMT Server: Apache/1.3.0 (Linux) Last-Modified: Mon, 01 Mar :23:24 GMT Content-Length: 1024 Content-Type: text/html Barns and Nobble Internet Bookstore Our inventory: Science The Character of Physical Law...

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke6 HTTP Protocol Structure HTTP Requests  Request line:GET ~/index.html HTTP/1.1  GET: Http method field (possible values are GET and POST)  ~/index.html: URI field  HTTP/1.1: HTTP version field  Type of client:User-agent: Mozilla/4.0  What types of files will the client accept: Accept: text/html, image/gif, image/jpeg

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke7 HTTP Protocol Structure (Contd.) HTTP Responses  Status line: HTTP/ OK  HTTP version: HTTP/1.1  Status code: 200  Server message: OK  Common status code/server message combinations : 200 OK: Request succeeded 400 Bad Request: Request could not be fulfilled by the server 404 Not Found: Requested object does not exist on the server 505 HTTP Version not Supported  Date when the object was created: Last-Modified: Mon, 01 Mar :23:24 GMT  Number of bytes being sent: Content-Length: 1024  What type is the object being sent: Content-Type: text/html  Other information such as the server type, server time, etc.

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke8 Some Remarks About HTTP  HTTP is stateless  No “sessions”  Every message is completely self-contained  No previous interaction is “remembered” by the protocol  Tradeoff between ease of implementation and ease of application development: Other functionality has to be built on top  Implications for applications:  Any state information (shopping carts, user login-information) need to be encoded in every HTTP request and response!  Popular methods on how to maintain state: Cookies Dynamically generate unique URL’s at the server level

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke9 Web Data Formats  HTML  The presentation language for the Internet  XML  A self-describing, hierarchal data model  DTD  Standardizing schemas for XML  XSLT  RDF  OWL

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke10 HTML: An Example Barns and Nobble Internet Bookstore Our inventory: Science The Character of Physical Law Author: Richard Feynman Published 1980 Hardcover Fiction Waiting for the Mahatma Author: R.K. Narayan Published 1981 The English Teacher Author: R.K. Narayan Published 1980 Paperback

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke11 HTML: A Short Introduction  HTML is a markup language  Commands are tags:  Start tag and end tag  Examples: …  Many editors automatically generate HTML directly from your document (e.g., Microsoft Word has an “Save as html” facility)

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke12 HTML: Sample Commands  :  : unordered list  : list entry  : largest heading  : second-level heading,, analogous  Title : Bold

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke13 XML – What is this? Science Hardcover Richard Feynman The Character of Physical Law 1980 Fiction R.K. Narayan Waiting for the Mahatma 1981 Fiction R.K. Narayan The English Teacher 1980

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke14 XML: An Example Richard Feynman The Character of Physical Law 1980 R.K. Narayan Waiting for the Mahatma 1981 R.K. Narayan The English Teacher 1980

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke15 XML – The Extensible Markup Language  Language  A way of communicating information  Markup  Notes or meta-data that describe your data or language  Extensible  Limitless ability to define new languages or data sets

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke16 XML – What’s The Point?  You can include your data and a description of what the data represents  This is useful for defining your own language or protocol  Example: Chemical Markup Language …  XML design goals:  XML should be compatible with SGML  It should be easy to write XML processors  The design should be formal and precise

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke17 DTD – Document Type Definition  A DTD is a schema for Xml data  Xml protocols and languages can be standardized with DTD files  A DTD says what elements and attributes are required or optional  Defines the formal structure of the language

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke18 DTD – An Example

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke19 XML and DTDs  More and more standardized DTDs will be developed  MathML  Chemical Markup Language  Allows light-weight exchange of data with the same semantics  Sophisticated query languages for XML are available:  Xquery  XPath

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke20 Components of Data-Intensive Systems Three separate types of functionality:  Data management  Application logic  Presentation  The system architecture determines whether these three components reside on a single system (“tier“) or are distributed across several tiers

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke21 The Three-Tier Architecture Database System Application Server Client Program (Web Browser) Presentation tier Middle tier Data management tier

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke22 The Three Layers Presentation tier  Primary interface to the user  Needs to adapt to different display devices (PC, PDA, cell phone, voice access?) Middle tier  Implements business logic (implements complex actions, maintains state between different steps of a workflow)  Accesses different data management systems Data management tier  One or more standard database management systems

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke23 Example 1: Airline reservations  Build a system for making airline reservations  What is done in the different tiers?  Database System  Airline info, available seats, customer info, etc.  Application Server  Logic to make reservations, cancel reservations, add new airlines, etc.  Client Program  Log in different users, display forms and human- readable output

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke24 Example 2: Course Enrollment  Build a system using which students can enroll in courses  Database System  Student info, course info, instructor info, course availability, pre-requisites, etc.  Application Server  Logic to add a course, drop a course, create a new course, etc.  Client Program  Log in different users (students, staff, faculty), display forms and human-readable output

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke25 Technologies Database System (Oracle,DB2,SQL Server) Application Server (Apache Tomcat, J2EE) Client Program (Web Browser) HTML Javascript XSLT JavaFX Flex, etc. JSP Servlets Cookies CGI XML Stored Procedures

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke26 Application Servers  Idea: Avoid the overhead of CGI  Main pool of threads of processes  Manage connections  Enable access to heterogeneous data sources  Other functionality such as APIs for session management

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke27 Application Server: Process Structure Process Structure Web BrowserWeb Server Application Server C++ Application JavaBeans DBMS 1 DBMS 2 Pool of Servlets HTTP JDBC ODBC