Internet Engineering: Web Application Architecture Ali Kamandi - - PowerPoint PPT Presentation

internet engineering web application architecture
SMART_READER_LITE
LIVE PREVIEW

Internet Engineering: Web Application Architecture Ali Kamandi - - PowerPoint PPT Presentation

Internet Engineering: Web Application Architecture Ali Kamandi Sharif University of Technology kamandi@ce.sharif.edu Spring 2007 Centralized Architecture mainframe terminals terminals 2 Two Tier Application Architecture In the 90s,


slide-1
SLIDE 1

Internet Engineering: Web Application Architecture

Ali Kamandi Sharif University of Technology kamandi@ce.sharif.edu Spring 2007

slide-2
SLIDE 2

Centralized Architecture

terminals mainframe terminals

2

slide-3
SLIDE 3

Two Tier Application Architecture

In the 90’s, systems should be client- server

3

slide-4
SLIDE 4

Client-Server Architecture

Client-Server divides programs into two types Server – manages information system resources or provides well defined services for client Client – communicates with server to request resources

  • r services

Advantage – Deployment flexibility scalability, maintainability Disadvantage – Potential performance, security, and reliability issues from network communication

4

slide-5
SLIDE 5

3 Layer Architecture

5

slide-6
SLIDE 6

Three-Layer Architecture

Layers can reside on one processor or be distributed to multiple processors Data layer – manages stored data in databases Business logic layer – implements rules and procedures

  • f business processing

Presentation (View) layer – accepts user input and formats and displays processing results

6

slide-7
SLIDE 7

Web Architecture

PHP script Web Server (Apache, IIS) Browser (IE, FireFox, Opera) Desktop (PC or MAC) Database Database Server SQL HTTP HTML data DHTML

Presentation HTML+DHTML Dynamic HTML Generation, Business Logic Persistence

7

slide-8
SLIDE 8

Enterprise Application Model

8

slide-9
SLIDE 9

Internet and Web-based Application Architecture

Web is complex example of client-server architecture Can use Web protocols and browsers as application interfaces Benefits

Accessibility Low-cost communication Widely implemented standards

9

slide-10
SLIDE 10

Negative Aspects of Internet Application Delivery

security Fluctuating reliability of network throughput, slow speed Volatile, changing standards

10

slide-11
SLIDE 11

Presentation layer (Client Side)

Issue request to remote server using appropriate protocol (usually HTTP) Accept and render the returned HTML (or JPEG, ..) file Allow plug-ins to handle new file types execute client-side scripts in JavaScript Accept user input via a variety of controls on a form

11

slide-12
SLIDE 12

Application Layer: Server Side Presentation + Business Logic

Server (Apache, IIS) Identifying appropriate action to take – fetch a file Sending output back to caller Support for: thousands of concurrent users multi-threading [ allow multiple processes to run concurrently] caching [holding results in a temporary store to reduce re- calculation] Server Script (e.g. in PHP) Interacting with the server (accessing input and generating

  • utput)

interpreting the requests according to business rules requesting the appropriate data from the Persistence layer computing derived data creating the HTML (or GIF, ...) for the page

12

slide-13
SLIDE 13

Persistence layer

interaction with the database using standard languages e.g. SQL queries using database-specific protocol over TCP/IP define and modify the data structures (e.g. tables) insert, update and delete data maintain data persistently, with backup and recovery handle transactions to support concurrent access to the database via locking

  • ptimise access by compilation of queries, indexing,

replication of tables etc.

13

slide-14
SLIDE 14

Enterprise IT Requirements

DB2

DATA WAREHOUSE BACK OFFICE FRONT OFFICE APPLICATION INTEGRATION Legacy Apps Purchased Apps Thin Client Apps Business Intelligence INTERNET On-line Integration

SAP

Custom Apps Off-line Integration

14

slide-15
SLIDE 15

Middleware

Connects parts of an application and enables requests and data to pass between them

15

slide-16
SLIDE 16

CORBA

A distributed component-oriented model An architecture for defining components and their interactions From client-side (GUI) to server-side (business) components A container framework: lifecycle, security, transactions, persistence,… The Industry’s First Multi-Language Component Standard Multi-languages, multi-OSs, multi-ORBs, multi- vendors, etc.

16

slide-17
SLIDE 17

What is the purpose / goals of CORBA?

Enable the building of plug and play component software environment Enable the development of portable,

  • bject oriented, interoperable code that is

hardware, operating system, network, and programming language independent

17

slide-18
SLIDE 18

How to meet goals?

Interface Definition Language (IDL) Object Request Broker (ORB)

18

slide-19
SLIDE 19

Interface Definition Language (IDL)

Language Independence Defines Object Interfaces Hides underlying object implementation Language mappings exist for C, C++, Java, Cobol, Smalltalk, and Ada

19

slide-20
SLIDE 20

Interface Definition Language (IDL)

module <identifier> { interface <identifier> [:inheritance] { <type declarations>; <constant declarations>; <exception declarations>; <attribute declarations>; [<op_type>] <identifier>(<parameters>) [raises exception][context]; } }

Defines a CORBA object Defines a method Defines a container (namespace)

20

slide-21
SLIDE 21

IDL Compiler

IDL Definitions IDL Compiler Stubs Skeletons

1. Define objects using IDL 2. Run IDL file through IDL compiler 3. Compiler uses language mappings to generate programming language specific stubs and skeletons

21

slide-22
SLIDE 22

Implementation of CORBA specification Middleware product Conceptual Software Bus Hides location and implementation details about objects

Object Request Broker (ORB)

22

slide-23
SLIDE 23

Client / Object Interaction

Client Obj Impl IDL IDL ORB Client Obj Impl IDL IDL ORB Network TCP/IP OSI ATM TCP/IP OSI ATM

23

slide-24
SLIDE 24

CORBA Services

Provide basic infrastructure functionality Currently there are more than 15 defined services

Naming - maps human names to object references Event Object Trader - discover objects based on the services they provide (Yellow Pages) Transactions – allows distributed objects to participate in atomic transactions

24

slide-25
SLIDE 25

Enterprise Application Model

25

slide-26
SLIDE 26

J2EE clients

Web clients

Dynamic web pages with HTML, rendered by web browsers. Can include applets. Communicates with server typically using HTTP.

Application clients

User interface using GUI components such as Swing and AWT. Directly accesses the business logic tier.

26

slide-27
SLIDE 27

Web-tier Components

Client can communicate with the business tier either directly or through servlets or JSP that are located in the web-tier. Servlets are special classes to realize the request-response model (get, post of HTTP). JSP is a developer-friendly wrapper over the servlet classes.

27

slide-28
SLIDE 28

Business-tier Components

Business logic, rules, computation Enterprise Java Beans (EJB) can be used to implement this tier. This tier receives the data from the web- tier and processes the data and sends it to the EIS-tier and takes the data from the EIS and sends it to the web-tier.

28

slide-29
SLIDE 29

Enterprise Information System (EIS) Tier

In general this corresponds to the database (relational database) and other information management system. The other information management systems may include Enterprise Resource Planning (ERP) and legacy system connected through open database connectivity.

29

slide-30
SLIDE 30

Enterprise Java Bean (EJB) (1)

EJBs are distributed components used to implement business logic (no UI) Client of EJBs can be JSPs, servlets,

  • ther EJBs and external aplications

Clients see interfaces

30

slide-31
SLIDE 31

Enterprise Java Bean (EJB) (2)

At run-time, an enterprise bean resides in an EJB container. An EJB container provides services such as security, transaction, deployment, … Process of installing an EJB in a container is called EJB deployment.

31

slide-32
SLIDE 32

Enterprise Java Bean (EJB) (3)

Entity Beans

Represent persistent business Entity Persisted in storage system (usually Database)

Session Beans

Encapsulate complex business logic Can coordinate transactional work on multiple entity beans

Message Driven beans

32

slide-33
SLIDE 33

States and Persistence

Session beans can be

Stateless- belong to client for duration of a method call Stateful- belong to client for duration of client conversation

Entity beans can have

Bean-managed persistence- The developer writes SQL code to store, retrieve and update database Container managed persistence- The developer provide database mapping information that allows the container to manage persistence

33

slide-34
SLIDE 34

JMS

Point-to-point

Destination is “queue”

34

slide-35
SLIDE 35

JMS

Publish-subscribe

Destination is “topic”

35

slide-36
SLIDE 36

What is Application Server

Application servers enable the development of multi-tiered distributed applications. They are also called “middleware” An application server acts as the interface between the database(s), the web servers and the client browsers

36

slide-37
SLIDE 37

J2EE Application Servers

Major J2EE products:

BEA WebLogic IBM WebSphere Sun iPlanet Application Server Oracle 9iAS HP/Bluestone Total-e-Server Borland AppServer Jboss (free open source) …

37

slide-38
SLIDE 38

JBoss

Created in 1999, JBoss is the product of an OpenSource developer community dedicated to developing the best J2EE-compliant application server in the market With 1000 developers worldwide and a steadily growing number of downloads per month, reaching 72,000 for October ’01 (per independent www.sourceforge.net), JBoss is arguably the most downloaded application server in the world today JBoss is absolutely FREE for use.

38

slide-39
SLIDE 39

JBoss- Application Server

39

slide-40
SLIDE 40

J2EE Benefits

Component based model Container provided services Highly Scaleable Simplified Architecture Flexible security model

40

slide-41
SLIDE 41

J2EE Benefits

Integration with existing systems Freedom to choose vendors of application servers, tools, components Multi-platform

41

slide-42
SLIDE 42

J2EE Multi-tier Model

42

slide-43
SLIDE 43

J2EE Application Scenarios

Multi-tier typical application

43

slide-44
SLIDE 44

J2EE Application Scenarios

Stand-alone client

44

slide-45
SLIDE 45

J2EE Application Scenarios

Web-centric application

45

slide-46
SLIDE 46

J2EE Application Scenarios

Business-to-business

46

slide-47
SLIDE 47

J2EE Services and APIs

JNDI - Naming and directory services

Applications use JNDI to locate objects, such as environment entries, EJBs, datasources, message queues JNDI is implementation independent

47

slide-48
SLIDE 48

J2EE Services and APIs

Transaction service:

Controls transactions automatically You can demarcate transactions explicitly Or you can specify relationships between methods that make up a single transaction

48

slide-49
SLIDE 49

J2EE Services and APIs

Security

Java Authentication and Authorization Service (JAAS) is the standard for J2EE security Role-based authorization limits access of users to resources (URLs, EJB methods)

49

slide-50
SLIDE 50

J2EE Services and APIs

J2EE Connector Architecture

Integration to non-J2EE systems, such as mainframes and ERPs. Standard API to access different EIS

Support to CORBA clients

50

slide-51
SLIDE 51

.NET Developer Tools

Visual Studio.NET is an integrated development environment for developing .NET applications It includes support for multiple languages

Visual Basic.NET Visual C#.NET Visual J#.NET ASP.NET

51

slide-52
SLIDE 52

.NET High Level Description

Common Language Runtime Platform Interoperability

"You very seldom want to port an existing application between platforms, but you do want to interoperate between applications regardless of platform; therefore, industry standard support for Web Services is of great importance.”

  • Dan Fox, Solutech, Inc. Author of: Building Distributed

Applications with Visual Basic.NET

52

slide-53
SLIDE 53

.NET Framework Web Services Web Forms Windows Forms Data and XML Classes

(ADO.NET, SQL, XML, etc.)

Framework Base Classes

(IO, string, net, security, threading , text, etc.)

Common Language Runtime

(debug, exception, type checking, JIT compilers)

Windows Platform

53

slide-54
SLIDE 54

ASPX

Microsoft Active Server Pages, .NET

IIS Server

Old ASP

HTML with embedded server scripts Session Support VB Scripts

ASPX.NET

Separation of HTML and code Multiple Languages

54

slide-55
SLIDE 55

IIS

Internet Information Services (IIS, sometimes Server or System) is a set of Internet-based services for servers using MS Windows Used for corporate, commerce and secure websites. It is integrated with Windows 2000 and Windows 2003 Server.

55

slide-56
SLIDE 56

Forrester Report: The State of Technology Adoption

Source: http://download.microsoft.com/download/c/7/5/c75837dc-90bb-44d8-ae70-

db7bcc5980b9/TheStateofTechnologyAdoption.pdf

56

slide-57
SLIDE 57

Pros and Cons of J2EE

Pros

Portability Vendor choices for tools and application servers Rich developer community, many free tools.

Cons

Complex application development environment Tools can be difficult to use Java Swing limited for developing GUI's (?) Performance

57

slide-58
SLIDE 58

Pros and Cons of .Net

Pros

Easy to use tools Strong framework for building GUI's Language support Performance

Cons

Portability Choice of IDE's Limited

58

slide-59
SLIDE 59

.Net and J2EE key differences

Fundamental Philosophy:

“One language, Many Systems” vs. “Many Languages, One System.”

59

slide-60
SLIDE 60

Assignment 2

Compare .Net and J2EE See these papers:

http://java.sun.com/performance/reference/whitepapers/WS_Test- 1_0.pdf http://www.gotdotnet.com/team/compare/Benchmark_response.pdf Analyze the benchmarks and prepare a report.

Benchmark approach, fairness, results

slide-61
SLIDE 61

Application Architecture (logical)

UI Components Data Access Components User Devices Service Agents Operational Management Security Communication Service Interfaces Owned Data Sources External Services External Service Agents Messaging Infrastructure Business Process Components Business Components Users Presentation Business Logic Data Layer Data and External Systems

61

slide-62
SLIDE 62

Solution: Simple Web Application

BC Clients DAC UIC Data Sources Web Clients Web Application Farm Database Clusters

62

slide-63
SLIDE 63

Solution: Complex Web Application

BC Clients DAC UIC Data Sources Web Clients Web Farm Database Clusters Application Farm

63

slide-64
SLIDE 64

Solution: Extended Enterprise Application

BC Clients DAC UIC Data Sources Web Clients Web Farm Database Clusters Application Farm SA SI

64

slide-65
SLIDE 65

Solution: Smart Client Application

BC DAC UIC Data Sources Smart Clients Web Farm Database Clusters Application Farm SA SI

65

slide-66
SLIDE 66

Questions

66

slide-67
SLIDE 67

.NET Online Resources

http://www.msdn.microsoft.com/netframew

  • rk/

http://www.gotdotnet.com/ http://www.startvbdotnet.com http://www.asp.net http://www.dotnetwire.com

67

slide-68
SLIDE 68

J2EE Online Resources

http://java.sun.com/j2ee/index.jsp http://library.theserverside.com/rlist/term/J 2EE.html http://www.javaworld.com

68