The Web as a Client-Server System; TCP/IP intro!

Similar documents
CS169.1x Lecture 5: SaaS Architecture and Introduction to Rails " Fall 2012"

Introduction to Web Technologies


Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Web Development I & II*

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

IT3503 Web Development Techniques (Optional)

Modern Web Development From Angle Brackets to Web Sockets

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

10CS73:Web Programming

Introduction to web development

WEB DEVELOPMENT IA & IB (893 & 894)

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

Macromedia Dreamweaver 8 Developer Certification Examination Specification

What is a Web Browser? Web Site Functionality. A client program that uses HTTP to communicate with web servers.

ERIE COMMUNITY COLLEGE COURSE OUTLINE A. COURSE TITLE: CS WEB DEVELOPMENT AND PROGRAMMING FUNDAMENTALS

IT3504: Web Development Techniques (Optional)

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

LabVIEW Internet Toolkit User Guide

CONTENT of this CHAPTER

Web Programming. Robert M. Dondero, Ph.D. Princeton University

ERIE COMMUNITY COLLEGE COURSE OUTLINE A. COURSE NUMBER CS WEB DEVELOPMENT & PROGRAMMING I AND TITLE:

Network Technologies

S y s t e m A r c h i t e c t u r e

DEPLOYMENT GUIDE Version 2.1. Deploying F5 with Microsoft SharePoint 2010

Fast track to HTML & CSS 101 (Web Design)

New Feature: Populate from TMDb, versus enter information by hand Need to add ability to search TMDb from Rotten Potatoes home page Need LoFi UI and

Introduction to web development and JavaScript

Web Foundations Series Internet Business Associate

The Web History (I) The Web History (II)

Instructor: Betty O Neil

SWE 444 Internet and Web Application Development. Introduction to Web Technology. Dr. Ahmed Youssef. Internet

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

If your organization is not already

Front-End Performance Testing and Optimization

Large-Scale Web Applications

IP Phone Presence Setup

M3-R3: INTERNET AND WEB DESIGN

World Wide Web. Before WWW

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Web Browsing Examples. How Web Browsing and HTTP Works

Oct 15, Internet : the vast collection of interconnected networks that all use the TCP/IP protocols

Basic Internet programming Formalities. Hands-on tools for internet programming

Connecting with Computer Science, 2e. Chapter 5 The Internet

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

Programming exercises (Assignments)

VB.NET - WEB PROGRAMMING

Domain Name System (DNS)

Chapter 4: Networking and the Internet

CS514: Intermediate Course in Computer Systems

Lecture (02) Networking Model (TCP/IP) Networking Standard (OSI) (I)

Dreamweaver CS5. Module 1: Website Development

Web Application Development

Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches

Lecture 2. Internet: who talks with whom?

CSCI110: Examination information.

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

Interactive Data Visualization for the Web Scott Murray

architecture: what the pieces are and how they fit together names and addresses: what's your name and number?

Syllabus INFO-UB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Web application development landscape: technologies and models

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

Debugging JavaScript and CSS Using Firebug. Harman Goei CSCI 571 1/27/13

PROJECT MANAGEMENT SYSTEM

Server-Side Scripting and Web Development. By Susan L. Miertschin

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

Checklist of Best Practices in Website

Web Design Specialist

Kentico CMS, 2011 Kentico Software. Contents. Mobile Development using Kentico CMS 6 2 Exploring the Mobile Environment 1

COURSE CONTENT FOR WINTER TRAINING ON Web Development using PHP & MySql

Beyond Web Application Log Analysis using Apache TM Hadoop. A Whitepaper by Orzota, Inc.

Internet Technologies_1. Doc. Ing. František Huňka, CSc.

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP System v10 with Microsoft IIS 7.0 and 7.5

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM System with VMware View

Deploying the BIG-IP System v10 with VMware Virtual Desktop Infrastructure (VDI)

Outline. CIW Web Design Specialist. Course Content

HTML and CSS. Elliot Davies. April 10th,

CLASSROOM WEB DESIGNING COURSE

Chapter 27 Hypertext Transfer Protocol

Computer Science Course Descriptions Page 1

Developing ASP.NET MVC 4 Web Applications MOC 20486

Working With Virtual Hosts on Pramati Server

Course Descriptions. preparation.

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

DEPLOYMENT GUIDE Version 1.1. Deploying F5 with IBM WebSphere 7

Progressive Enhancement With GQuery and GWT. Ray Cromwell

Chapter 6 Virtual Private Networking Using SSL Connections

Application Layer -1- Network Tools

Web Application diploma using.net Technology

4.2 Understand Microsoft ASP.NET Web Application Development

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

Lecture 11 Web Application Security (part 1)

Transcription:

The Web as a Client-Server System; TCP/IP intro! Engineering Software as a Service 2.1 2.2" Armando Fox! 2013 Armando Fox & David Patterson, all rights reserved 1!

2!

Web at 100,000 feet! The web is a client/server architecture! It is fundamentally request/reply oriented! Web browser Internet Web site

Nuts and bolts: TCP/IP protocols! IP (Internet Protocol) address identifies a physical network interface with four octets, e.g. 128.32.244.172 Special address 127.0.0.1 is this computer, named localhost, even if not connected to the Internet!! TCP/IP (Transmission Control Protocol/Internet Protocol)! IP: no-guarantee, best-effort service that delivers packets from one IP address to another! TCP: make IP reliable by detecting dropped packets, data arriving out of order, transmission errors, slow networks, etc., and respond appropriately! TCP ports allow multiple TCP apps on same computer! Vint Cerf & Bob Kahn: 2004 Turing Award for Internet architecture & protocols, incl. TCP/IP! GET /bears/ HTTP/0.9 200 OK GET /bears/ HTTP/0.9 200 OK

Web at 100,000 feet! The web is a client/server architecture! It is fundamentally request/reply oriented! Domain Name System (DNS) is another kind of server that maps names to IP addresses! Web browser Web site DNS server

Now that we re talking, what do we say? Hypertext Transfer Protocol! an ASCII-based request/reply protocol for transferring information on the Web! HTTP request includes:! request method (GET, POST, etc.)! Uniform Resource Identifier (URI)! HTTP protocol version understood by the client! headers extra info regarding transfer request! HTTP response from server! Protocol version & Status code =>! Response headers! Response body! HTTP status codes: 2xx all is well 3xx resource moved 4xx access problem 5xx server error

Cookies! Observation: HTTP is stateless" Early Web 1.0 problem: how to guide a user through a flow of pages?! use IP address to identify returning user? public computers, users sharing single IP! embed per-user junk into URI query string? breaks caching! Quickly superseded by cookies" Watch: screencast.saasbook.info! Rails manages tamper-evident cookies for you!

A can create and modify cookies; the is responsible for including the correct cookie with each request Browser; SaaS app SaaS app; browser HTTP request; browser SaaS app; HTTP response 8!

HTML+CSS Engineering Software as a Service 2.3 Armando Fox! 2013 Armando Fox & David Patterson, all rights reserved 9!

10!

Introduction This article is a review of the book Dietary Preferences of Penguins, by Alice Jones and Bill Smith. Jones and Smith's controversial work makes three hard-to-swallow claims about penguins: First, that penguins actually prefer tropical foods such as bananas and pineapple to their traditional diet of fish Second, that tropical foods give penguins an odor that makes them unattractive to their traditional predators

<h1>introduction</h1> <p> This article is a review of the book <i>dietary Preferences of Penguins</i>, by Alice Jones and Bill Smith. Jones and Smith's controversial work makes three hard-to-swallow claims about penguins: </p> <ul> <li> First, that penguins actually prefer tropical foods such as bananas and pineapple to their traditional diet of fish </li> <li> Second, that tropical foods give penguins an odor that makes them unattractive to their traditional predators </li> </ul>... CS 142 Lecture Slide Notes: 12! HTML!

Introduction This article is a review of the book Dietary Preferences of Penguins, by Alice Jones and Bill Smith. Jones and Smith's controversial work makes two hard-to-swallow claims about penguins:... First, that penguins actually prefer tropical foods such as bananas and pineapple to their traditional diet of fish Second, that tropical foods give penguins an odor that makes them unattractive to their traditional predators <h1>introduction</h1> <p> This article is a review of the book <i>dietary Preferences of Penguins</i>, by Alice Jones and Bill Smith. Jones and Smith's controversial work makes three hard-to-swallow claims about penguins: <ul> <li> First,...

Hypertext Markup Language! Document = Hierarchy of elements! inline (headings, tables, lists, paragraphs)! embedded (images, JavaScript)! forms allow user to submit simple input (text, radio/check buttons, dropdown menus...)! Elements delimited by <tag>...</tag> Some have content: <p>hello world</p> Some have attributes: <img src="http://..."> id and class attributes useful for styling!

Cascading Style Sheets (CSS) separate content from presentation! <link rel="stylesheet" href="http://..."/> (inside <head> element): what stylesheet(s) go with this HTML page! HTML id & class attributes important in CSS! id must be unique within this page! same class can be attached to many elements! <div id="right" class="content"> <p> I'm Armando. I teach CS169 and do research in the AMP Lab and Par Lab. </p> </div>

CSS Selectors identify specific elements for styling" <div class="pageframe" id="pagehead"> <h1> Welcome, <span id="custname">armando</span> </h1> <img src="welcome.jpg" id="welcome"/> </div> tag name: h1 class name:.pageframe element ID: #pagehead tag name & class: div.pageframe both of these match the outer div above. Don t do this!! tag name & id: img#welcome (usually redundant)! descendant relationship: div.custname Attributes inherit browser defaults unless overridden! Goal: HTML markup contains no visual styling information"

Which CSS selector will select only the word bar for styling:! <p class="myclass">foo, <span class="myclass">bar<span></p> span.myclass p.myclass.myclass span All of these 17!

3-tier shared-nothing architecture & scaling! Engineering Software as a Service 2.4! Armando Fox! 2013 Armando Fox & David Patterson, all rights reserved 18!

19!

Dynamic content generation! In the Elder Days, most web pages were (collections of) plain old files! But most interesting Web 1.0/e-commerce sites run a program to generate each page " Originally: templates with embedded code snippets! Eventually, code became tail that wagged the dog and moved out of the Web server!

Sites that are really programs (SaaS)! How do you:! map URI to correct program & function?! pass arguments?! invoke program on server?! handle persistent storage?! handle cookies?! handle errors?! package output back to user?! Frameworks support these common tasks" Filesystem or database persistence your app logic (app) Common Gateway Interface (CGI) presentation (Web server) client (browser)

Developer environment vs. medium-scale deployment! MySQL! file.sqlite3! SQLite adapter! Rails library! rack! Webrick! MySQL adapter! Rails library! MySQL adapter! Rails library! MySQL adapter! Rails library! rack! rack! rack! thin! thin! thin! Page cache! Developer PostgreSQL! Apache w/mod_rails + caching mode! Medium-scale deployment Database! cache! Dynos running apps HTTP servers & static asset caches! Large-scale curated deployment, e.g. Heroku

Sharding vs. Replication! Partition data across independent shards?! + Scales great! Bad when operations touch >1 table! Example use: user profile! Replicate all data everywhere?! + Multi-table queries fast! Hard to scale: writes must propagate to all copies => temporary inconsistency in data values! Example: Facebook wall posts/ likes! 23 App server! App server! App server! App server! App server! App server! users A-J! users K-R! users S-Z! All users! All users! All users!

Summary: Web 1.0 SaaS! Browser requests web resource (URI) using HTTP! HTTP is a simple request-reply protocol that relies on TCP/IP! In SaaS, most URI s cause a program to be run, rather than a static file to be fetched! HTML is used to encode content, CSS to style it visually! Cookies allow server to track client! Browser automatically passes cookie to server on each request! Server may change cookie on each response! Typical usage: cookie includes a handle to server-side information! That s why some sites don t work if cookies are completely disabled! Frameworks make all these abstractions convenient for programmers to use, without sweating the details!...and help map SaaS to 3-tier, shared-nothing architecture!

Match the terms: (a) presentation tier, (b) logic tier, (c) persistence tier (a) Apache web server (b) Rack+Rails (c) Relational database (a) Firefox (b) Apache web server (c) PostgreSQL (a) Microsoft Internet Information Server (b) Rack+Rails (c) Apache web server (a) Firefox (b) Microsoft Internet Information Server (c) MySQL 25!