Advanced Distributed Software Architectures and Technology group ADSaT 1 Application Architectures Ian Gorton, Paul Greenfield.

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

Netscape Application Server Application Server for Business-Critical Applications Presented By : Khalid Ahmed DS Fall 98.
Time Scalability Single User Unlimited Users 100s of Users Several Users PC based Single user Late 1980sNow PC based, file-level locking Single user or.
Technical Architectures
ISYS 546 Client/Server Database Application Development.
BICS546 Client/Server Database Application Development.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
DATABASE APPLICATION DEVELOPMENT SAK 3408 The Web and DBMS.
Introduction to Web Database Processing
Chapter 13 Physical Architecture Layer Design
Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need.
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Time Scalability Single User Unlimited Users 100s of Users Several Users PC based Single user Late 1980sNow PC based, file-level locking Single user or.
Introduction to Web Interface Technology (CSE2030)
Copyright © 2002 Pearson Education, Inc. Slide 4-1 Choosing the Hardware for an E-commerce Site  Hardware platform  Refers to all the underlying computing.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Introduction to Web Interface Technology (CSE2030)
Advanced Distributed Software Architectures and Technology group ADSaT 1 Scalability & Availability Paul Greenfield CSIRO.
12-1 © Prentice Hall, 2004 Chapter 12: Design Elements Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Lecture The Client/Server Database Environment
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
The Client/Server Database Environment
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Web-based Software Development - An introduction.
Client/Server Architectures
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
Week 7 Lecture Web Database Development Samuel Conn, Asst. Professor
CIS 285 ROBINSON WINTER 2005 CIS 285 Web Application Development with Java CIS 285 Sinclair Community College Instructor: Mary Robinson.
PowerTier EJB in High-Performance Applications John Killoran European Technical Services Manager Persistence Software.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
Introduction to Internet Programming (Web Based Application)
Internet, intranet, and multimedia database processing l Database processing across local and wide area networks l Alternative architectures for distributing.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
E-Learning Material Web Application Design 3. Web Application Design Architecture Which objects go where? The final model notation Summary.
J2EE Structure & Definitions Catie Welsh CSE 432
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
DEV-5: Introduction to WebSpeed ® Stephen Ferguson Sr. Training Program Manager.
Csi315csi315 Client/Server Models. Client/Server Environment LAN or WAN Server Data Berson, Fig 1.4, p.8 clients network.
Unit – I CLIENT / SERVER ARCHITECTURE. Unit Structure  Evolution of Client/Server Architecture  Client/Server Model  Characteristics of Client/Server.
Implementation - Part 2 CPS 181s March 18, Pieces of the Site-building Puzzle Page 180, figure 4.1.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP.
March 24, 2004Craig E. Ward, CMSI 698 Advanced Topics in Database Systems Database Architecture Overview Client-Server and Distributed Architectures.
An Overview of Architectures for Web-Based Application Systems Instructor: Dr. Jerry Gao San Jose State University URL:
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
14 1 Chapter 14 Web Database Development Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Database Connectivity and Server-Side Scripting Chapter 12.
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Building J2EE Applications Based on Design Patterns with Business Components for Java Olivier LE DIOURIS Principal Product Manager Oracle Corporation.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
Web-based Software Development - An introduction
Netscape Application Server
Introduction to J2EE Architecture
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Component-based Applications
Presentation transcript:

Advanced Distributed Software Architectures and Technology group ADSaT 1 Application Architectures Ian Gorton, Paul Greenfield

Advanced Distributed Software Architectures and Technology group ADSaT 2 Aim Cover some typical N-tier application architectures Look at their strengths and weaknesses Look at a sample complex application

Advanced Distributed Software Architectures and Technology group ADSaT 3 N-Tier Applications Layered Architectures –Client layer taking care of user interfaces –Some number of business logic layers implementing business processes and rules –Data layer for accessing data and implementing data integrity rules

Advanced Distributed Software Architectures and Technology group ADSaT 4 N-tier Architectures Client layer –Static Web pages –Web-based through CGI programs –Active client-side Web pages Scripting and applets –Active server-side Web pages –Traditional client applications –Background/batch processes

Advanced Distributed Software Architectures and Technology group ADSaT 5 N-tier Architectures Business logic –Multiple layers possible Web scripts, server components –Distribute and replicate as necessary –Re-use of logic a primary goal Data access –Components enforce data integrity –Isolate business logic from database –Can be partitioned and replicated

Advanced Distributed Software Architectures and Technology group ADSaT 6 N-tier Example Order component Customer component Payment component Order component Goods component Stock component Delivery component MTS*MTS* DCOM/COM*DCOM/COM* Web server Scripted Web pages User interface app Print invoicesPrint ship requests Background processes * Or other transactional ORB of your choice Business Logic Layer Data Access Layer Client Access Layer

Advanced Distributed Software Architectures and Technology group ADSaT 7 Pooling Keep a shared pool of expensive or scarce resources –Database connections (ODBC, …) –Objects (COM+, EJB, …) Allocate from pool only when needed Release as soon as not needed Makes stateless transactional object designs really feasible

Advanced Distributed Software Architectures and Technology group ADSaT 8 DB Connection Pooling Database connections are… –Expensive to allocate (performance) –Limited in number (scalability)

Advanced Distributed Software Architectures and Technology group ADSaT 9 Object Pooling Client keeps reference to object Allocate new object on every method call –Stateless, transactional objects Discard objects at commit time Objects recycled to reduce costs –May only help with expensive objects

Advanced Distributed Software Architectures and Technology group ADSaT 10 Object Pooling

Advanced Distributed Software Architectures and Technology group ADSaT 11 Architectural Patterns Common models for building systems –Stateless or stateful? –Synchronous or asynchronous? –Data layer access Complexity and correctness –Recovery after failure –Scalability and parallelism –Simple, working and obviously correct is a good goal

Advanced Distributed Software Architectures and Technology group ADSaT 12 Stateful Session Server object Clients Server object Factory New Client

Advanced Distributed Software Architectures and Technology group ADSaT 13 Characteristics One server object dedicated for each client Server object can hold client- specific information (state) New clients request a Factory object to create them a server object. Can be distributed. Transactions can span multiple calls

Advanced Distributed Software Architectures and Technology group ADSaT 14 Issues How long do server objects live? Life of client? Forever? reusable What happens if a server object/node dies unexpectedly? How do clients find a factory? How does load balancing work if load becomes uneven?

Advanced Distributed Software Architectures and Technology group ADSaT 15 Stateless Session Server object pool Clients

Advanced Distributed Software Architectures and Technology group ADSaT 16 Characteristics Any client can use any server Server object pool can be distributed Server objects maintain no state on behalf of client, and pool DB connections Each client-server interaction is a single transaction

Advanced Distributed Software Architectures and Technology group ADSaT 17 Design Issues How big is server object pool? Static Dynamic How do clients decide which server object to connect to? Finding servers? Length of time they use a server Closely related to load balancing...

Advanced Distributed Software Architectures and Technology group ADSaT 18 Stateful v Stateless Stateless scales better in practice –Stateful may be faster Stateless is easier to build Stateful can be very useful in some applications: –greatly benefit from data caching –load balancing is not too much of an issue

Advanced Distributed Software Architectures and Technology group ADSaT 19 Entity Pattern Customer table Customer Server object Customer Server object Clients Customer Server object Factory 1 2

Advanced Distributed Software Architectures and Technology group ADSaT 20 Characteristics Server objects represent specific ‘rows’ in the database Client use a factory to create a server object Server objects have a get/set style interface for each attribute of the database row

Advanced Distributed Software Architectures and Technology group ADSaT 21 Issues How is concurrency control handled? 2 clients access same row at same time Scalability - many remote accesses to get/set individual attributes Plus all issues of stateful servers

Advanced Distributed Software Architectures and Technology group ADSaT 22 State(ful/less) + Entity Customer table Customer Server object Customer Server object Server object Server object

Advanced Distributed Software Architectures and Technology group ADSaT 23 Characteristics Combines service-based patterns with entity pattern Clients access state(ful/less) server objects (see previous slides) Server objects create entity objects as needed Server objects isolated from DBMS - a good thing...

Advanced Distributed Software Architectures and Technology group ADSaT 24 Issues All of the previous ones… Need to rely on DBMS locking to handle concurrency Need to be careful with DBMS deadlocks Scales only if server object and entity object in same process/node

Advanced Distributed Software Architectures and Technology group ADSaT 25 Synchronous Messaging Server object Client Request Queue Reply Queue

Advanced Distributed Software Architectures and Technology group ADSaT 26 Characteristics Client writes a service request to a queue in a transaction, and indicates where to write the results Server object removes request, performs service, and writes results to a reply queue (all in a transaction) Client removes results from reply queue in a transaction

Advanced Distributed Software Architectures and Technology group ADSaT 27 Issues Emulating synchronous behaviour with asynchronous technology Breaking 1 transaction up in to 3 client has to remember state for recovery purposes How do we scale up to many clients? many request and reply queues many server objects many queues per server object

Advanced Distributed Software Architectures and Technology group ADSaT 28 Asynchronous Messaging Queue Server object Client Request Queue State(ful/less) Server object

Advanced Distributed Software Architectures and Technology group ADSaT 29 Characteristics Client makes synchronous call to server object Server object updates DBMS, places request on queue and returns results to client in a transaction Queue server object takes request from queue and updates DBMS in a transaction

Advanced Distributed Software Architectures and Technology group ADSaT 30 Issues Used for delayed processing when part of a synchronous transaction is slow write slow part to queue transactionally no need to delay client, process request some time later (but will get processed) Very commonly deployed architecture, one of the strengths of messaging

Advanced Distributed Software Architectures and Technology group ADSaT 31 Example

Advanced Distributed Software Architectures and Technology group ADSaT 32 Web-based Clients Paul Greenfield

Advanced Distributed Software Architectures and Technology group ADSaT 33 The Web A single standard user interface technology –Web browsers A common client platform –Using HTML to get to a Web server A common protocol Except for …. –Many variations and standards to choose from….

Advanced Distributed Software Architectures and Technology group ADSaT 34 Static Web Pages Static HTML –Simple forms –No complex logic –Simple HTML is very portable across browsers –Very limited as a tool for building user interfaces No way to include user logic Presentation/forms only

Advanced Distributed Software Architectures and Technology group ADSaT 35 CGI Scripts Running logic on the server –The traditional UNIX way –URL references a CGI program rather than a web page –Web server runs a program or script (C, Perl, …) when the page is requested –Program/script runs and returns HTML –Complex to write and scales poorly

Advanced Distributed Software Architectures and Technology group ADSaT 36 ISAPI and NSAPI Call a library rather than starting a program –Microsoft and Netscape APIs –Much faster than CGI (no startup time) –Call returns HTML code has to write HTML strings –Still hard to write and complex –Java servlets are a later equivalent

Advanced Distributed Software Architectures and Technology group ADSaT 37 Client-side Scripting Add logic to the HTML –Logic in Jscript, VBscript, … –Script sees Web page as an object Manipulate the page being displayed Change text, check values, hide fields,… –Portability? MS, Netscape; v3, v4, v5, … –Useful for building dynamic, responsive Web-based user interfaces

Advanced Distributed Software Architectures and Technology group ADSaT 38 Applets Downloadable code run inside the Web page –Java applets, ActiveX controls –Severe security restrictions? Java sandbox (no files, little networking, …) Code signing (ActiveX and Java) –Relegated to niche usage Graphics, expanding indexes, viewers

Advanced Distributed Software Architectures and Technology group ADSaT 39 Server-side Scripting Scripted Web pages with the Web server running the script –Easier programming than CGI Script running within a Web page –Script can call on business components Fits in with n-tier model Script does UI/presentation functions –Can produce portable HTML –ASP (Microsoft) and JSP (SUN)

Advanced Distributed Software Architectures and Technology group ADSaT 40 N-tier Clients Simple browsers on desktops –Good chance of portability –Simple HTML Server-side scripted Web pages –ASP or JSP –Calling on transactional components for business processes (COM, EJB)

Advanced Distributed Software Architectures and Technology group ADSaT 41 Next Week… CORBA