1999 5年 月Shinewave International
Introduction to N-Tier Architecture
1999 5年 月Shinewave International
3-tier架構(Presentation,Logic,DB Access)
Application(Browser)
ActiveXControl
Client Site(UI/Win95)
ApplicationServer
DBServer
Middle Site(MTS/NT)
Server Site (SQL/NT)
ServerApplication
1999 5年 月Shinewave International
N-tier 示意圖
Browser
WebLoad
BalanceBrowserBrowser
WebServer
WebServer
WebServer
APServer
APServer
APServer
APServer
MessageQueue
DBServer
OtherSystem
1999 5年 月Shinewave International
Gaining a Perspective
• Approach• Focus Primarily on Interactive Applications• Start With a Bit of History• Explain Emergence of Web App Servers• Explain Transition to App Servers• Explain Where ND Fits
1999 5年 月Shinewave International
Gaining a Perspective
A Bit of History
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Timeline• 70’s-Early 90’s: No Widespread Access to Internet• 70’s-80’s: Green Screen Era• Late 80’s: Dawn of the PC Era• Mid-90’s: Internet Emerges• Meantime, Client/Server Evolves• Late 90’s: HTTP/HTML Spill Over into Corporate Intranets
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Timeline
1970'sGreen Screen
TerminalsDominate
1980's-Early '90'sPC's and GUIs
Dominate
Mid-90'sWeb
Explodes
TodayBrowserClients
TomorrowDiverseClients
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• 70’s-80’s: Age of the Green Screen
Monitor
327x
IBM Mainframe- Proprietary OS: S370- Classic TP Monitor: CICS- Proprietary Databases
Monitor
327x
Green Screen Terminals:- Dedicated to Specific Backend System
- No Local Software
Monitor
Other TerminalsMinicomputer- Proprietary OS- Proprietary Databases
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• 70’s-80’s: Age of the Green Screen• Backend Systems: Diverse OS’s, Classic TP Monitors, DBs,
Closed Apps• Terminals Dedicated to Specific Systems• Difficult to Tie Together Diverse Backend Systems• No GUI Capability on Client• No Software Distribution Cost to Clients• Technologies Limited to Business Networks
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Late 80’s-Mid 90’s: PC Era
Mac
UNIX Workstation
LAN Server
PC LAN
PC
AppletalkLAN
Mainframe
TCP/IPLAN
DB
Tandem
DB
Diverse Backend Databases:- PC Clients Connect to Each DB
- Integration Business Logic on Client
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Late 80’s-Mid 90’s: PC Era• GUI Builders
• Sophisticated GUI Building Tools (RAD)• Easy-to-Use Tools• OOP Emerges on Client• Attempts at Cross Platform• Run Terminal Emulators on Client
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Late 80’s-Mid 90’s: PC Era• Client Connections to RDBMS and Backend Services
• 2 Tier• Client App Uses RDBMS Client APIs• Inefficient Use of DB Connections• Places Lots of Business Logic on Client• Client App’s Responsibility to Integrate Diverse Backend
Systems
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Late 80’s-Mid 90’s: PC Era• Client Connections to New Generation TP Monitors
TCP/IPLAN
PC
Mainframe
Tandem
TP Monitors:- PC Clients Connect to TP Monitor- Integration Business Logic on TP Monitor- TP Monitor Coordinates Transactions
- Client PC Write to TP Monitor Libraries
DB
UNIX
DB
TCP/IPLAN
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Late 80’s-Mid 90’s: PC Era• Client Connections to New Gen TP Monitors
• 3-Tier• Client App Uses TP Monitor API• TP Monitors Pool DB Connections• Distributed Txns Coordinated by TP Monitors• TP Monitor Acts as Integration Point for Backend Systems • Movement of Some Business Logic from Client to TP
Monitor• TP Monitors Usually Expensive
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Late 80’s-Mid 90’s: PC Era• Common Problems
• Software Distribution• Client Platform Lock-in• Limited to Business Networks
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Mid-90’s: Internet Emerges
CorporateIntranet
PC Mainframe
Tandem
ERPDB
UNIX TP MonitorsPublic
Internet
PC
Firewalls
Masses on the Internet- ISPs- Browser-Based Access- Debut of JavaISPs
Web Servers
Corporate Intranets- Firewalls- Browsers- Web Servers- Internet Access
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Mid-90’s: Internet Emerges• HTTP: Widespread, Platform-Independent Wire Protocol• HTML: Proven Very Quickly, Browser Adoption Happens Fast• Java: Applets Provide Intro for JVMs• ISPs: Provide Widespread Access Using Simple Tools• Businesses Start to Experiment with the Web
• Companies Begin to Experiment with Corporate Web Presence on Public Internet
• Still Inhibitors to Services on the Net• Security• Infrastructure Software: Web Servers Limited
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Meantime, Some Middleware Evolves• Slow Evolution, No Push Like HTML, HTTP• CORBA and Object Request Brokers (ORBs) Emerge• Message Queuing Software Emerges as Back Office
Integration Tool• ORBs Become Refined and Accepted, But Difficult to Program
Against• IIOP Isn’t Generally Accepted on the Public Internet
1999 5年 月Shinewave International
Gaining a Perspective:Bit of History
• Late 90’s: HTTP/HTML Spill Over Into Corporate Intranets• TCP/IP Migration of Early 90’s Sets the Stage• Driver: Admin of Clients is Very Expensive• Usefulness of HTTP/HTML and Browsers Already
Demonstrated on the Public Internet• Skilled Internet Developers Become Available• Backend Integration Starting to Become Possible via Web
Servers• CGI Programming• Servlets
1999 5年 月Shinewave International
Gaining a Perspective
Emergence of Web Application Servers
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Low End Approaches to Web Applications• What is a Web Application Server?• Why Did They Emerge?• How Do They Differ from…
• Web Servers?• TP Monitors?
• Transition to Application Servers
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Low End Approaches to Web Applications
Web Server Tier
Lightweight Business LogicPresentation Logic
BrowserHTML
Web ServerWeb Server
StaticContent
CGI
BrowserApplet
Servlets
JSPASP
Backend Resources
RDBMS
ExistingBusinessSystems
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Low End Approaches to Web Applications• JavaScript on Browser• Free Web Servers• Server Side Logic
• CGI• Servlets• Server Side JavaScript
• HTML Templates• ASP/IIS• JavaWebServer
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Low End Approaches to Web Applications• Limitations
• Limited Web Application Event Model• How Does One Easily Associate Button Click w/Server-
Side Business Logic?
• Lack of Robust Session Support• Beyond Cookies and URL Rewriting• Control Page Navigation• Support Session Access Across Servers
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Low End Approaches to Web Applications• Limitations
• No Easy Applet-Server Communication• Applets Using RMI or IIOP
• Must Build Server-Side Support• No Convenient Home for New Business Logic
• Limited Java Support• Might Not Want Business Logic on Web Server Tier
• Performance Considerations• Security Considerations: DMZ• Awkward to Reuse Business Logic for Non-Web Apps
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Low End Approaches to Web Applications• Limitations
• Limited Scalability/Load Distribution• Constrained by Web Server• No Sharing of Resources Amongst Web Servers• Must Rely Solely on Load Balancing in Front of Web
Server Tier
• No Easy Backend Integration• Few Tools to Ease Integration
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Role of Web Application Server
Web Server Tier
BrowserHTML
Web ServerWeb Server
BrowserApplet
Backend Resources
RDBMS
ExistingBusinessSystems
HTTP/HTTPS
IIOP
Web Application Server Tier
IIOPProxy
HTTP/HTTPS
DynamicPage
Generation
BusinessLogic
IntegrationLayer
Management
ERPSystems
CICS
TP MonitorsObject Framework
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• What is a Web App Server?• Oriented Towards Interactive Web-Based Applications
• Degree of Presentation Logic and Business Logic• Place to Deploy New Business Logic
• New Point of Integration• Situated Between Web Server and Backend Systems
• Provides Backend System Access• RDBMS, TP Monitors, Business Systems
• Provides Sophisticated Session Management• Support High Availability
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• Why Did Web App Servers Emerge?• TP Monitor Vendors Slow to Latch on to Web
• Not Moving at Speed of Web• Harder to Port than Java-Based App Servers
• Difficult to Build Business Apps on top of CORBA• Confluence of:
• Web-Based Apps Becoming De-facto New Model for Interactive Systems
• Hard to Program in Web Server Tier• Java JVMs Maturing, Acceptance of Java• Server Side Java Maturing• ORBs Stabilizing
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• How Does an Web App Server Differ from a Web Server?• App Server Designed for Integration Role
• Meant to be a Platform for Java-Based Business Logic• Meant to Separate Presentation Logic from Business Logic
• Web Servers Designed for Serving Static Content• Dynamic Content and Heavy Business Logic is Awkward
• Web Server Not Designed for Non-HTTP• Web Server Still Has Useful Role
• Great for Static Content• Sits in DMZ: Is Accessible to Internet Clients• Good/Inexpensive for Lightweight Business Logic
• Some Web App Servers Also Serve Static HTML
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
• How Does a Web App Server Differ from a TP Monitor?• Hybrid of Web and Backend Integration• Supports Java/OOP• Infrastructure Typically Based on CORBA• TP Monitor is Hybrid of Old Client Server and Backend
Integration• Similarities
• Web App Servers Moving to Distributed Transactional Support
• Both Pool Connections
• Both Support Session/Context Management
• Both Oriented towards HA
• Geared Towards Enterprises
1999 5年 月Shinewave International
Gaining a Perspective:Emergence of Web App Servers
Web AppServers
EnterpriseApp
Integration(EAI)
TP Monitors
Web Cients
Request/Reply
- RPC- Messaging- Txn Coordination
- Business Systems