260 likes | 486 Views
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. Two-Tier Architecture.
E N D
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 Two-Tier Architecture This architecture is obsolete. Server does too much work. SOURCE: FOURNIER
Three-Tier Architecture TIER 3: BACKEND TIER 2: SERVER TIER 1: CLIENT Application server offloads processing to tier 3 Web Server + Application Server Note: Using 2 computers instead of 1 can result in a huge increase in simultaneous clients. Depends on % of CPU time spent on database access. SOURCE: FOURNIER
N-Tier Architecture Optimized for web page delivery Coded for specific application Managed and tuned by DBA Achieves full separation of function and administration Huge number of simultaneous clients SOURCE: FOURNIER
InterShop Architecture SOURCE: INTERSHOP
Wrapper Middleware Connecting to Legacy Systemsby “Wrapping” “WRAPPER” Web Server MAINFRAME Web App Legacy App
Connecting to Legacy Systems The “screen scraper” Legacy system(mainframe) Terminalscreen data HTML data HTMLdata Screen scraper Existing application Legacy database Web server Client SOURCE: WIM GEVERS
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
ERP Client CRM Client Office Tool Groupware Client Query Tool Web Browser Embedded Services Partners Employees Customers Content Directory Applications Web Tools Text Metadata Client Information System EnterpriseSystem Document Repository Groupware Database DataWarehouse Internet & Web Portal Architecture E N T E R P R I S E P O R T A L SOURCE: PLUMTREE
Portal Architecture LOB = “LINE OF BUSINESS” SOURCE: MIKE CRANDALL, GATES FOUNDATION
Router Router Web Servers Server Farms • To serve many clients, one server is not enough • How do multiple servers cooperate? Network Switch Network Switch Internet Firewall Intranet Firewall DB Servers App Servers SOURCE: ATESTO
Internet Server Cluster (Server Farm) Clients HTTP request Router Request Routing Communication Server farm System Management SOURCE: CHU-SING YANG
Server Selection Problem Server Farm A Server Farm B Which server? • Avoid scalabilityproblems of central servers bydistributing load Which network site? “Contact the weather service.” SOURCE: JEFF CHASE
subnet subnet ‧ ‧ ‧ ‧ ‧ ‧ Internet Internet ‧ ‧ ‧ ‧ Load Balancing Switch client http://pds.cse.nsysu.edu.tw/job/ Server Farm Router SVR.1 SVR.2 Web Switch Virtual IP address SVR.n SOURCE: CHU-SING YANG
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 MIT AMAZON MCKINSEY YAHOO 208.216.182.15 207.237.113.94 GSIA CS ECOM HEINZ WWW YEN EURO DOLLAR PESO 128.2.218.4 128.2.218.2 128.2.16.175
client Domain Name System • Large, distributed, worldwide database • Maps domain names to IP addresses What is the IP address of abc.foo.com? Root DNS 202.168.14.12 .com DNS Try .com Try foo.com foo.com DNS Local DNS Resolver abc.foo.com is 202.168.14.12 + Cache SOURCE: CISCO SYSTEMS
URL-Based Load Balancing • Substring matching for: • “images” • “.gif” • “.jpg” Load distributed within group via any standard metric or URL hashing GET /www.foo.com/images/abc.gif • Substring matching for: • “.cgi” • “.bin” • “.exe” GET/www.foo.com/event/reg.bin GET /www.foo.com/product/abc.html • 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 Hashingforwards requests for each unique URL to same server to take advantage of server memory caching SOURCE: SUN
DNS Round Robin Balancing SERVER a b c d DNS server for nhc.noaa.gov “www.nhc.noaa.gov is IP address a” (or {b,c,d}) Idea: When an IP address is requested for nhc.noaa.gov, return a different IP address each time CLIENT “lookup www.nhc.noaa.gov” client network DNS server SOURCE: JEFF CHASE
Web Data Center SOURCE: SUN
Global WAN Architecture Site II losangeles.domain.com Internet Site I newyork.domain.com Router DNS BIG-IP BIG-IP Local DNS GLOBAL-SITE Webmaster Site III tokyo.domain.com Server Array User london.domain.com SOURCE: EDWARD CHOW
Internet Client- and Server Side Programming Server Client HTML CGI/Perl, C Applets ASP ActiveX Controls Servlet Dynamic HTML JSP JavaScript XML SOURCE: IIT
Tiers and URLs URLs can be used for application routing http: // 10.0.0.1 / catalog / display.asp ? pg = 1 & product = 7 Web Server Web app DB Web app DB Web app Web app SOURCE: NTOBJECTIVES.COM
PHP Process Flow Raw .php source HTML is substituted for PHP code PHP Pre- processor Browser Web Server HTML .php source file Internet Request for .php file PHP originally mean “Personal Home Page” SOURCE: M. HAMILL
Website Components SQL Database HTTP request (cleartext or SSL) Firewall Web Client Web Server Web app DB Web app DB Web app Web app HTTP reply (HTML, Javascript, VBscript, etc) • Apache • IIS • Netscape • etc… • Plugins: • Perl • C/C++ • JSP, etc • Database connection: • ADO, • ODBC, etc. SOURCE: NTOBJECTIVES.COM
Major Ideas • Client-server model • Three-tiered (n-tiered) architecture • Legacy connections • Portals • Server Farms • Web development tools • Client- and server-side tools