You are on page 1of 44

Application Server & Web Server

Designed By:
„ Recap-evolution
Contents
„ Questions
„ Applying 3 tier architecture on web
„ Applying n tier architecture on web
„ Challenges of n tier architecture
„ Implementing the middle tier
„ transaction processing (TP) monitors,
„ message servers,
„ object request brokers (ORBs)
„ or application servers.
„ Web Servers vs. App Servers: Choosing Between the Two
„ Primary functions of a web server and application server
„ Introduction to components and framework
The evolution of
application architectures

Standalone - Application lives on client

Client/server Database server, client does


the thinking

Three-tier - Database, business service, client

N-tier -Database, many business services, client

Migratory architecture Intelligent agents, distributed


calculations, distributed clients
Some questions and Answers

„ Q) What is a three-tier architecture?


„ A) A three-tier architecture is any system
which enforces a general separation
between the following three parts:
1.ClientTier or user interface
2.Middle Tier or business logic

3.Data Storage Tier


Applying 3 tier architecture to web

„ Applied to web applications and distributed


programming, the three logical tiers usually
correspond to the physical separation between
three types of devices or hosts:
1.Browser or GUI Application

2.Web Server or Application Server

3.Database Server (often an RDBMS or


Relational Database)
N-Tier
„ N-Tier: An unlimited number of tiers.
„ Each tier may have multiple computers.
„ Advantages:
„ More powerful applications
„ Many services to many clients
„ Enhanced security, scalability and availability
„ Disadvantages:
„ Much more complicated to design and model
„ Performance risks
„ Reliability is more difficult to achieve
„ More difficult to maintain software
N TIER ARCH
Major quality attributes

„ Performance
„ Reliability
„ Usability
„ Security
„ Availability
„ Scalability
„ Maintainability
„ Effects of N-Tier architectures
Challenges of N-Tier
Architectures
•Communication and distribution is usually handled by
bought middleware (CORBA, EJB, DCOM, etc)
• Software becomes heterogeneous and parallel
• A lot to learn about the new technologies
• Distributed object application servers are

expensive (BEA's Weblogic, IBM's WebSphere)


• Designing truly reusable objects is difficult
– the design must be high quality
– they may not satisfy the needs of future systems
Challenges of N-Tier
Architectures (2)
„ General distributed object protocols are slow
– This is usually not important because the
internet is so slow, and if it is, more speed can
usually be achieved by adding more hardware
„ Load balancing is quite difficult: distributing
„ requests to computers such that each
computer does approximately the same work

In small systems, everything is simple, but in


large
systems, the overall software design is crucial to
product
Implementing the middle tier

„ There are a variety of ways of implementing


this middle tier, such as using
„ transaction processing (TP) monitors,
„ message servers,
„ object request brokers (ORBs) (Assignment)
„ or application servers.
Transaction processing monitor

TP monitor technology is software that is also referred to


as Middleware. It can provide application services to
thousands of clients in a distributed client/server
environment.
Transaction monitors
„ Transaction monitors (a.k.a. transaction processing monitors,
a.k.a. TP monitors) were the first kind of middleware to support
distributed transaction processing,
„ and thus also the first kind of application servers.
„ They were (originally) designed for environments with very
high processing demands, such as banks or airlines, that could
not be properly supported by 2-tier architectures and by DBMS
alone.
„ Architectures using transaction monitors as middleware for
transaction control are also called TP-heavy transaction
processing environments, because this solution is much heavier to
implement.
TP-Process management

This figure illustrates the point why process management by TP monitors is so


beneficial for performance. Assume 1000 clients are accessing a (database)
application, and each of the requests is handled individually by the DBMS. Then
the OS has to deal with the numbers given in the figure above.
By sharing resources using a TP monitor, in particular connections and processes,
the requirements for the OS are substantially reduced and the OS is fine.
TP
„ TP monitor technology maps numerous client requests through
application services routines to improve system performance.
„ The TP monitor technology (located as a server) can also take the
application transitions logic from the client.
„ This reduces the number of upgrades required by these client platforms.
„ In addition, TP monitor technology includes numerous management
features, such as restarting failed processes, dynamic load balancing, and
enforcing consistency of distributed data.
„ TP monitor technology is easily scalable by adding more servers to meet
growing numbers of users
A typical TP monitor technology provides
„ the ability to update multiple different DBMSs in a
single transaction
„ connectivity to a variety of data sources including flat
files, non-relational DBMSs and even mainframe
systems
„ the ability to attach priority to transactions and to give
robust security
„ For systems with thousands of users, TP monitor
technology has been one of the most effective
solutions.
Products

„ Products such as IBM CICS


„ IMS,HP NonStop™ Pathway, ACI

„ BASE24/XPNET

„ BEA Tuxedo, etc.


„ As client devices became intelligent and as the
demand to integrate resources from more than one
platform increased, there was a need to evolve TP
monitors to better meet the business needs.
„ Open was one attribute rarely applied to these TP
monitors.
Message server
„ A messaging server is a middleware program that handles
messages that are sent for use by other programs using a
messaging application program interface (API).
„ A messaging server can usually queue and prioritize messages
as needed and saves each of the client programs from having
to perform these services.
Message Server
„ messaging is the exchange of messages (specially-
formatted data describing events, requests, and replies)
to a messaging server, which acts as a message exchange
program for client programs.
Products

„ IBM's MQSeries and Sun Microsystems Java


Message Service (JMS) are examples of products
that provide messaging interfaces and services.
MQ Series

„ MQ Series is "Message Oriented Middleware".


„ It uses a named queue model to implement near-real-
time messaging, with guaranteed delivery. What this
means is that it is like email++.
„ You have a sender, receiver and a message body. The
big difference is that instead of a SMTP server, you
have MQ Series.
Assignment-1

„ Difference between TP and message server


Application server
They are also called “middleware”

• Application servers are software that


runs on the middle tier of an n-tier
environment
• An Application Server is used to run
business logic or dynamically generated
presentation code.
• It can either be .NET based or J2EE
based (like Oracle9iAS, BEA WebLogic
Server, IBM WebSphere, JBoss).
Web Servers vs. App Servers:
Choosing Between the Two
„ Web servers are a familiar and necessary
component of the Internet.
„ Application servers are less familiar but also a
necessary element for at least some aspects of
the Internet.
Web servers and application
servers
„ Web servers and application servers are not
mutually exclusive.
„ And in the corporation their functions can
certainly overlap:
„ there are many, many Web servers that
are serving data from a database.
„ while there are more and more application
servers serving up basic Web pages.
Web server and app server-
two different pieces of software
„ While a Web server and an application server can run on the same
computer (though usually not) these are two quite different pieces
of software. There are few Web servers in common use:
„ Apache takes the lion’s share, while Microsoft Internet Information
Server (IIS) and iPlanet Web Server are among the others.
„ Application servers jumped into the limelight only about two years
ago and there is a proliferation of products from companies such
as BEA, iPlanet, Oracle, SilverStream, HP (Bluestone), and IBM.
Microsoft doesn’t have a product it labels an application server,
but the BizTalk Server is similar in functionality.
Primary functions of a web
server
„ The Web server, in general, sends Web pages to browsers as its
primary function.
„ Most Web servers also process input from users, format data,
provide security, and perform other tasks.
„ The majority of a Web server’s work is to execute HTML or
scripting such as Perl, JavaScript, or VBScript.
Web server
„ A Web server handles the HTTP protocol.
„ When the Web server receives an HTTP request, it responds with
an HTTP response, such as sending back an HTML page.
„ To process a request, a Web server may respond with
„ a static HTML page or image

„ send a redirect, or delegate the dynamic response generation


to some other program such as
„ CGI scripts, JSPs (JavaServer Pages), servlets, ASPs
(Active Server Pages), server-side JavaScripts, or some
other server-side technology.
Web server
„ Whatever their purpose, such server-side
programs generate a response, most often in
HTML, for viewing in a Web browser.
The Web Server Model
Database
Server

CGI
Web
Server
HTTP
HTTPover
over
TCP/IP
TCP/IP----
Application The
The’Net
’Net
Server

Client browser:
HTML HTML forms,
CGI documents JavaScript,
VBScript, ASP,JSP VBScript, Java
Perl, PHP, Tcl
Some application tier
technologies
• CGI scripts
- one of the earliest server-side options (supported by most web
servers)
- resource intensive: a process created for every request (heavy-
weight processes)
• ASP (HTML embedding VBScript or JavaScript)
- currently available only on Windows only via IIS (Microsoft)
• Proprietary API’s from Netscape (NSAPI), Microsoft Internet
Server API
- normally written in C/C++; vendor specific, fast
• Java Servlets, Java Server pages (JSP) (Referred to as J2EE)
- Wide support from Netscape, Sun, Apache, Oracle, IBM runs on more
than just Windows
- third party support (JRun)
Delegation model of web server
„ Web server's delegation model is fairly simple.
„ When a request comes into the Web server, the Web server
simply passes the request to the program best able to handle it.
„ The Web server doesn't provide any functionality beyond simply
providing an environment in which the server-side program can
execute and pass back the generated responses.
„ The server-side program usually provides for itself such functions
as transaction processing, database connectivity, and messaging.
App servers
„ While a Web server may not itself support
transactions or database connection pooling, it
may employ various strategies for
„ fault tolerance and scalability such as load
balancing, caching, and clustering—features
often times erroneously assigned as features
reserved only for application servers.(see later)
Web application server - facilities
„ A web application server will typically provide facilities
for
„ authentication ("Who are you?")
„ authorization ("Are you supposed to be here?")
„ session management ("Have you been here before?")
„ database abstraction ("Which of these products are you
interested in?")
„ presentation ("How do you want to view this?") and so on.
Application Server: Key Services
JBoss- Application Server

FIND SOME APPLICATION SERVERS


„ Apache or any other common web server can’t
handle Servlets nor JSP.
„ So we use the Tomcat server from the Apache
sub-project named Jakarta
Application types
The applications that run on an application server can be broadly
classified as follows:
Bank or e-commerce type applications -- These applications
constitute the majority of those hosted on application servers. The main
elements they rely on are JavaServer Pages (JSP) components, Java
servlets, and HTTP access. Typically, security is achieved through
authentication and SSL, with data requested from a database.
Web service applications -- Many applications are built as Web
services to enable interoperability and reuse. The main ingredients are
HTTP access, XML transformations, JSP components, and Java
servlets.
„ Wireless applications -- These applications are accessed from multiple
devices, typically with the underlying HTTP/S transport. Because many
applications rely on alerts or notifications, JMS plays a key role in the
applications. The main components are HTTP-WAP [Wireless Access
Protocol], XML transformation, JSP components, and Java servlets.
„ Desktop Java applications -- These are thick client applications that
access, through the RMI/IIOP (Internet Inter-ORB Protocol )mechanism,
the business logic hosted in the EJB components.
component
„ Component – a replaceable part of a system that
provides a clearly defined function through a set of
interfaces.
Characteristics of Components

– Used for specific commonly used


purpose
– Collection of classes and interfaces
– Hidden implementation details
– Plug-and-play capability
– Third-party developed, typically in binary
form
– Reusable in many applications
– Well-tested and relatively error-free
What Is a Component Standard?

• An agreed-upon format for defining interfaces and


implementations of components

• Examples:
– Microsoft COM+
– OMG’s CORBA
– Sun Microsystem’s Enterprise Java Beans (EJB)
– Database Middleware Standards (ODBC, ADO,
JDBC)
– XML/SOAP
What Is a Framework?
A collection of components, consisting of code and interfaces
written in a specific language, that solves or helps build
applications.

Two main competitors:


• Microsoft .NET
• Sun Java 2 Enterprise Editiion (J2EE)

You might also like