web server and application servers -...

34
Web Server And Application Servers Sunnie Chung Adapted from Lecture of Daniel L. Silver, Ph.D.

Upload: vuonghanh

Post on 30-Aug-2018

245 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Web Server And

Application Servers

Sunnie Chung

Adapted from Lecture of

Daniel L. Silver, Ph.D.

Page 2: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Outline

� The Apache HTTP server

� Java application servers

� The need for more powerful middleware

� J2EE

� A comparision of the leading application

servers on the market

Page 3: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Evolution on the Web

Publishing

Time or Maturity

Functio

nality Interactivity

Transactions

Processes

Static web pages

Dynamic web pages

Web-enabled

applicatons

HTTP Servers

CGI Servers

App.

Servers

Page 4: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

The Apache HTTP Server

� What is unique about the development of Apache?

See www.apache.org

– What other software system shares this characteristic?

� First created in 1995 by Rob McCool, NCSA

� Survey says: 63% of the HTTP server market

� Available for Unix, Linux, Windows (NT, 98)

� Homework: Where did it get its name?

Page 5: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

The Apache HTTP Server

� Architecture:

– Modular in nature

– Promotes slim and simple configurations

– Modules can be compiled and loaded as needed such as

» Core - core apache features – required!

» mod_access, mod_auth - administration of host and user group

access

» mod_action, mod_cgi - Action on requested CGI script files

» mod_asis - “as is” delivery of certain file types (e.g. *.txt)

» mod-alias - Access to directories not in the apache root

» mod_usretrack -User tracking via cookies

Page 6: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Apache HTML Processing

Internet

Browser

Client

Apache

HTTP Server

http/https

../store15/index.html

http://eagle.acadiau.ca/store15/index.html

HTTP

admin

Page 7: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Apache CGI Processing

Internet

Browser

Client

Apache

HTTP Server

http/https

../store15/cgi-bin/Hello.cgi

mod.CGI

Unix

Op. sys.

http://eagle.acadiau.ca/store15/cgi-bin/Hello.cgi

HTTP

admin

Page 8: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Java Application Servers

� Application servers were created originally to field multiple simultaneous CGI requests, the divide and conquer approach

� Java servlets were introduced by Sun as a method of providing the benefits of server-side processing while taking advantage of many great Java characteristics:– Developers new the langauge

– Simple to understand

– There were lost of objects and methods already written

– Code was portable to many different servers (JVM)

– Faster than CGIs

Page 9: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Tomcat Java Servlet Processing

Internet

Browser

Client

HTTP Server

FirstServlet.class

http://eagle.acadiau.ca/store15/servlet/FirstServlet

Tomcat

Java App.

Server

Tomcat

admin

Java Bean

Page 10: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Tomcat JSP Processing

Internet

Browser

Client

HTTP Server

Java Bean

http://eagle.acadiau.ca/store15/index.jsp

Class DB

Tomcat

Java App.

Server

Pointer to internal .class file

for index.jsp

E-Comm DB

Store category

or product data

../store15/index.jsp

Page 11: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

The E-Business Architecture

SupCM

SellCM

Partners, Suppliers

Customers, Distributors

CRM

ERP

PM

KM

Middleware

Employees Stakeholders

A new era of

Cross-Functional

Integrated

Applications

Page 12: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Constructing the E-Business

Architecture

� A New Era of Cross-Functional Integrated

Applications

– CRM = Customer Relationship Management

– ERP = Enterprise Resource Planning

– SupCM = Supply Chain Management

– SellCM = Selling Chain Management

– PM = Procurement (Operational Resource)

Management

– KM = Knowledge Management (DW/Analytics)

– Middleware = Integration Applications

Page 13: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

The Need for More Powerful

Middleware� More efficient use of server resources

� Flexibility - ever changing products, technology, business process

� Multi-channel interfaces has forced separation of:

– Customer (web) interface aspect

– Enterprise (application) interface aspects

� End-to-end transaction integrity required

� Security – a primary concern

� Integration – ability to integrate with other and often older computer systems

Page 14: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Java has Risen to the Challenge

� Why Java?

– Object-oriented

– Platform independent

– Network aware

– Multi-threaded (easy to develop applications

that do two or more things at a time)

– Relatively fast learning curve

– Faster development times

Page 15: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

J2EE

� In 1999, Sun Microsystems announced a

comprehesive Java based middleware

architecture and technolgy called Java 2

Enterprise Edition or J2EE:

– Full server side Java standard development

platform

– Solid backend for many wireless applications

– Solid infrastructure with many commonly used

components (Java Beans … think objects)

Page 16: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

J2EE

� J2EE provides:

– EJB – Enterprse Java Beans, handle critical tasks of E-commerce such as transactions and DB access

– JSPs – Java Server Pages, brings flexibility to user interfaces

– Java Servlets provide link between user interface and backend enterprise applications

– JDBC – Java Database Connectivity, standard interface for access to relational DB

Page 17: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Java Enterprise Edition (Java EE)

Application Servers

� Java EE is an open standard for building web-based enterprise applications

� Containers provide several features so that application developers won’t have to write everything from scratch

� Java EE provides the consumer with several choices between platform and vendor

� Open source application servers are gaining a lot of momentum due to low cost of entry and improving quality

Page 18: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Typical Scenario

� Create a web application that is secure, reliable and can serve large quantities of data to thousands of concurrent users.

� Problem:

– It needs to be in production within 6 months.

� One Solution:

– Hire lots of programmers to implement security, scalability, database features

� Difficult to find skillset

� High cost to build and maintain application

� Could be error prone

Page 19: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Key Observations - Java EE

� Key observation made by application server vendors

– Most web applications require similar features such as

database access, security, scalability, etc.

– Provide these features that are fully tested in a container to

be leveraged by application developers

» Similar to Java and C++ libraries

– Allows application programmers to focus on business logic

instead of writing all features from scratch

Page 20: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Services Provide by Java EE

� Web Services

� RMI for distributed applications

� Load balancing / clustering

� Database integration

� System management

� Message-oriented middleware

� Security

� Dynamic redeployment

� and many others….

Page 21: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Java EE Containers

Source: http://java.sun.com/javaee/5/docs/tutorial/doc/bnaay.html

Page 22: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Vendors

� Commercial

– IBM WebSphere Application Server

– BEA WebLogic

– Oracle OC4J

� Open Source

– JBoss Application Server

– Apache Geronimo

– Sun Glassfish

– Apache Tomcat (only a web container)

Page 23: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Alternatives

� Spring / Hibernate solution

– New EJB specification is very similar to Hibernate

– Spring and Hibernate are not based on specifications

– Not as mature as Java EE

� Microsoft .Net

– Similar functionality

– Forced into one platform and one vendor

– One of the key features of web services is the

interoperability of .Net and Java EE.

Page 24: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Advantages and Disadvantages

� Advantages

– Many, many features provided to the application developer

– Shorter development cycle

– Low cost of entry, especially when using open source application servers

� Disadvantages

– Less flexibility on architecture

– Troubleshooting can be very difficult, especially if you uncover a bug in the vendor’s code

– Sometimes your application doesn’t require all the features available - this could hinder performance

» Being addressed by open source community

Page 25: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Additional Information

� Java EE 5 Tutorial -http://java.sun.com/javaee/5/docs/tutorial/doc/index.html

� Apache Tomcat (only a servlet engine) -http://tomcat.apache.org/

� JBoss Application Server -http://www.jboss.org/

� Apache Geronimo -http://geronimo.apache.org/

Page 26: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Common Characteristics of

Application Servers

� Connectivity to various applications and DBs on various operating environments and hardware

� Provides an integrated IDE for all aspects

� Support for reusable distributed components (CORBA, COM, EJB)

� Performance management (load balancing, caching, monitoring)

� Robust and reliable software – redundancy, backup/recovery

� User-friendly administrative, diagnostic tools

� Strong security framework

Page 27: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

3-Tier Architectural of Modern

Web Servers

Internet

Browser

Database

Server

Client 1

Server A

Server BBank

Server

URL

HTTP

TCP/IP

Browser

Client 2 HTTP

Server

App.

Server

index.html

prog1.cgi

ERP

prog2.class

Page 28: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

The Major Application

Server Providers

� BEA – WebLogic (7.0) - 24% of market

� IBM – WebSphere (4.0) – 33%

� Oracle – Oracle(Ias (1.0) – 12%

� SUN – Sun ONE (was iPlanet) – 8%

� Macromedia – ColdFusion (MX)

Page 29: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Comparison of Major

Application Servers

� Refer to class handout

� BEA - WebLogic (7.0)

– The most widely used server on the market

– Very scalable

– Bridges cap between SUN Java J2EE and MS COM

– Robust features, great security framework

– Support for wireless mobile clients (J2ME)

– Maintenance and support is managable

– Number 1 with many commercial users

Page 30: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Comparison of Major

Application Servers

� IBM – WebSphere (4.0)

– Java technology based – full J2EE support

– Sophisticated integration capabilities to COM and

CORBA systems

– Scales well

– Fits well with DB2 and other IBM E-Business products

– Support for wireless mobile clients (J2ME)

– Requires greater care and feeding

– Excellent for large companies

Page 31: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Comparison of Major

Application Servers

� Oracle – Oracle(Ias (1.0)

– Claim to be the worlds leading wireless mobile

application server

– J2EE and XML programming model that

radically simplifies development, installation

and management

– Well situated for wireless web apps

– Good choice for medium to large companies

Page 32: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Comparison of Major

Application Servers

� SUN – Sun ONE (was iPlanet)

– Excellent scaling and robustness

– Automatic failover capabilities

– Integrate XML parser to facilitate B2B apps

– Version 6.5 promises new developer tools and

resources

– SUN has been the Java leader on the Web

– Always worth considering

Page 33: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

Comparison of Major

Application Servers

� Macromedia – ColdFusion (MX)

– An easy-to-use web development environment

» Kawa (discontinued)

» Macromedia Flash MX

» Dreamweaver MX

– Uses its own powerful server-side scripting language

– Has moved to the Java architecture

– Also will support .NET and J2EE

– Great for small to medium sized companies

Page 34: Web Server And Application Servers - csuohio.edugrail.cba.csuohio.edu/~sschung/...Web_App_Servers.pdf · Web Server And Application Servers Sunnie Chung ... Flexibility - ever changing

The E-Business Architecture

SupCM

SellCM

Partners, Suppliers

Customers, Distributors

CRM

ERP

PM

KM

Middleware

Employees Stakeholders