eCommerce Technology 20-751 Lecture 4: Web Architecture

27
20-751 ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 eCommerce Technology 20-751 Lecture 4: Web Architecture

description

eCommerce Technology 20-751 Lecture 4: Web Architecture. Server responds. Client makes requests. Client-Server Model. CLIENT (Often a Web browser). SERVER. INTERNET. TIER 2: SERVER. TIER 1: CLIENT. Server performs all processing. Web Server Application Server Database Server. - PowerPoint PPT Presentation

Transcript of eCommerce Technology 20-751 Lecture 4: Web Architecture

Page 1: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

eCommerce Technology20-751

Lecture 4: Web Architecture

Page 2: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Client-Server Model

INTERNET

CLIENT(Often a Web browser)

SERVER

Client makes requestsServer responds

Page 3: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Two-Tier Architecture

SOURCE: FOURNIER

TIER 1:CLIENT

TIER 2:SERVER Server performs

all processing

Web ServerApplication ServerDatabase Server

This architecture is obsolete. Server does too much work.

Page 4: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Three-Tier Architecture

TIER 1:CLIENT

TIER 2:SERVER

TIER 3:BACKEND

Application serveroffloads processing

to tier 3

SOURCE: FOURNIER

Web Server +Application Server

Note: Using 2 computers instead of 1 can result in a huge increase insimultaneous clients. Depends on % of CPU time spent on database access.

Page 5: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

N-Tier Architecture

SOURCE: FOURNIER

Achieves full separation of function and administrationHuge number of simultaneous clients

Managed andtuned by DBA

Optimized forweb pagedelivery

Coded forspecific

application

Page 6: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

InterShop Architecture

SOURCE: INTERSHOP

Page 7: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Connecting to Legacy Systemsby “Wrapping”

WebApp

Web ServerWeb Server

LegacyApp

MAINFRAMEMAINFRAME

“WRAPPER”

WrapperMiddleware

Page 8: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Connecting to Legacy Systems

The “screen scraper”

Client Web server Legacy database

Terminalscreen data

Screen scraper

Existing application

HTML data

HTMLdata

Legacy system(mainframe)

SOURCE: WIM GEVERS

Page 9: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Screen Scraping

• Some systems produce as their only output commands to 80 x 24 display terminals

• Sequences of characters telling the terminal to move its cursor and display data, e.g. ^M0238Jan. ^M024416, ^M02482000displays “Jan. 16, 2000” in row 2, starting at col. 38

• Screen scraping involves virtual simulation of the display terminal to retrieve the data

• Vendors

– Intelligent Environments

Page 10: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Document Repository

Office

Tool

Internet & Web

Web

Browser

DataWarehouse

Query

Tool

EnterpriseSystem

ERP

Client

ClientInformation

System

CRM

Client

Groupware Database

Groupware

Client

E N T E R P R I S E P O R T A L

Content DirectoryText Metadata

Embedded Services Web ToolsApplications

Portal ArchitecturePartnersEmployees Customers

SOURCE: PLUMTREE

Page 11: eCommerce Technology 20-751 Lecture 4: Web Architecture

Resources

User Interface

Feedback Customer Satisfaction

En

terp

rise

Po

rtal

Ser

vice

sR

eso

urc

es

S

ecu

rity

M

etri

cs

Integration

Navigation Methods

BrowseSearch

Communication Process

Publishing Distribution

BusinessRules

Personalization Customization

Information Architecturemetadata - organization services

KnowledgeBaseArchive

Document Stores

Public FoldersPersonnel HR Data Collaboration Search Index

LOBPortals

Portal Architecture

SOURCE: MIKE CRANDALL, GATES FOUNDATION

LOB = “LINE OF BUSINESS”

Page 12: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Server Farms

Web Servers

App Servers

DB Servers

Router

Intranet Firewall

Network Switch

Router

Internet Firewall

Network Switch

SOURCE: ATESTO

• To serve many clients, one server is not enough• How do multiple servers cooperate?

Page 13: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Communication

RequestRouting

Server Cluster (Server Farm)

Internet

Clients

Server farm

HTTP request

System Management

Router

SOURCE: CHU-SING YANG

Page 14: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Server Selection Problem

Which network site?

Which server?

“Contact the weather service.”

Server Farm A Server Farm B

• Avoid scalabilityproblems of central servers bydistributing load

SOURCE: JEFF CHASE

Page 15: eCommerce Technology 20-751 Lecture 4: Web Architecture

Load Balancing Switch

‧‧

‧‧

‧‧‧

‧‧‧

Internet

Web Switch

Router

Server Farm

subnethttp://pds.cse.nsysu.edu.tw/job/

SVR.1

SVR.2

SVR.n

client

Internet

subnet

Virtual IP address

SOURCE: CHU-SING YANG

Page 16: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Domain Names

• IP addresses are inconvenient to remember 128.2.218.2 v. euro.ecom.cmu.edu (fully qualified)

• Domain names are alphanumeric aliases for IP addresses. They form a tree structure of FQDNs:

ROOT

.GOV .COM .MIL .NET .EDU .ORG .IT

CMU PITT MITAMAZON MCKINSEY YAHOO

GSIA CS ECOM HEINZ

WWW YEN EURO DOLLAR PESO

207.237.113.94

128.2.218.2

208.216.182.15

128.2.218.4128.2.16.175

Page 17: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Domain Name System

What is the IP addressof abc.foo.com?

SOURCE: CISCO SYSTEMS

client

Local DNSResolver

Try .com

Root DNS

.com DNS

Try foo.comfoo.com DNS

abc.foo.com is 202.168.14.12

+ Cache

202.168.14.12

• Large, distributed, worldwide database• Maps domain names to IP addresses

Page 18: eCommerce Technology 20-751 Lecture 4: Web Architecture

URL-Based Load BalancingSubstring matching for:

• “images”• “.gif”• “.jpg”

GET/www.foo.com/event/reg.bin

GET /www.foo.com/images/abc.gif

GET /www.foo.com/product/abc.html

Load distributed within group via any standard metric or URL hashing

Substring matching for:• “.cgi”• “.bin”• “.exe”

Substring matching for:

• “.html”

• Servers optimized for specific content-types

• Substring match on URL directs HTTP requests to designated server farm

– Load balancing using configured algorithm or,

– URL Hashing forwards requests for each unique URL to same server to take advantage of server memory caching

SOURCE: SUN

Page 19: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

DNS Round Robin Balancing

“lookupwww.nhc.noaa.gov”

a

DNS server fornhc.noaa.gov

b c d

client networkDNS server

“www.nhc.noaa.gov isIP address a”

(or {b,c,d})Idea: When an IPaddress is requestedfor nhc.noaa.gov,return a differentIP address each time

SOURCE: JEFF CHASE

SERVER

CLIENT

Page 20: eCommerce Technology 20-751 Lecture 4: Web Architecture

Web Data Center

SOURCE: SUN

Page 21: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Global WAN Architecture

BIG-IP

Server Array

Webmaster

Site Inewyork.domain.com

Site IIItokyo.domain.com

Site IIlosangeles.domain.com

Userlondon.domain.com

Local DNS

DNS

GLOBAL-SITE

Router

BIG-IP

Internet

SOURCE: EDWARD CHOW

Page 22: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Client- and Server Side Programming

Client

Internet

Server

HTML

Dynamic HTML

Applets

ActiveX Controls

JavaScript

CGI/Perl, C

XML

ASP

Servlet

JSP

SOURCE: IIT

Page 23: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Tiers and URLs

WebServer DB

DB

Web app

Web app

Web app

Web app

http: // 10.0.0.1 / catalog / display.asp ? pg = 1 & product = 7

SOURCE: NTOBJECTIVES.COM

URLs can be used for application routing

Page 24: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

PHP Process Flow

Web

Server

PHP

Pre-

processor

.php

source

fileBrowserInternet

Request for .php file

Raw .php source

HTML is substituted for PHP code

HTML

SOURCE: M. HAMILLPHP originally mean “Personal Home Page”

Page 25: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Website Components

WebServer DB

DB

Web app

WebClient Web app

Web app

Web app

HTTPrequest

(cleartext or SSL)

HTTP reply(HTML,

Javascript, VBscript,

etc)

Plugins:•Perl•C/C++•JSP, etc

Database connection:•ADO,•ODBC, etc.

SQL Database

•Apache•IIS•Netscape etc…

Firewall

SOURCE: NTOBJECTIVES.COM

Page 26: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

Major Ideas

• Client-server model• Three-tiered (n-tiered) architecture• Legacy connections• Portals• Server Farms• Web development tools• Client- and server-side tools

Page 27: eCommerce Technology 20-751 Lecture 4: Web Architecture

20-751 ECOMMERCE TECHNOLOGY

FALL 2003

COPYRIGHT © 2003 MICHAEL I. SHAMOS

QA&